How to Reduce Drawdown in XAUUSD M15 EAs? - page 5

Tepatip Pongkaew #:
Hi,

Good questions. Gold on M15 can be brutal on drawdown if your risk doesn't adapt to its volatility. Here's what has worked for me:

1. Risk management
- Use ATR-based stops instead of fixed points. Gold's daily range can double from one week to the next, so a fixed SL is too tight in some weeks and too loose in others.
- Add an equity circuit breaker: a daily loss limit, plus a max drawdown level where the EA stops trading or cuts risk in half.
- Limit the number of open positions and avoid grid/martingale. Most of the big XAUUSD drawdowns I've seen come from adding to losing trades.

2. Fixed lot vs percentage
I use fixed lot in backtesting to judge the edge itself, then percentage risk calculated from the SL distance in live trading, usually 0.5–1% per trade. With ATR stops, this keeps the money at risk constant even when the stop size changes.

3. Filtering high volatility
- ATR filter: skip new entries when the current ATR is well above its average (e.g. more than 1.5–2x).
- Max spread filter, because gold spreads widen a lot around rollover and during news.
- Session filter: I avoid the rollover hour and focus on the London and New York sessions.

4. News
Yes. I pause new entries around high-impact USD news (NFP, CPI, FOMC), roughly 30 minutes before until 30–60 minutes after. The built-in MQL5 Economic Calendar functions make this easy to automate. One catch: they don't return data in the Strategy Tester, so you need to save the calendar history to a file if you want your backtest to behave like live trading.

Hope this helps. Good luck with your EA!

@Tepatip Pongkaew

Very clear summary, thanks. The ATR filter at 1.5-2x the average is a good rule, I will test it on my side.

On the equity circuit breaker, one detail that caught me: the daily reset time. Many prop firms reset the daily loss at a fixed time zone (often midnight CE(S)T), not at the broker’s server midnight. If the EA resets on server time, the “daily” window can be shifted by 1-2 hours, and the lock protects the wrong day. I now read the reset hour as an input and check equity including floating P/L, not only closed trades.

Also agree on saving the calendar history to a file for the tester. Without it, a news filter looks perfect in live and does nothing in the backtest.

Question: for the max drawdown level, do you measure it from the starting balance or from the highest equity (trailing)?

Best regards
Youness