Quant-FX

Custom Gold (XAUUSD) EA Development

Gold is the market where most Expert Advisors break. Spreads widen without warning, price jumps on US data, and every broker sets its own stops-level and contract size. We build custom XAUUSD EAs for MetaTrader 5 and MetaTrader 4 that handle those conditions in code, because gold is the core market of our own strategies.

What a gold EA needs that an FX EA doesn't

Spread checks before every order
The EA reads the live spread and skips or delays entries when it is wider than your limit, instead of paying a spike at the London open or around news.
Broker stops-level and freeze-level handling
Stop-loss and take-profit distances are checked against the broker's minimums before sending, so orders are not rejected and stops are not silently moved.
Contract size and lot normalisation
Gold contracts differ between brokers (100 oz, 10 oz, cent accounts). Position sizing reads the symbol's specification so risk per trade stays what you set.
Session and news filters
Trading windows by session, and blackout periods around high-impact US releases such as NFP, CPI and FOMC, where gold moves fastest.
Slippage and requote logic
Deviation limits, retry rules and logging of every fill, so you can see the difference between the price you wanted and the price you got.
Hard risk limits in the code
Stop-loss on every order, daily loss stop and maximum drawdown halt, enforced by the EA itself rather than left to manual monitoring.

How a gold EA project runs

  1. 01

    Specification

    We write up your rules, the sessions you trade and your risk limits, and agree the broker conditions the EA must handle. The quote is fixed against that document.

  2. 02

    Build

    We code the EA in MQL5 or MQL4 with spread, stops-level and contract checks built in, plus clear inputs and logging.

  3. 03

    Real-tick testing

    Gold must be tested on real tick data with variable spreads; fixed-spread tests flatter almost every gold EA. You see the reports.

  4. 04

    Forward test on your broker

    The EA runs on a demo account at your broker, so its spreads, execution and stops-level are tested before real money is involved.

  5. 05

    Handover and support

    Source code, compiled EA, documentation and test reports, with bug-fix support after delivery.

What you receive

  • Full MQL5 or MQL4 source code (.mq5 / .mq4) and the compiled EA
  • The agreed specification, including broker conditions
  • Real-tick strategy tester reports with variable spread
  • Forward-test log from a demo account at your broker
  • A short user guide covering every input
  • Bug-fix support after delivery

Why QuantFX for gold

Gold is our own core market
Our master strategy account trades XAUUSD on MT5. The spread, session and news handling we build for clients is the same we rely on ourselves.
We test to find weaknesses
Variable-spread real-tick tests, walk-forward checks and out-of-sample periods. Most gold EAs look good only on fixed-spread backtests; we tell you if yours is one of them.
Engineering beyond MQL
When a gold strategy needs heavier computation or outside data, we connect the EA to C++ or Python through a DLL or bridge.
No custody, no signals
QUANT-FX INFRASTRUCTURE LTD builds software. The EA runs on your account at your broker; we never hold or manage client money.

Example: our in-house XAUUSD EA

Our own gold EA trades XAUUSD with London and New York session windows, a spread check before every order, a blackout around major US releases, and daily-loss and drawdown limits written into the code.

It runs as our working reference for gold execution. The master account figures, from a broker demo environment, are on the track record page; they are not a forecast for any client EA.

How pricing works

Each gold EA is quoted at a fixed price once the specification is agreed. The price depends on the entry and exit logic, the filters, the trade management and whether you need both MT4 and MT5 versions. You get tested, documented code that you own.

Frequently asked questions

Why do so many gold EAs fail live?
Usually because they were tested with a fixed spread and no slippage, so the backtest ignores the cost spikes that happen on gold at session opens and on news. We test with real ticks and variable spreads, and the EA checks the live spread before trading.
Can the EA work with my broker's gold symbol?
Yes. The EA reads the symbol name, contract size, digits and stops-level from your broker, including suffixed symbols such as XAUUSD.m or GOLD.
Do I own the source code?
Yes. You receive the full .mq5 or .mq4 source code with the compiled EA.
Do you sell a ready-made gold EA?
No. We build custom EAs from your rules. We do not sell or rent off-the-shelf gold robots.
Do you guarantee profits on gold?
No. We build the EA to follow your rules and handle gold's execution conditions properly. Results depend on the strategy and the market, and tested performance does not guarantee future results.

Have a gold strategy you want built as an Expert Advisor? Send the rules and we will come back with a specification and a fixed quote.

Request a quote

Trading leveraged products such as gold CFDs and FX carries a high risk of loss. QuantFX provides software development services only; we do not give investment advice and do not hold or manage client funds.