Tarea técnica
Project Title:
Automated Trading Bot for XAUUSD on MetaTrader 5 (MT5)
1. General Objective
Develop a fully automated trading bot for XAUUSD (Gold vs USD) that is profitable, with a controlled drawdown, and an average monthly return target of at least 5%.
The bot must operate autonomously under strict risk management rules and be optimized and validated through robust backtesting (OHLC and Real Tick data).
2. Platform
-
Platform: MetaTrader 5 (MT5)
-
Data mode for testing: OHLC and Real Tick (both required for validation)
3. Trading Instrument
-
Symbol: XAUUSD (Gold/USD)
-
Timeframe: Developer to determine based on best performance (M15, H1, H4, etc.)
-
Session: 24/5
4. Strategy Framework
The developer is free to propose any trading strategy, as long as it is consistently profitable and demonstrates stability over historical data.
All strategies must include clear entry and exit rules with mandatory Stop Loss (SL) and Take Profit (TP) levels for every trade.
5. Risk & Money Management
-
Automatic lot size calculation:
-
Risk per trade = 1% of account balance
-
Position sizing automatically adjusted based on SL distance and equity
-
-
Maximum trades per day: 2 trades
-
Stop Loss (SL): Mandatory, dynamically calculated (e.g., ATR or recent swing levels)
-
Take Profit (TP): Mandatory, minimum 1:2 risk/reward ratio (configurable)
-
Trailing Stop: Optional and configurable
-
Daily loss limit: Optional (stop trading if daily drawdown exceeds a threshold)
6. Profitability & Drawdown Targets
-
Minimum monthly ROI: +5%
-
Maximum allowable drawdown: ≤25%
-
Win rate goal: ≥60% (depending on RR ratio)
The developer must ensure the bot is objectively profitable in both backtesting and forward testing, under realistic trading conditions.
7. Backtesting & Optimization
-
Test using both OHLC and Real Tick data in MT5.
-
Backtest period: Minimum of 3 years of historical data.
-
Provide detailed reports including:
-
Net profit %
-
Maximum drawdown %
-
Profit factor
-
Sharpe ratio
-
Win rate
-
Average RR ratio
-
-
Include optimized input parameters and .set configuration files.
9. Safety Features
-
Emergency stop: Automatically halts trading if drawdown exceeds a set threshold (e.g., 15%).
-
High-impact news filter: Optional future feature.
10. Deliverables
-
Fully functional .ex5 and .mq5 files
-
Source code (.mq5)
-
Backtest reports (HTML) for OHLC and Real Tick modes
-
Optimized .set parameter files
-
User manual explaining parameters, installation, and usage
11. Key Requirement
The bot must be demonstrably profitable on XAUUSD with Real Tick data backtesting over at least 3 years, maintaining an acceptable drawdown and stable performance.
Developer is free to use any profitable trading logic, as long as the final system meets the above profitability and robustness criteria.