4.3 KiB
4.3 KiB
Trading System - Launch Modes Guide
Overview
The unified trading system now provides clean, modular launch modes optimized for scalping and multi-timeframe analysis.
Available Modes
1. Test Mode
python main_clean.py --mode test
- Tests enhanced data provider with multi-timeframe indicators
- Validates feature matrix creation (26 technical indicators)
- Checks data provider health and caching
- Use case: System validation and debugging
2. CNN Training Mode
python main_clean.py --mode cnn --symbol ETH/USDT
- Trains CNN models only
- Prepares multi-timeframe, multi-symbol feature matrices
- Supports timeframes: 1s, 1m, 5m, 1h, 4h
- Use case: Isolated CNN model development
3. RL Training Mode
python main_clean.py --mode rl --symbol ETH/USDT
- Trains RL agents only
- Focuses on 1s scalping data
- Optimized for short-term decision making
- Use case: Isolated RL agent development
4. Combined Training Mode
python main_clean.py --mode train --symbol ETH/USDT
- Trains both CNN and RL models sequentially
- First runs CNN training, then RL training
- Use case: Full model pipeline training
5. Live Trading Mode
python main_clean.py --mode trade --symbol ETH/USDT
- Runs live trading with 1s scalping focus
- Real-time data streaming integration
- Use case: Production trading execution
6. Web Dashboard Mode
python main_clean.py --mode web --demo --port 8050
- Enhanced scalping dashboard with 1s charts
- Real-time technical indicators visualization
- Scalping demo mode with realistic decisions
- Use case: System monitoring and visualization
Key Features
Enhanced Data Provider
- 26 Technical Indicators including:
- Trend: SMA, EMA, MACD, ADX, PSAR
- Momentum: RSI, Stochastic, Williams %R
- Volatility: Bollinger Bands, ATR, Keltner Channels
- Volume: OBV, MFI, VWAP, Volume profiles
- Custom composites for trend/momentum
Scalping Optimization
- Primary timeframe: 1s (falls back to 1m, 5m)
- High-frequency decision making
- Precise buy/sell marker positioning
- Small price movement detection
Memory Management
- 8GB total memory limit with per-model limits
- Automatic cleanup and GPU/CPU fallback
- Model registry with memory tracking
Multi-Timeframe Architecture
- Unified feature matrix: (n_timeframes, window_size, n_features)
- Common feature set across all timeframes
- Consistent shape validation
Quick Start Examples
Test the enhanced system:
python main_clean.py --mode test
# Expected output: Feature matrix (2, 20, 26) with 26 indicators
Start scalping dashboard:
python main_clean.py --mode web --demo
# Access: http://localhost:8050
# Shows 1s charts with scalping decisions
Prepare CNN training data:
python main_clean.py --mode cnn
# Prepares multi-symbol, multi-timeframe matrices
Setup RL training environment:
python main_clean.py --mode rl
# Focuses on 1s scalping data
Technical Improvements
Fixed Issues
✅ Feature matrix shape mismatch - Now uses common features across timeframes
✅ Buy/sell marker positioning - Properly aligned with chart timestamps
✅ Chart timeframe - Optimized for 1s scalping with fallbacks
✅ Unicode encoding errors - Removed problematic emoji characters
✅ Launch configuration - Clean, modular mode selection
New Capabilities
🚀 Enhanced indicators - 26 vs previous 17 features
🚀 Scalping focus - 1s timeframe with dense data points
🚀 Separate training - CNN and RL can be trained independently
🚀 Memory efficiency - 8GB limit with automatic management
🚀 Real-time charts - Enhanced dashboard with multiple indicators
Integration Notes
- CNN modules: Connect to
run_cnn_training()
function - RL modules: Connect to
run_rl_training()
function - Live trading: Integrate with
run_live_trading()
function - Custom indicators: Add to
_add_technical_indicators()
method
Performance Specifications
- Data throughput: 1s candles with 200+ data points
- Feature processing: 26 indicators in < 1 second
- Memory usage: Monitored and limited per model
- Chart updates: 2-second refresh for real-time display
- Decision latency: Optimized for scalping (< 100ms target)