advanced low drawdown ~60 trades/mo

Arbitrage

Arbitrage EAs exploit temporary price discrepancies between related instruments. Latency-sensitive and broker-dependent. Retail variants use statistical correlation rather than pure cross-exchange arbitrage.

Mechanism

Statistical arbitrage monitors the spread between two correlated pairs (e.g. EUR/USD and GBP/USD, or EUR/USD and EUR/GBP). When the correlation-adjusted spread exceeds a threshold, the EA shorts the overpriced instrument and longs the underpriced one, closing when the spread reverts. Latency arbitrage variants exploit price feed delays between brokers — most brokers now prohibit this and detect it via pattern analysis.

Suitability

Statistical arb is legal and broker-neutral; latency arb is restricted at most brokers in this catalogue. Statistical variants work best on EUR/USD vs GBP/USD (correlation 0.90+) and require tight spread accounts. Performance degrades when correlation breaks down during risk events. Suitable for systematic traders comfortable with pairs-trading logic; not recommended as a first EA strategy.

Notes

Arbitrage abandons the question every other strategy asks. A trend EA asks where price is going; a statistical arbitrage EA does not care, and trades the relationship between two instruments instead. When two normally correlated pairs drift apart, it sells the relatively overpriced one and buys the underpriced one, then waits for the relationship — not the market — to return to normal.

That framing is also where the honesty has to start. In the textbook sense arbitrage is a riskless profit from the same thing priced two ways at the same instant, and that version barely exists in retail forex. What is left is a bet that a statistical relationship holds, plus a second, quite different activity — latency arbitrage — that most brokers now prohibit outright. This page covers how the surviving form behaves inside MetaTrader 5: the inputs that decide whether it is solvent, and the failure modes a directional expert advisor never meets. It closes with how to build and stress-test one on the EA Builder before capital is exposed.

How it works: the two arbitrage mechanisms

Two things share the name “arbitrage” in the retail EA market, and they have almost nothing in common except that name.

Statistical arbitrage watches the spread between two correlated instruments. Take EUR/USD and GBP/USD: both carry a long-dollar leg, so they usually move together, and their commonly-cited correlation sits above 0.90 in normal conditions. The EA models the normal relationship — a rolling correlation, a ratio, or a regression of one on the other — and measures how far current prices have deviated from it. When that deviation crosses a threshold, it goes short the leg that has run too far and long the leg that has lagged. Each side is sized so the position stays roughly neutral to the direction both share. The exit is the relationship reverting, not a price target.

Latency arbitrage is a different animal. It exploits the delay between one broker’s price feed and the wider market, entering against a quote that is already stale by the time it is shown. It is not a statistical bet at all — it is a race against a slow feed. Most brokers in this catalogue now prohibit it in their account agreement, detect it through pattern analysis of fill timing, and may void the resulting profit or close the account. It is not a strategy this site treats as viable, and the rest of this page is about the statistical form.

  • Statistical arb — permitted and broker-neutral, edge comes from mean reversion of a relationship, demands tight spreads because the cost is paid on both legs.
  • Latency arb — restricted at most brokers, edge comes from feed delay rather than analysis, fragile to any execution improvement on the broker’s side.

The profit engine of a statistical arb is the reversion of the spread; its loss engine is the moment that relationship stops being a relationship. Because the position is neutral to the direction the two instruments share, an ordinary market move barely touches it — which is why the drawdown profile looks so calm right up until a shock decouples the legs.

Market conditions: when an arbitrage EA wins and when it breaks

The conditions that suit a statistical arb are narrow, and every one of them is about stability rather than opportunity.

ConditionFavourable for statistical arbHostile for statistical arb
CorrelationStable across regimes, both legs driven by the same factorRegime shift decouples the pair; the “relationship” stops existing
VolatilityOrdinary two-sided noise around the relationshipRisk event that moves one leg far harder than the other
Account typeRaw/ECN, commissioned, tight on both legsStandard/Market — the doubled spread exceeds the reversion
Divergence sourceTemporary, flow-driven, no news behind itStructural: a rate decision or shock repricing one currency
Instrument choiceDeep majors sharing a currency legThin crosses where one leg’s spread never normalises

The most expensive misreading is treating every divergence as an opportunity. A spread stretches for two quite different reasons: temporary order flow, which reverts, and a structural repricing, which does not. When a central bank moves one of the two currencies, the two pairs stop describing the same thing. An EA that only sees “the spread is unusually wide” will keep adding to a divergence that has become permanent. The strategy needs a reason to believe the relationship still exists — a filter on the calendar, or on the correlation itself measured live rather than assumed.

Note the asymmetry with a directional strategy: a trend EA loses when the market goes sideways, and a statistical arb loses when the market makes a decisive, one-sided move in exactly one of its legs. They fail in different weather, which is the honest reason to consider one alongside the other rather than as a replacement.

Parameters and settings in MT5

A statistical arbitrage EA exposes its assumptions through a small set of inputs. Every one of them is a statement about the relationship, and the defaults are almost never right for the pair you chose.

InputTypical starting pointWhat it controls
CorrelationPeriodLong enough to span more than one regimeThe lookback used to model the normal relationship; too short and it re-learns the divergence as normal
EntryThresholdA deviation large enough to clear two spreads plus commissionHow far the spread must stretch before both legs are opened
ExitThresholdAt or near the modelled meanWhere the position is closed once the relationship reverts
MaxSpreadPips (per leg)Hard-capped just above the ECN normAborts entry when either leg’s spread makes the round trip unprofitable
HedgeRatio / lot sizingDerived from the two legs’ tick values, not set to 1:1Keeps the pair genuinely neutral rather than nominally equal
MaxHoldingHoursBounded, and shorter than the swap horizonForces an exit on a divergence that is not reverting
MinCorrelationA live floor, checked before each entryBlocks new positions once the relationship itself has weakened

Two inputs decide solvency and are the two most often left at defaults. MaxSpreadPips has to be enforced per leg, because the round trip pays entry and exit on both sides. A normal spread on one leg and a blown-out spread on the other is still an unprofitable trade. The hedge ratio must likewise come from the two legs’ actual tick values rather than from equal lot sizes. On pairs where the quote currency differs, equal lots are not equal exposure, and the “market-neutral” position quietly carries a directional bias.

Three MT5-specific realities are worth flagging before you trust a backtest:

  • Both symbols need real history. A multi-symbol strategy in the MT5 Strategy Tester is only as good as the tick history of every symbol it touches, not just the chart symbol. If the second leg’s history is thin or synthetic, the tester will still produce an equity curve — it just will not mean anything. Download both symbols’ history and test in the every-tick mode based on real ticks.
  • The two legs do not fill simultaneously. Two OrderSend calls are two separate requests. The gap between them is where leg risk lives, and the tester models it far more kindly than a live account does.
  • Swap is a real cost at sixty trades a month. Positions held overnight pay financing on both legs, and the two legs’ swap rates are not symmetric — SymbolInfoDouble(symbol, SYMBOL_SWAP_LONG) and SYMBOL_SWAP_SHORT are the values to read rather than assume. A strategy with a small per-trade edge can hand a meaningful share of it to carry.
  1. Choose two instruments that share a currency leg and measure their correlation over a window containing at least one risk event — not over a calm quarter.
  2. Set the hedge ratio from the two legs’ tick values so the position is neutral in exposure, not merely equal in lots.
  3. Set EntryThreshold above the round-trip cost of both legs (two spreads plus commission), then hard-cap MaxSpreadPips per leg.
  4. Add a live MinCorrelation floor and a MaxHoldingHours bound so a broken relationship is exited rather than averaged into.
  5. Forward-test on demo and log, for every signal, the fill gap between the two legs and the actual spread paid on each — then compare that against what the backtest assumed.

Failure modes: how an arbitrage EA loses money

The losses do not look like a directional strategy’s losses. They are rarer, and they arrive together.

  • Correlation breakdown. A shock reprices one currency and the two pairs stop describing the same thing. Both legs move against the position at once, and because the design assumed neutrality the position size was set as if this could not happen. This is the dominant loss, and it clusters precisely in the events everything else in a portfolio is also suffering.
  • Leg risk on entry or exit. One OrderSend fills and the other is rejected, requoted, or filled materially worse. For as long as that lasts you hold a full-size directional position with none of the intended neutrality. The same exposure appears on the way out if only one leg closes.
  • Cost erosion. The per-trade edge is small and the cost is paid on two legs, roughly sixty times a month. A slippage or spread assumption that is wrong by a fraction of a pip per leg compounds into the whole edge. That is why the execution model and an ECN-type account matter more here than the entry logic does.
  • Threshold fitted to the test window. The entry deviation is optimised on the same data used to model the relationship, so it fits that window’s specific divergences rather than the concept of a divergence. Neighbouring thresholds giving very different results is the tell.
  • Swap and holding time. A divergence that takes weeks to revert pays financing on both legs the whole time, and can end profitable on price yet negative on the account.
  • Restricted-activity clauses. An EA sold as “arbitrage” that is in fact latency-based can have its profits voided or the account closed under the broker’s terms, a loss that appears nowhere in any backtest.

How to build and stress-test an arbitrage EA in mt5depot

You do not need to write MQL5 to assemble the statistical variant. In the no-code builder you construct the same machine: a multi-symbol basket with a deviation-triggered entry on both legs, a per-leg spread abort, a hedge ratio derived from tick values, and a bounded holding time. More usefully, you can attack its assumptions before capital is at stake.

  • Confirm the design is statistical, not latency-based, and that your broker permits it in writing.
  • Measure the correlation over a window containing a real risk event, and record what the deviation did during it.
  • Derive the hedge ratio from both legs’ tick values rather than using equal lots.
  • Set the entry threshold above the round-trip cost of two legs, and cap the spread on each leg independently.
  • Backtest with real tick history for both symbols, then demo-test and log the fill gap and actual spread per leg.
  • Check the strategy’s behaviour when the second leg is rejected — the correct response is to close the filled leg, not to wait.

The reason to build it yourself is that a purchased arbitrage EA hides exactly the numbers that decide the outcome. A vendor curve modelled with simultaneous fills and a fixed spread on both legs looks extraordinarily smooth. In that model the strategy’s two real risks — the fill gap and the doubled cost — do not exist. Reproduce the same logic on your own broker’s spreads and record what actually happens at each fill, and the curve either survives that contact or it does not.

Arbitrage versus a mean-reversion strategy

Statistical arbitrage and mean reversion rest on the same assumption — that a stretched measurement snaps back — applied to different objects. One trades the deviation of a relationship, the other the deviation of a single instrument from its own average. That shared assumption means they also break for the same reason, which is worth knowing before running both.

Statistical arbitrageMean reversion
What is stretchedThe spread between two instrumentsOne instrument versus its own moving average
Directional exposureRoughly neutral by constructionFully directional, counter-trend
Decisive variableCorrelation stability and per-leg costRegime: does the market trend or range
Cost per signalTwo legs, entry and exitOne leg, entry and exit
Fails whenThe relationship stops existingThe market stops ranging and trends
ComplexityAdvanced — pairs logic, hedge ratios, leg riskIntermediate — one instrument, one threshold

Neither is the safer choice in general. Mean reversion carries obvious directional risk and is simpler to reason about. Statistical arbitrage removes most of that directional risk and replaces it with a subtler one: a dependence on a relationship that may simply stop holding. Worse, it tends to fail in the same events that hurt everything else you are holding. Running both is not diversification if both are, underneath, the same bet that something stretched will snap back.

Typical pairs

Where this strategy works best

Related articles

Frequently asked questions

What is an arbitrage EA?
An arbitrage EA trades a relationship between two instruments rather than the direction of one. The retail form is statistical arbitrage: the EA tracks the spread between two correlated pairs, and when that spread stretches beyond a threshold it sells the relatively overpriced leg and buys the underpriced one, closing when the relationship reverts. A second form, latency arbitrage, exploits price-feed delays between brokers — it is a different activity, restricted at most brokers in this catalogue, and not one this site treats as viable.
Is arbitrage trading with an EA risk-free?
No. The textbook version — the same asset priced two ways at the same instant — barely exists in retail forex, and what remains is a bet that a statistical relationship holds. The position is market-neutral in direction, not in risk: when a shock decouples two normally correlated pairs, both legs can move against you at once, and that is precisely when losses cluster. The low drawdown profile of a well-built statistical arb comes from small position-level risk taken very often, not from an absence of risk.
How is statistical arbitrage different from latency arbitrage?
Statistical arbitrage trades a correlation between two instruments on the same broker and is broker-neutral and permitted. Latency arbitrage exploits the delay between one broker's price feed and the wider market, entering against a quote that is already stale. Most brokers now prohibit latency arbitrage explicitly, detect it through pattern analysis of fill timing, and may void the profit or close the account. Confirm which one an EA actually implements before you fund it — the two share a name and nothing else.
Which pairs work for a statistical arbitrage EA?
Pairs with a shared currency leg and a documented, stable relationship — EUR/USD against GBP/USD is the usual starting point because their correlation typically sits above 0.90, and EUR/USD against EUR/GBP is the classic triangular-style construction. The requirement is not a high correlation on one sample but a relationship that stays stable across regimes, because a correlation measured only in calm conditions will break in exactly the event that costs you money.
Why does a spread-sensitive strategy need a Raw or ECN account?
Because every signal pays the cost of entry twice — once on each leg — and the per-trade edge is small by design. A statistical arb EA that opens roughly sixty positions a month is paying that doubled cost sixty times. On a Standard account the spread on both legs can exceed the mean-reversion move the strategy is trying to capture, which turns a positive-expectancy relationship into a negative-expectancy account. The strategy does not become profitable at a wider spread; it becomes a different strategy.
What is leg risk and how do I test for it?
Leg risk is what happens when one side of the pair trade fills and the other does not, or fills materially worse. For the seconds or minutes you hold one leg alone, you have an ordinary directional position at full size, with none of the market-neutrality the design assumed. Test for it by checking what the EA does when the second OrderSend is rejected — a well-built one closes the filled leg immediately rather than waiting for a better price — and by measuring the actual fill gap between the two legs on a demo account rather than assuming simultaneity.