listen to all IPs

This commit is contained in:
Dobromir Popov
2025-12-08 21:36:07 +02:00
parent 81a7f27d2d
commit 1ab1c02889
3 changed files with 82 additions and 8 deletions

View File

@@ -3206,6 +3206,12 @@ class RealTrainingAdapter:
# Include trend vector if available
if 'trend_vector' in outputs:
result_dict['trend_vector'] = outputs['trend_vector']
# DEBUG: Log if we have predicted candles
if predicted_candles_denorm:
logger.info(f"🔮 Generated prediction with {len(predicted_candles_denorm)} timeframe candles: {list(predicted_candles_denorm.keys())}")
else:
logger.warning("⚠️ No predicted candles in model output!")
return result_dict
@@ -3993,6 +3999,7 @@ class RealTrainingAdapter:
predicted_candle_clean[tf] = candle_data
prediction_data['predicted_candle'] = predicted_candle_clean
logger.info(f"📊 Storing prediction with ghost candles for {len(predicted_candle_clean)} timeframes: {list(predicted_candle_clean.keys())}")
# Use actual predicted price from candle close (ensure it's a Python float)
predicted_price_val = None
@@ -4011,6 +4018,7 @@ class RealTrainingAdapter:
prediction_data['price_change'] = 1.0 if prediction['action'] == 'BUY' else -1.0
else:
# Fallback to estimated price if no candle prediction
logger.warning(f"!!! No predicted_candle in prediction object - ghost candles will not appear!")
prediction_data['predicted_price'] = prediction.get('predicted_price', current_price * (1.01 if prediction['action'] == 'BUY' else 0.99))
prediction_data['price_change'] = 1.0 if prediction['action'] == 'BUY' else -1.0