From 41623117f8cfd7fcceb7c4389cde4d9411747fb7 Mon Sep 17 00:00:00 2001 From: Dobromir Popov Date: Sat, 22 Nov 2025 21:16:49 +0200 Subject: [PATCH] fx --- ANNOTATE/web/app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ANNOTATE/web/app.py b/ANNOTATE/web/app.py index cf23b4c..80e2ac0 100644 --- a/ANNOTATE/web/app.py +++ b/ANNOTATE/web/app.py @@ -538,9 +538,6 @@ class AnnotationDashboard: engineio_logger=False ) self.has_socketio = True - # Pass socketio to training adapter for live trade updates - if self.training_adapter: - self.training_adapter.socketio = self.socketio logger.info("SocketIO initialized for real-time updates") except ImportError: self.socketio = None @@ -590,7 +587,8 @@ class AnnotationDashboard: # Use REAL training adapter - NO SIMULATION! self.training_adapter = RealTrainingAdapter(None, self.data_provider) # Pass socketio to training adapter for live trade updates - self.training_adapter.socketio = None # Will be set after socketio initialization + if self.has_socketio and self.socketio: + self.training_adapter.socketio = self.socketio # Backtest runner for replaying visible chart with predictions self.backtest_runner = BacktestRunner()