cob integration wip 2

This commit is contained in:
Dobromir Popov
2025-06-24 18:01:24 +03:00
parent f855ed2cf1
commit 8b85a7275e
8 changed files with 1348 additions and 27 deletions

View File

@ -70,7 +70,7 @@ class IntegratedRLCOBSystem:
try:
logger.info("=" * 60)
logger.info("INTEGRATED RL COB SYSTEM STARTING")
logger.info("🔥 Real-time RL Trading + Dashboard")
logger.info("Real-time RL Trading + Dashboard")
logger.info("=" * 60)
# Initialize trading executor
@ -117,10 +117,7 @@ class IntegratedRLCOBSystem:
simulation_mode = True
# Initialize trading executor
self.trading_executor = TradingExecutor(
simulation_mode=simulation_mode,
mexc_config=mexc_config
)
self.trading_executor = TradingExecutor()
logger.info(f"Trading Executor initialized in {'SIMULATION' if simulation_mode else 'LIVE'} mode")
@ -223,21 +220,21 @@ class IntegratedRLCOBSystem:
# Start RL trader first (this initializes COB integration)
await self.trader.start()
logger.info("RL Trader started")
logger.info("RL Trader started")
# Start dashboard (uses same COB integration)
await self.dashboard.start()
logger.info("COB Dashboard started")
logger.info("COB Dashboard started")
self.running = True
logger.info("🎉 INTEGRATED SYSTEM FULLY OPERATIONAL!")
logger.info("🔥 1B parameter RL model: ACTIVE")
logger.info("📊 Real-time COB data: STREAMING")
logger.info("🎯 Signal accumulation: ACTIVE")
logger.info("💹 Live predictions: VISIBLE IN DASHBOARD")
logger.info("Continuous training: ACTIVE")
logger.info(f"🌐 Dashboard URL: http://{self.dashboard.host}:{self.dashboard.port}")
logger.info("INTEGRATED SYSTEM FULLY OPERATIONAL!")
logger.info("1B parameter RL model: ACTIVE")
logger.info("Real-time COB data: STREAMING")
logger.info("Signal accumulation: ACTIVE")
logger.info("Live predictions: VISIBLE IN DASHBOARD")
logger.info("Continuous training: ACTIVE")
logger.info(f"Dashboard URL: http://{self.dashboard.host}:{self.dashboard.port}")
async def _run_main_loop(self):
"""Main monitoring and statistics loop"""
@ -269,7 +266,7 @@ class IntegratedRLCOBSystem:
"""Print comprehensive integrated system statistics"""
try:
logger.info("=" * 80)
logger.info("🔥 INTEGRATED RL COB SYSTEM STATISTICS")
logger.info("INTEGRATED RL COB SYSTEM STATISTICS")
logger.info("=" * 80)
# RL Trader Statistics
@ -295,7 +292,7 @@ class IntegratedRLCOBSystem:
# Dashboard Statistics
if self.dashboard:
logger.info(f"\n🌐 DASHBOARD STATISTICS:")
logger.info(f"\nDASHBOARD STATISTICS:")
logger.info(f" Active Connections: {len(self.dashboard.websocket_connections)}")
logger.info(f" Server Status: {'RUNNING' if self.dashboard.site else 'STOPPED'}")
logger.info(f" URL: http://{self.dashboard.host}:{self.dashboard.port}")
@ -334,12 +331,12 @@ class IntegratedRLCOBSystem:
# Stop dashboard
if self.dashboard:
await self.dashboard.stop()
logger.info("Dashboard stopped")
logger.info("Dashboard stopped")
# Stop RL trader
if self.trader:
await self.trader.stop()
logger.info("RL Trader stopped")
logger.info("RL Trader stopped")
logger.info("🏁 Integrated system stopped successfully")