Market · XAUUSD

XAUUSD gold EA development

Gold moves differently from currency pairs: wider and more variable spreads, sharp moves around US data, and contract specifications that change from broker to broker. EAs that ignore this blow up on their first busy Friday. I build gold EAs that size, filter and stop with that in mind.

Mutual NDA before you share your strategy · reply within one working day

What gold needs that EURUSD does not
Contract specsContract size and digits vary by broker. Sizing reads them from the symbol, never hard-coded
Spread spikesA maximum-spread filter, because gold spreads widen sharply at opens and on news
US dataBlackout windows around NFP, CPI and FOMC, when gold can move hundreds of points in seconds
VolatilityATR-based stops and sizing, so risk per trade stays constant as volatility changes
GapsAn optional Friday close to avoid weekend gaps
Starting price
$250
Typical delivery
3 days to 2 weeks
Revisions
2 revision rounds
Handover
Full source code + report
Strategies

Gold strategies I build most often.

  1. 01

    Trend-following on M15 to H1

    Moving-average or structure-based trends with ATR stops and trailing exits.

  2. 02

    Session breakouts

    London and New York opening ranges, with spread and volatility filters on the breakout.

  3. 03

    Range and mean reversion

    Fading the edges of the Asian session range, with hard stops and a time exit.

  4. 04

    Grid systems with hard caps

    Only with a maximum number of levels, a basket stop and a daily loss limit. Not suitable for most prop firm accounts.

Example build

A gold EA from the portfolio.

EA · MT5 · XAUUSD M15

XAUUSD trend-filtered grid EA

A grid EA for gold that only adds levels in the direction of an EMA trend filter, with variable lot sizing, a take-profit per grid level and a hard daily loss limit.

PlatformMetaTrader 5 (MQL5)
MarketXAUUSD, M15
Risk controlsLevel cap, basket stop, daily loss limit
DeliveredSource, .set files, tester report, README

Client and strategy details anonymised under NDA.

Grid logic: most prop firms restrict grid and martingale systems, so this build was for personal capital, not a funded account.

Before you automate gold
  • Test on your broker’s own XAUUSD ticks: gold spreads differ a lot between brokers.
  • Size from the stop distance in money, not in pips, because one gold pip means different things at different brokers.
  • Decide what the EA does around US data before it meets one live.
  • If you trade a funded account, rule out grid and martingale logic first.
Questions

Common questions

Which timeframe works best for a gold EA?

It depends on the strategy, not on gold. Lower timeframes pay more spread in proportion to the move, so very short-term gold strategies need a broker with tight spreads to survive costs. That is one of the first things we check in testing.

Can a gold EA run on a prop firm account?

Yes, with the prop-firm guard and without grid or martingale logic. See prop-firm EA development.

My broker calls it GOLD, not XAUUSD. Does that matter?

No. Symbol names and suffixes such as XAUUSD.m or GOLD are handled through an input, and the contract specification is read from the broker.

Do you sell a ready-made gold EA?

No. Every EA is built from your rules and belongs to you. Be careful with off-the-shelf gold EAs that show near-perfect equity curves.

Tell me the strategy. I’ll tell you what it takes.

Fifteen minutes, no pitch. Mutual NDA before you describe anything you care about. You get an honest view of feasibility, timeline and price, even if the answer is “don’t build this”.

WhatsApp