A trader ran an EA on EURUSD for six months. Steady 18% return. He decided to go bigger and put the same EA on XAUUSD without changing anything.
Day one: down 3%. Day two: down another 4%. Day three: NFP dropped, the account lost 11% in an hour. One week later, six months of forex profit was gone.
He asked us: "I didn't touch the parameters. Why doesn't it work on gold?"
Because gold isn't forex. Same platform, completely different instrument. Using forex parameters on gold is like driving a sedan's settings on a truck. The physics are different.
Gold vs forex: the numbers that matter
| EURUSD | XAUUSD | |
|---|---|---|
| Average daily range | 60–80 pips | 200–500 pips |
| Normal ECN spread | 0.8–1.5 pips | 15–30 pips |
| Off-hours spread | 2–3 pips | 30–50 pips |
| Pip value (standard lot) | $10 | $10 |
| Margin requirement | Lower | 2–3x higher than forex |
Gold moves 3–5x as much as EURUSD daily. A 30-pip stop loss on EURUSD gives the trade room to breathe. On gold, 30 pips is normal market noise, and your stop gets hit repeatedly by routine fluctuations.
The spread cost is different too. Every gold trade starts 15–30 pips in the red. A scalping EA that profits 5 pips on EURUSD can't even cover the spread on gold.
And the drivers are different. EURUSD depends mostly on relative US and European economic strength. Gold responds to Fed rate policy, real yields, the dollar index, inflation expectations, geopolitical risk, and central bank purchasing. Any of these can produce violent moves with minimal warning.
Why forex EAs fail on gold
It's not the strategy logic. It's the parameter-to-instrument mismatch.
The stop loss is too tight. A 30-pip stop on EURUSD is reasonable. On gold, a normal pullback is 50–80 pips. Your EA stops out on market noise eight times out of ten, not because it read the direction wrong, but because the stop didn't account for gold's breathing range.
The position size is too large. Your EA calculates 0.67 lots for 2% risk with a 30-pip stop on EURUSD. Same parameters on gold: still 0.67 lots, still 30-pip stop. But gold can move 100+ pips any minute. Your actual risk is far above 2%.
Trading frequency is wrong. Gold has thin liquidity during Asian hours with wide spreads. A forex EA that trades around the clock will generate losing trades during sessions where gold shouldn't be traded at all.
No news filter. Forex EAs can sometimes survive without one because movements around data releases are relatively contained. Gold's reaction to Fed speeches, CPI, and NFP is violent. A gold EA without news filtering is taking unnecessary risk every month.
How to adapt your EA for gold
You don't need to build from scratch. Four adjustments make most forex EAs survivable on gold.
Use ATR-based stop losses
Fixed pip stops don't work on gold because volatility changes dramatically day to day. Quiet days might average 150 pips of range. Volatile days hit 600+.
Use ATR (Average True Range) on H1 or H4 with a 14-period lookback. Set stop loss at 1.5–2x ATR.
Example: H4 ATR(14) reads 180 pips. Your stop loss is 270–360 pips. That sounds huge compared to forex, but it's the breathing room gold actually needs. Anything tighter gets swept by routine price action.
In your EA code, replace the fixed stop loss input with an ATR multiplier. Most MQL4/MQL5 frameworks support this with minimal changes.
Scale position size down
Wider stops require smaller positions to maintain the same risk percentage.
The formula is the same as forex: Lot size = Risk amount / (Stop loss pips × Pip value)
$10,000 account, 2% risk ($200), 300-pip stop, $10 per pip (standard lot): Lot size = 200 / (300 × 10) = 0.067 lots
That's 0.07 lots. Compared to the 0.4 lots you might trade on EURUSD, it feels tiny. But gold moving 200 pips at 0.07 lots = $140 profit, which is 1.4% of the account. An average day producing more than 1% return is plenty. Use the position size calculator to run these numbers for your specific setup.
Add session filters
Gold isn't equally tradeable around the clock.
Best window: the London-New York overlap (roughly 12:00–16:00 UTC). Tightest spreads, deepest liquidity, strongest directional moves.
Good window: London open (07:00–10:00 UTC). London is the world's largest physical gold trading hub. Directional breakouts often start here.
Avoid: the late-night/early-morning dead zone (roughly 21:00–00:00 UTC). Liquidity is thin, spreads are wide, and price tends to chop in a narrow range before suddenly spiking. Stop losses get hunted. Set your EA's time filter parameters to only open positions during active sessions.
News filter is mandatory, not optional
Gold without a news filter is asking for trouble.
At minimum, filter these events: Fed rate decisions, NFP, CPI, PPI, Fed Chair speeches, and major geopolitical developments. Pause 30 minutes before and 30–60 minutes after for gold. Gold takes longer than forex to digest data, and the volatility tail is longer. Our news filter guide covers the full setup.
Strategies that actually work on gold
Not every approach translates. These three have proven track records on XAUUSD.
London breakout strategy. Gold consolidates in a narrow range during Asian hours, then breaks out when London volume arrives. Mark the Asian session high and low (roughly 22:00–07:00 UTC). When price breaks the range after London opens, enter in the breakout direction. Stop loss on the opposite side of the range. Take profit at 1.5–2x the stop distance. Win rate around 45–50%, but the risk-reward ratio makes it positive expectancy. We run a version of this in several of our gold EAs.
Asian session mean reversion. During the quiet Asian hours, gold oscillates within a tight range. Use RSI below 25 for long entries, above 75 for short entries. Target 50–80 pips, stop 80–100 pips. The critical rule: close everything before London opens regardless of P&L. Once London volume arrives, a trend can start that crushes mean reversion positions.
Wide trailing stop trend following. When gold trends, it trends hard. February to April 2024: gold rallied from $2,000 to $2,400. Corrections happened, but the direction was clear for months. Use MA crossovers, channel breakouts, or trend line breaks for entries. Set trailing stops at 200–300 pips or 2–3x ATR. Let profits run. The key is not getting shaken out by the 50-pip corrections that happen inside every gold trend.
Gold position management differences
One detail most traders overlook: although XAUUSD pip value is the same $10 per standard lot as forex, the margin requirement is typically 2–3x higher.
On a $10,000 account, a standard lot of EURUSD might require $330 margin (1:30 leverage). A standard lot of XAUUSD might require $1,000+ (1:20 leverage).
This means less available margin. If your EA adds positions (grid or Martingale logic), check the layer limit carefully. Gold's wider swings plus higher margin requirements means you'll hit margin call faster than you expect.
Monitor margin level actively. If it drops below 200%, stop opening new positions.
And consider dropping single-trade risk to 1–1.5% instead of the 2% you might use on forex. Gold's volatility produces more consecutive losing trades, and the lower risk percentage keeps you alive through longer losing streaks. We run our gold signal accounts at 1% per trade for exactly this reason.
Gold in 2025–2026: macro context for EA traders
The current macro environment affects gold EA performance directly.
Central banks are still net buyers. China, Poland, India, and Turkey have purchased record gold quantities over the past two years. This creates a price floor that pure technical analysis can't see. Be cautious with gold shorts.
The rate environment is shifting. The Fed rate cut cycle has implications for gold (lower rates = lower opportunity cost of holding gold = bullish). But market expectations for cuts change constantly, and each shift triggers sharp gold moves.
Geopolitical risk remains elevated. Russia-Ukraine, Middle East tensions, trade frictions — any escalation drives safe-haven demand and can push gold up dozens of dollars in minutes.
Volatility is likely to stay high. Gold's annualized volatility hit multi-year highs in 2024 and probably won't drop meaningfully in 2025–2026. Your EA parameters need to be calibrated for a high-volatility regime. Don't use settings optimized during the low-volatility stretch of 2022.
Recheck ATR-based parameters quarterly. As the market evolves, the stop loss and position size that were appropriate three months ago might no longer fit.
FAQ
Can I run the same EA on EURUSD and XAUUSD simultaneously?
Yes, but with completely separate parameter sets. Gold needs wider stops, smaller positions, stricter session filters, and a news filter. Don't share parameters between the two. Also watch total risk exposure — if both positions are open simultaneously, combined risk shouldn't exceed 3% of the account. We cover multi-EA setup in our portfolio diversification guide.
What timeframe works best for gold EAs?
H1 and H4 are the standard. Anything below M15 is too noisy on gold, and spread costs eat too much of the profit margin. Daily charts work for swing approaches but require larger capital and stronger psychological endurance. Start with H1.
What should I watch for when backtesting a gold EA?
Use real tick data. Gold's volatility means the gap between simulated and real tick backtests is even larger than on forex. Cover at least 2–3 years including different regimes. Pay special attention to max drawdown and consecutive losses, both of which will be significantly worse on gold than on forex. If you can't tolerate the backtest report's worst numbers, don't go live.
How much capital do I need for a gold EA?
Minimum $5,000 recommended. Gold's wide stops and small position requirements mean that even 0.01 lots might exceed reasonable risk ratios on a $1,000 account. If your capital is under $5,000, demo trade first and scale up when you can afford proper position sizing.
About the author: The FXTool team builds and tests MetaTrader trading tools daily. We run every EA we sell on live accounts and publish the results. This guide reflects what we've learned from building 50+ EAs and working with thousands of retail traders.
Forex trading involves significant risk and may result in total loss of capital. This article is for educational purposes only and is not investment advice. Understand the risks and consider your financial situation before trading.