Hello, I want to develop a custom MT5 Expert Advisor (EA) for XAUUSD Gold.
IMPORTANT:
I want a proper rule-based automated trading EA, NOT a martingale, grid or guaranteed-profit bot.
1. MARKET & TIMEFRAME
- Platform: MT5
- Symbol: XAUUSD only
- Main trend timeframe: M15
- Entry timeframe: M5
- Must support broker suffixes such as XAUUSDm, XAUUSD., etc.
2. TREND RULE
BUY trend:
- M15 price above EMA 50
- EMA 50 above EMA 200
- Higher High / Higher Low structure preferred
SELL trend:
- M15 price below EMA 50
- EMA 50 below EMA 200
- Lower High / Lower Low structure preferred
If trend is unclear = NO TRADE.
3. ENTRY RULE
After M15 trend confirmation, look for entry on M5.
BUY:
- M5 pullback toward EMA 20/50
- Support/rejection
- Bullish confirmation candle
- Break above confirmation candle high
- Spread within allowed limit
- Then BUY
SELL:
- M5 pullback toward EMA 20/50
- Resistance/rejection
- Bearish confirmation candle
- Break below confirmation candle low
- Spread within allowed limit
- Then SELL
At least 3 confirmations should be present. Otherwise NO TRADE.
4. RSI FILTER
- RSI period = 14
- BUY preferably RSI 50–70
- SELL preferably RSI 30–50
- RSI must NOT be the only entry signal.
5. STOP LOSS
Default:
- Structure-based SL using recent M5 swing
- Add ATR(14) safety buffer
Options:
- Structure SL
- ATR SL
- Fixed points
6. TAKE PROFIT
Default Risk:Reward = 1:2
User-selectable:
1:1
1:1.5
1:2
1:3
7. BREAK EVEN
When trade reaches approximately +1R:
- Move SL to break-even + small buffer
- ON/OFF option
8. TRAILING STOP
- ATR-based trailing stop
- Default OFF
- ON/OFF option
9. RISK MANAGEMENT
Default risk per trade = 1%
Maximum selectable = 2%
Lot size must automatically calculate according to:
Account Equity + Risk % + SL distance.
Also provide:
- Risk %
- Fixed Lot
- Fixed Money Risk
10. DAILY LOSS PROTECTION
Default maximum daily loss = 2%.
When daily loss limit is reached:
- Stop opening new trades
- Resume on next trading day
Floating loss handling should be configurable.
11. MAXIMUM TRADES
Default = 2 trades per day.
User-selectable:
1 / 2 / 3 / 5
Maximum simultaneous XAUUSD positions = 1 by default.
12. CONSECUTIVE LOSS PROTECTION
Default:
After 2 consecutive losing trades:
STOP trading for the rest of the day.
ON/OFF option.
13. SPREAD FILTER
EA must NOT trade when XAUUSD spread is above the user-defined maximum.
Maximum Spread must be an input parameter.
14. NEWS FILTER
High-impact news filter required.
Default:
- Stop opening trades 15 minutes before major news
- Remain stopped 15–30 minutes after major news
ON/OFF option.
If possible, use MT5 Economic Calendar instead of an external API.
15. TRADING SESSION
Trading time must be configurable.
Prefer London + New York sessions.
User must be able to change:
- Start time
- End time
Clearly handle broker server time.
16. MARKET PROTECTION
Do not open new trades during:
- Excessive spread
- Extremely large candle
- Extreme volatility spike
- Invalid/very large SL
- Invalid/tiny SL
- Market closed
- Outside trading session
- Daily loss limit reached
- Maximum trades reached
- Consecutive loss limit reached
- News filter active
17. MAX LOT PROTECTION
User-selectable maximum lot.
Default example:
MaxLot = 0.50
EA must never exceed this maximum.
18. EXECUTION PROTECTION
Include slippage/execution protection.
If execution price deviation is too large, reject the trade.
19. DUPLICATE TRADE PROTECTION
One signal must not create multiple duplicate trades.
20. MAGIC NUMBER
Use a unique Magic Number for this EA.
Example:
XAU_SMART_001
EA must manage only its own trades.
21. MANUAL TRADE PROTECTION
EA must NOT modify or close my manually opened trades.
Only trades opened by this EA should be managed.
22. MT5 DASHBOARD
Show on chart:
- EA ON/OFF
- Current Trend
- Account Balance
- Equity
- Risk %
- Current Lot
- Today's P/L
- Today's Trades
- Daily Loss %
- Current Spread
- Current Position
- SL
- TP
- News Filter
- Trading Session
- Remaining Trades
23. INPUT SETTINGS
All important parameters must be available in MT5 Inputs, including:
RiskPercent
MaxDailyLoss
MaxTradesPerDay
MaxConsecutiveLosses
EMA 20
EMA 50
EMA 200
RSI Period
ATR Period
RiskReward
BreakEven ON/OFF
TrailingStop ON/OFF
NewsFilter ON/OFF
TradingStartTime
TradingEndTime
MaxSpread
MaxLot
24. BACKTEST
Before delivery, perform at least 2–3 years of XAUUSD historical backtesting.
Test:
- Trending markets
- Sideways markets
- High volatility
- Low volatility
- Major news periods
25. BACKTEST REPORT
Provide:
- Total Trades
- Winning Trades
- Losing Trades
- Win Rate
- Profit Factor
- Maximum Drawdown
- Average Win
- Average Loss
- Largest Win
- Largest Loss
- Consecutive Wins
- Consecutive Losses
- Monthly Results
- Starting Balance
- Ending Balance
26. DEMO FORWARD TEST
After backtesting, the EA must be tested on a Demo account for at least 2–4 weeks before real-money use.
27. FILES REQUIRED
I need:
- .mq5 source code
- .ex5 compiled file
- Preset/settings files
- Installation instructions
- Backtest report
I also want the source code, not only the compiled EX5.
28. STRICTLY PROHIBITED
DO NOT use:
- Martingale
- Grid
- Loss recovery by increasing lot size
- Unlimited trades
- Unlimited averaging
- Guaranteed profit system
No guaranteed profit claims.
29. DEVELOPMENT APPROACH
My budget is around ₹10,000–₹15,000 initially.
Please give me:
1. Total development cost
2. Development time
3. What features are included
4. Backtesting details
5. Demo testing support
6. Whether source code is included
7. Any future maintenance cost
I prefer milestone-based payment rather than paying 100% upfront.
IMPORTANT:
The main priority is capital protection and controlled risk, not unrealistic daily profit.
Please confirm that you understand all requirements and send me your quotation before starting development.