Specifiche
Pair: XAUUSD
Timeframe: M1
Platform: MetaTrader 5
Project Overview
I need a fully automated MT5 Expert Advisor (EA) that trades XAUUSD on the M1 timeframe using a combination of RSI Divergence and 5 EMA trend filter. The EA should handle trade execution, risk management, and position management automatically, without manual intervention.
Trading Strategy Logic
1. Indicators
-
RSI Divergence
-
Logic similar to common TradingView RSI Divergence indicators
-
Detect bullish divergence and bearish divergence
-
-
5 EMA
-
Used as a trend/filter condition
-
2. Buy Conditions
-
Bullish RSI divergence is confirmed
-
Price is above 5 EMA
-
Entry on candle close confirmation
3. Sell Conditions
-
Bearish RSI divergence is confirmed
-
Price is below 5 EMA
-
Entry on candle close confirmation
Risk & Trade Management
-
Fixed or percentage-based risk per trade (input parameter)
-
Automatic lot size calculation based on risk
-
Configurable Stop Loss and Take Profit
-
Option for Risk:Reward = 1:1 (input-based
-
No martingale, no grid
General Requirements
-
Fully automated (24/5 operation)
-
Clean, well-structured MQL5 code
-
All key values should be input parameters
-
RSI period
-
EMA period (default 5)
-
Risk %
-
SL / TP
-
-
No repainting logic
-
Must work smoothly on M1 XAUUSD
Deliverables
-
MT5 Expert Advisor (.ex5 + source code if possible)
-
Instructions on how to install and use
-
Basic backtest / explanation of logic
Optional (Nice to Have)
-
Trading time filter (London / NY sessions)
-
News filter (optional)
-
Simple on-chart stats (win/loss, RR, trades count)
Important Note
This EA must strictly follow the defined strategy and should not add extra filters or logic unless discussed.