configurable txt separator

This commit is contained in:
Dobromir Popov
2025-08-27 01:48:29 +03:00
parent fc1ac2061f
commit d49a473ed6
4 changed files with 42 additions and 15 deletions

View File

@@ -2979,7 +2979,7 @@ class CleanTradingDashboard:
hold_predictions = []
for pred in dqn_predictions[-30:]: # Last 30 DQN predictions
action = pred.get('action', 2) # 0=BUY, 1=SELL, 2=HOLD
action = pred.get('action', 2) # 0=SELL, 1=HOLD, 2=BUY
confidence = pred.get('confidence', 0)
timestamp = pred.get('timestamp', datetime.now())
price = pred.get('price', 0)
@@ -2996,9 +2996,10 @@ class CleanTradingDashboard:
'q_values': pred.get('q_values', [0, 0, 0])
}
if action == 0: # BUY
# Correct mapping: 2 -> BUY, 0 -> SELL, 1 -> HOLD
if action == 2: # BUY
buy_predictions.append(pred_data)
elif action == 1: # SELL
elif action == 0: # SELL
sell_predictions.append(pred_data)
else: # HOLD
hold_predictions.append(pred_data)
@@ -3409,10 +3410,6 @@ class CleanTradingDashboard:
try:
predictions = []
# Generate sample predictions if needed (for display purposes)
if hasattr(self.orchestrator, 'generate_sample_predictions_for_display'):
self.orchestrator.generate_sample_predictions_for_display(symbol)
# Get REAL predictions from orchestrator
if hasattr(self.orchestrator, 'recent_dqn_predictions'):
predictions.extend(list(self.orchestrator.recent_dqn_predictions.get(symbol, [])))