
Gold-euro statistical arbitrage - unlimited build with full source
USDT-TRC20 · Alipay (CNY equivalent) · File download delivery
King Arb is a market-neutral statistical-arbitrage EA for gold (XAUUSD) and the euro (EURUSD). It does not predict direction. It builds an equal-weight USD common factor from gold, silver and the euro, removes that factor to isolate each instrument's idiosyncratic residual, and trades the mean-reversion of the cumulative residual gap (zres_XAU minus zres_EUR) on M15. Silver only feeds the factor and is never traded, which keeps trading costs low. Gold and the euro are held together as a hedged two-leg spread: the EA enters when the residual gap is stretched (long one leg, short the other) and exits as the gap reverts.
.ex5 in the archive was compiled from the .mq5 in the same archive (Result: 0 errors, 0 warnings) — recompile it yourself to verifyTickmill MT5, every tick based on real ticks (model 4), 10,000 USD, 2025.01 to 2026.06, commission (6 USD per lot round-turn) and real spreads included:
This is a single 1.5-year sample that contains one historic anti-USD move. Past performance does not guarantee future results. Always re-run the test on your own broker's data before going live.
InpXAU / InpXAG / InpEURLotsXAU is the single leverage knob — about 0.10 per 10,000 USD, scaled linearly. Everything else ships pre-optimized; do not change the Signal group.USDFactorResidualArb.ex5 — ready-to-run unlimited buildUSDFactorResidualArb.mq5 — full MQL5 sourceREADME.txt — compile steps, requirements and risk notes (EN/ZH)This strategy's edge is regime-dependent: strongest in anti-USD / rising-gold regimes, weaker in a sustained strong-dollar regime. Leveraged trading carries a high risk of losing your entire capital. Trade only with money you can afford to lose, start at the minimum lot, and forward-test on a demo account for one to two months first. Nothing on this page is investment advice.
Same EA, same .set, two different equity curves. We isolated the chart timeframe in a controlled test: 60× the bar count, and every figure in both reports came back identical. The variables that actually move the number are elsewhere — ranked by impact, with our own measured data.
Gold (XAUUSD) spreads are wide and variable, and most gold EAs are high-frequency scalpers — extremely spread-sensitive. This breaks down the true cost of a trade and explains why a pretty backtest shrinks live.
Gold is the most popular and the most punishing symbol for EAs. Here are 5 criteria, plus how our gold EAs differ and who each fits.
MT5 is better on backtest accuracy, multi-asset and performance — and it's the future for EAs. The differences, and how to choose by the EA you want.

Tuned for a $500 account · XAUUSD · verified on real ticks across 2025 and 2026 YTD

Statistical gold pin-catch scalper - 5 account licences, issued instantly