cleanup and reorgnization
This commit is contained in:
37
main.py
37
main.py
@ -51,7 +51,7 @@ async def run_web_dashboard():
|
||||
|
||||
# Initialize core components for streamlined pipeline
|
||||
from core.data_provider import DataProvider
|
||||
from core.enhanced_orchestrator import EnhancedTradingOrchestrator
|
||||
from core.orchestrator import TradingOrchestrator
|
||||
from core.trading_executor import TradingExecutor
|
||||
|
||||
# Create data provider
|
||||
@ -89,26 +89,16 @@ async def run_web_dashboard():
|
||||
training_integration = get_training_integration()
|
||||
logger.info("Checkpoint management initialized for training pipeline")
|
||||
|
||||
# Create streamlined orchestrator with 2-action system and always-invested approach
|
||||
orchestrator = EnhancedTradingOrchestrator(
|
||||
data_provider=data_provider,
|
||||
symbols=config.get('symbols', ['ETH/USDT']),
|
||||
enhanced_rl_training=True,
|
||||
model_registry=model_registry
|
||||
)
|
||||
logger.info("Enhanced Trading Orchestrator with 2-Action System initialized")
|
||||
logger.info("Always Invested: Learning to spot high risk/reward setups")
|
||||
# Create basic orchestrator for stability
|
||||
orchestrator = TradingOrchestrator(data_provider)
|
||||
logger.info("Basic Trading Orchestrator initialized for stability")
|
||||
logger.info("Using Basic orchestrator - stable and efficient")
|
||||
|
||||
# Checkpoint management will be handled in the training loop
|
||||
logger.info("Checkpoint management will be initialized in training loop")
|
||||
|
||||
# Start COB integration for real-time market microstructure
|
||||
try:
|
||||
# Create and start COB integration task
|
||||
cob_task = asyncio.create_task(orchestrator.start_cob_integration())
|
||||
logger.info("COB Integration startup task created")
|
||||
except Exception as e:
|
||||
logger.warning(f"COB Integration startup failed (will retry): {e}")
|
||||
# COB integration not available in Basic orchestrator
|
||||
logger.info("COB Integration not available - using Basic orchestrator")
|
||||
|
||||
# Create trading executor for live execution
|
||||
trading_executor = TradingExecutor()
|
||||
@ -144,10 +134,10 @@ def start_web_ui(port=8051):
|
||||
logger.info("COB Integration: ENABLED (Real-time order book visualization)")
|
||||
logger.info("=" * 50)
|
||||
|
||||
# Import and create the Clean Trading Dashboard with COB integration
|
||||
# Import and create the Clean Trading Dashboard
|
||||
from web.clean_dashboard import CleanTradingDashboard
|
||||
from core.data_provider import DataProvider
|
||||
from core.enhanced_orchestrator import EnhancedTradingOrchestrator # Use enhanced version with COB
|
||||
from core.orchestrator import TradingOrchestrator
|
||||
from core.trading_executor import TradingExecutor
|
||||
|
||||
# Initialize components for the dashboard
|
||||
@ -178,13 +168,8 @@ def start_web_ui(port=8051):
|
||||
dashboard_checkpoint_manager = get_checkpoint_manager()
|
||||
dashboard_training_integration = get_training_integration()
|
||||
|
||||
# Create enhanced orchestrator for the dashboard (WITH COB integration)
|
||||
dashboard_orchestrator = EnhancedTradingOrchestrator(
|
||||
data_provider=data_provider,
|
||||
symbols=config.get('symbols', ['ETH/USDT']),
|
||||
enhanced_rl_training=True, # Enable RL training display
|
||||
model_registry=model_registry
|
||||
)
|
||||
# Create basic orchestrator for the dashboard
|
||||
dashboard_orchestrator = TradingOrchestrator(data_provider)
|
||||
|
||||
trading_executor = TradingExecutor("config.yaml")
|
||||
|
||||
|
Reference in New Issue
Block a user