How guzzuga/xauusd-scalper works
This is a command-line XAUUSD scalping application with signal-only, live, and backtest modes. Its main workflow obtains market data, analyzes M1/M5/M15 EMA trends and entry conditions, then presents and logs signals; live mode also applies trade checks and execution handling. The excerpts show MT5 connectivity and optional Telegram alerts. Some mode details and settings wiring are not fully shown, so the graph omits unverified links rather than inferring them.
Main entry points: main.py CLI application · trading_agent.py Trading agent · mt5_connector.py MT5 connector · ema_strategy.py Timeframe analyzer
Components 16
Runtime orchestration
- CLI application
main.py - Trading settings
config/settings.py
Market data
- Live data feed
src/mt5_connector.py - MT5 connector
src/mt5_connector.py - MetaTrader 5
Signal strategy
- Timeframe analyzer
src/ema_strategy.py - EMA and entry analysis
src/ema_strategy.py
Trade management
- Trading agent
src/trading_agent.py - Risk manager
src/trading_agent.py - Signal filter
src/trading_agent.py
Monitoring and alerts
- Signal dashboard
src/signal_dashboard.py - Signal logger
src/signal_dashboard.py - Signal log files
- Alert manager
src/signal_dashboard.py - Telegram API
Other components
- Operator
Connections 15
- Operator → CLI application: selects mode
README.md - CLI application → MT5 connector: connects
main.py - CLI application → Live data feed: initializes
main.py - Live data feed → MT5 connector: loads candles
src/mt5_connector.py - MT5 connector → MetaTrader 5: requests market data
src/mt5_connector.py - CLI application → Trading agent: processes signals
main.py - Trading agent → Timeframe analyzer: analyzes prices
src/trading_agent.py - Timeframe analyzer → EMA and entry analysis: evaluates EMAs
src/ema_strategy.py - Trading agent → Risk manager: checks trade risk
src/trading_agent.py - Trading agent → Signal filter: filters signals
src/trading_agent.py - CLI application → Signal dashboard: displays status
main.py - CLI application → Signal logger: logs signals
main.py - Signal logger → Signal log files: writes entries
src/signal_dashboard.py - CLI application → Alert manager: sends alerts
main.py - Alert manager → Telegram API: sends message
src/signal_dashboard.py