How murad24-cuper/tradingbot-server works
XM MT5 Trading Bot is a single-owner, locally run trading system with a localhost dashboard. Its main workflow scans discovered broker symbols, filters and analyzes movers, applies trade and risk rules, and manages orders through the local MT5 terminal; SQLite records decisions and trades. Separate product branches provide dashboard-based monitoring and queued controls, historical backtesting, and research/brain evaluation. The README documents the workflow and capabilities; many implementation files were not sampled, so only documented relationships are shown.
Main entry points: bot.py Bot runtime · app.py Trading dashboard · engine.py Backtest simulator · scanner.py Symbol scanner
Components 19
Live trading
- Bot runtime
src/bot.py - Symbol scanner
src/scanner.py - Trade and risk rules
src/risk.py - Order execution
src/executor.py - Trade records
src/db.py
Market analysis
- Broker market data
src/market_data.py - Technical indicators
src/indicators.py - Signal strategies
src/strategies
Dashboard
- Trading dashboard
src/dashboard/app.py - Dashboard queries
src/dashboard/queries.py - Settings editor
src/dashboard/settings_editor.py - Queued bot commands
src/commands.py
Research
- Backtest simulator
src/backtest/engine.py - Backtest reports
src/backtest/report.py - Brain evaluation
src/brain - Historical time machine
src/research/time_machine.py - Historical market data
src/history.py
Other components
- Bot owner
- Local MT5 terminal
Connections 21
- Bot owner → Bot runtime: starts and controls
README.md - Bot runtime → Symbol scanner: scans symbols
README.md - Symbol scanner → Broker market data: checks market data
README.md - Symbol scanner → Signal strategies: analyzes movers
README.md - Bot runtime → Trade and risk rules: filters entries
README.md - Bot runtime → Order execution: manages orders
README.md - Order execution → Local MT5 terminal: sends orders
README.md - Bot runtime → Trade records: records decisions and trades
README.md - Broker market data → Local MT5 terminal: gets broker data
README.md - Signal strategies → Technical indicators: uses indicators
src/strategies/research_families.py - Bot owner → Trading dashboard: monitors and controls
README.md - Trading dashboard → Dashboard queries: reads dashboard data
src/dashboard/app.py - Trading dashboard → Settings editor: edits settings
src/dashboard/app.py - Trading dashboard → Queued bot commands: queues commands
README.md - Trading dashboard → Trade records: reads trade records
src/dashboard/app.py - Backtest simulator → Broker market data: simulates market data
src/backtest/engine.py - Backtest simulator → Trade and risk rules: applies risk checks
src/backtest/engine.py - Backtest simulator → Signal strategies: evaluates strategies
src/backtest/engine.py - Backtest reports → Backtest simulator: reports results
- Brain evaluation → Historical market data: uses historical data
- Historical time machine → Historical market data: reads historical paths
src/research/time_machine.py