Dinesh Biswas #: I think you have to calculate the losses amount, so that you will know the % and reduce the lot size. Then test your EA result at backtest.
I do something similar. I backtest, I read the average consecutive loss count and the maximum consecutive loss count, and then I implement code that minimizes my position size (for futures, 1.00; for spot, 0.01) when average consecutive loss count is exceeded─until another trade closes in profit. Then of course, I backtest again. The whole process is posted in my user Profile.
Volatility-Based Position Sizing : Calculate lot size using Average True Range (ATR) so stop losses expand during high volatility without increasing risk. Tight Hard Stop Loss: Never trade M15 XAUUSD without a hard stop; gold moves rapidly and can blow accounts within minutes. ATR trails to protect gains during extended swings.
2. Fixed Lot vs. Percentage Risk : Percentage Risk Is Far Superior: Dynamic position sizing based on equity (typically 0.5%–1% per trade) automatically scales back risk during drawdowns. Fixed Lot Risks Account Ruin: Equity curves fluctuate rapidly on M15 gold; fixed lot sizes cause disproportionate drawdowns when stop loss distances expand.
3. Filtering High-Volatility Sessions : Use Session Time Filters. Pause entry generation if real-time spread widens or M15 ATR exceeds normal baseline thresholds.
4. Pausing During High-Impact News Events : Yes, Always Filter High-Impact News: Automatically halt algo entry generation 15–30 minutes before and after Tier-1 news events.
I think one thing worth looking at is how the EA handles entries during gold's high-volatility periods. On M15, I've noticed that drawdown can build up quickly when the market starts ranging or making sudden reversals. Have you tried adjusting the risk per trade, adding a volatility filter, or limiting consecutive entries? Also, does your EA use grid or martingale logic, or is it based on individual entries?
bctracyx #: I think one thing worth looking at is how the EA handles entries during gold's high-volatility periods. On M15, I've noticed that drawdown can build up quickly when the market starts ranging or making sudden reversals. Have you tried adjusting the risk per trade, adding a volatility filter, or limiting consecutive entries? Also, does your EA use grid or martingale logic, or is it based on individual entries?
Well said. I trade a single position at a time, and:
I do something similar. I backtest, I read the average consecutive loss count and the maximum consecutive loss count, and then I implement code that minimizes my position size (for futures, 1.00; for spot, 0.01) when average consecutive loss count is exceeded─until another trade closes in profit. Then of course, I backtest again. The whole process is posted in my user Profile.
For XAUUSD on M15, I’ve found that risk management matters more than trying to avoid every volatile move.... I generally prefer percentage-based risk rather than fixed lots, because gold’s volatility can change significantly. The lot size should be calculated from the stop distance and the chosen risk, so the same percentage of equity is at risk even when market conditions change....
and for volatility, ATR or a similar volatility measure can be useful for both stop placement and position sizing. I also prefer a session/spread filter rather than simply blocking certain hours and.... For news, I wouldn’t automatically stop every time. It depends on the strategy. If the EA is sensitive to spread spikes and slippage, a news filter can make sense; otherwise, completely avoiding news can remove some of the strategy’s best opportunities.
The main thing I’d avoid on gold is increasing lot size just to recover losses. That can make drawdown grow much faster than expected. For an EA, I’d combine risk-based sizing + volatility filter + spread/execution filter + controlled news handling, then validate the whole combination with out-of-sample testing rather than optimizing each filter separately.
Solid approach, and I agree on all four points. Fixed percentage risk keeps position sizing consistent as the account grows, and a daily drawdown cap stops one bad session from turning into a bad week.
I build gold EAs and found the same things matter most. Time and day filters helped a lot, because the spread and volatility spikes around rollover and major news are where most damage happens. A news pause plus a daily loss limit made my EA's drawdown much smoother.
One thing I'd add is a spread filter. On XAUUSD the spread can widen sharply, so skipping entries when it's above a set limit saves a lot of bad fills.
Adding one gold-specific point to what atif said, since I did not see it in the thread: the rollover hour.
On most brokers the XAUUSD spread widens a lot around the daily rollover (the hour around server midnight). An M15 EA that opens a trade or trails a stop in that window can get stopped out by spread alone, not by price.
It also hides in backtests: with a fixed spread or "1 minute OHLC" you never see it. With "Every tick based on real ticks" and real spread, those losses show up.
What I do: no new entries and no stop trailing in the hour around rollover. Small change, but on M15 gold it removes a group of losses that look random but are not.
Adding my two cents as someone who has traded gold for years, manually and with EAs.
The single most dangerous thing on XAUUSD is sizing it like a forex pair. One standard lot is 100 ounces, so a $1 move is $100 per lot. A stop that feels "normal" on EURUSD can mean ten times the dollar risk you intended. Always convert your stop to dollars before the trade: stop distance in dollars x lots x 100 is your real risk.
Second, gold doesn't mean-revert politely. Around CPI, Fed decisions and NFP, spreads can jump from 20 cents to over a dollar and price can gap through a stop. Youness's point on rollover is spot on - I also keep new entries out of that window.
Third, on M15 the Asian session can chop you to pieces: thin liquidity, sudden spikes. If your EA bleeds in Asia, a session filter is worth more than another indicator.
Risk in dollars, ATR-based stops, a daily loss cap, and stay out of news spikes. Boring, but it keeps you in the game.
I think you have to calculate the losses amount, so that you will know the % and reduce the lot size. Then test your EA result at backtest.
Hello,
Below are the steps I am following in my trading.
1. Risk Management Techniques for Gold
Volatility-Based Position Sizing : Calculate lot size using Average True Range (ATR) so stop losses expand during high volatility without increasing risk. Tight Hard Stop Loss: Never trade M15 XAUUSD without a hard stop; gold moves rapidly and can blow accounts within minutes. ATR trails to protect gains during extended swings.
2. Fixed Lot vs. Percentage Risk : Percentage Risk Is Far Superior: Dynamic position sizing based on equity (typically 0.5%–1% per trade) automatically scales back risk during drawdowns. Fixed Lot Risks Account Ruin: Equity curves fluctuate rapidly on M15 gold; fixed lot sizes cause disproportionate drawdowns when stop loss distances expand.
3. Filtering High-Volatility Sessions : Use Session Time Filters. Pause entry generation if real-time spread widens or M15 ATR exceeds normal baseline thresholds.
4. Pausing During High-Impact News Events : Yes, Always Filter High-Impact News: Automatically halt algo entry generation 15–30 minutes before and after Tier-1 news events.
I think one thing worth looking at is how the EA handles entries during gold's high-volatility periods. On M15, I've noticed that drawdown can build up quickly when the market starts ranging or making sudden reversals. Have you tried adjusting the risk per trade, adding a volatility filter, or limiting consecutive entries? Also, does your EA use grid or martingale logic, or is it based on individual entries?
Well said. I trade a single position at a time, and:
Forum on trading, automated trading systems and testing trading strategies
How to Reduce Drawdown in XAUUSD M15 EAs?
Ryan L Johnson, 2026.10.06 13:24
I do something similar. I backtest, I read the average consecutive loss count and the maximum consecutive loss count, and then I implement code that minimizes my position size (for futures, 1.00; for spot, 0.01) when average consecutive loss count is exceeded─until another trade closes in profit. Then of course, I backtest again. The whole process is posted in my user Profile.For XAUUSD on M15, I’ve found that risk management matters more than trying to avoid every volatile move.... I generally prefer percentage-based risk rather than fixed lots, because gold’s volatility can change significantly. The lot size should be calculated from the stop distance and the chosen risk, so the same percentage of equity is at risk even when market conditions change....
and for volatility, ATR or a similar volatility measure can be useful for both stop placement and position sizing. I also prefer a session/spread filter rather than simply blocking certain hours and.... For news, I wouldn’t automatically stop every time. It depends on the strategy. If the EA is sensitive to spread spikes and slippage, a news filter can make sense; otherwise, completely avoiding news can remove some of the strategy’s best opportunities.
The main thing I’d avoid on gold is increasing lot size just to recover losses. That can make drawdown grow much faster than expected. For an EA, I’d combine risk-based sizing + volatility filter + spread/execution filter + controlled news handling, then validate the whole combination with out-of-sample testing rather than optimizing each filter separately.
The lot size should be calculated from the stop distance and the chosen risk...
Exactly. That is covered in my user Profile as well.
We seem to building a valuable consensus for new traders.
Same as everybody else says, reduce your risk way, way down. (and make zero to non profit in a year)
Or you could just stop trading Gold all together, before you lose your whole account.