Skip to content

What is a martingale EA, and why does it fail?

A martingale EA is an expert advisor that doubles its position size after each losing step, so one move back in its favour recovers every loss plus a small gain. It produces many small, steady gains, but the position grows exponentially in a sustained trend, and one long move can lose the whole account.

Fintrix trading desk •

What is a martingale EA?

A martingale EA is an expert advisor that adds a larger position each time price moves against it, usually doubling the lot size. When price comes back a little, the whole basket of positions closes at a small profit. The idea comes from an 18th-century betting system: double the stake after every loss, and the first win recovers all the losses plus the original stake.

A typical forex version works like this:

  1. Open 0.01 lots in one direction.
  2. If price moves 20 pips against the position, open another order of 0.02 lots.
  3. Another 20 pips against: 0.04 lots, then 0.08, 0.16, and so on.
  4. When price moves back to a set distance beyond the basket's average entry price, close everything at a profit.

Many grid and "recovery" EAs sold online use the same mechanism with different names and step sizes.

Why does a martingale EA win so often?

Because it only needs a small bounce. Each doubling drags the basket's average entry price towards the current price. In the grid above, after five orders the average entry is only 16.8 pips away, even though price has moved 80 pips against the first order. After ten orders it is 19.8 pips away. A 30-pip pullback after a 180-pip move closes the whole basket at a profit.

On EUR/USD H1 data from January to October 2026, the grid above (closing each basket 10 pips beyond its average entry) ran 1,614 baskets across buy and sell tests. 1,055 of them closed on the first order, without ever adding to the position. That record of small, frequent gains is what makes martingale EAs look smooth in a short backtest or a marketing chart.

How fast does the position grow?

Exponentially. Each step doubles the newest order, so the total open size roughly doubles too:

OrderNew order (lots)Total open (lots)Pips against the first orderFloating loss 20 pips laterMargin used at 1:100
10.010.010$2$11
30.040.0740$22$78
50.160.3180$114$345
70.641.27120$494$1,413
92.565.11160$2,026$5,687
105.1210.23180$4,072$11,384
1220.4840.95220$16,356$45,570

EUR/USD at 1.11283, $10 per pip per lot; spread, commission and swap ignored. The position that started at 0.01 lots is over 4,000 times larger by the twelfth order.

The two lines are almost identical for the first 100 pips. After that, the martingale line bends upwards because every new step adds an order as large as all the earlier ones combined. EUR/USD's average daily range over the 20 trading days to 27 October 2026 was about 68 pips, so 200 pips is roughly three average days in one direction.

What happened to a martingale EA in January 2026?

The same grid, run on Fintrix Markets MT5 EUR/USD H1 data as a sell-side EA on a $5,000 account at 1:100 leverage, with a 95% margin call and a 25% stop out:

  1. 8 to 21 January. The EA closed 37 baskets at their targets, adding $319 to the account.
  2. 22 to 23 January. EUR/USD rose steadily from 1.1673. The EA added an order every 20 pips. By Friday's close it held 9 orders, 5.11 lots in total, and the margin level was 76%: below the margin call level, so it could open no more orders.
  3. Monday 26 January, first hour of trading. EUR/USD reopened higher and reached 1.1891. The margin level fell below 25% and the stop out closed the largest losing order, 2.56 lots, for a loss of about $1,500.
  4. 27 January. EUR/USD kept rising, past 1.2082. The stop out closed the remaining orders one by one. The account finished at about −$40: the $5,000 deposit and the $319 of earlier gains were gone.

Two weeks of steady gains, and the deposit, were gone within 47 hours of the Monday open. EUR/USD's whole move from the first sell to the last stop out was about 410 pips, about six average days of range, spread over four trading days.

Results here come from hourly bars, which hide price movement inside each hour, and ignore spread, commission and swap. On a real account those costs would have made the outcome slightly worse. Our lesson on margin calls and stop outs explains the order in which MT4/5 closes positions.

Why does doubling not fix the odds?

A martingale changes the shape of results, not their average. The sequence of trades still has the same expected value; doubling only moves the losses into rare, very large events.

The maths of a single betting round shows it. If each step has a probability q of going against you and you can afford n steps, the chance of losing all of them is qⁿ, and that loss is 2ⁿ − 1 times the first stake. Pflaumer's 2019 analysis of the roulette martingale found exactly this pattern: compared with a constant bet, doubling raised the chance of a short-term profit but made the losses, when they came, much larger. The same paper notes that the doubler's long-run result is still set by the game's negative expected value.

Markets add two problems a roulette wheel does not have:

  • Moves are not independent. A trend makes another step against the position more likely, not less. In the 2026 test, 6 of the 1,614 baskets needed 8 or more orders. The deepest needed 12, during the four-day January rise described above.
  • Costs are not zero. Every order pays the spread, and baskets held overnight pay or earn swap. Large positions held into rollover, when spreads widen, pay the most.

How do you spot a martingale EA?

Common signs in a backtest or trading record:

  • Lot sizes that grow after losses: 0.01, 0.02, 0.04 and so on, in the history.
  • A very high share of closed trades in profit, with small average gains and very few, very large losses.
  • A balance curve that rises in a smooth straight line while the equity curve shows deep dips. Balance drawdown stays small because losing orders are held open, not closed. Our lesson on drawdown explains the difference.
  • A short backtest. A martingale can run for months before meeting a trend long enough to break it, which makes it a strong candidate for overfitting.
  • Settings such as "multiplier", "lot exponent", "grid step" or "max orders".

In the MT4/5 Strategy Tester report, compare Equity Drawdown Maximal with Balance Drawdown Maximal. A large gap between them is the clearest single warning.

Key takeaways

  • A martingale EA doubles its position after each losing step so a small bounce recovers all losses.
  • It produces frequent small gains, which make backtests and short records look smooth.
  • Position size grows exponentially: 0.01 lots becomes 40.95 lots after 12 orders in a 20-pip grid.
  • In a simulation on real January 2026 EUR/USD data, a $5,000 account that had gained $319 in two weeks lost everything in under two days.
  • Doubling does not change the average outcome; it concentrates losses into rare, very large events.
  • What is an expert advisor (EA) in MT5?
  • What is overfitting in backtesting?
  • What is the difference between a margin call and a stop out?
  • MetaTrader 5

Sources

Put your knowledge to work

Open a Fintrix Markets account, or log in and trade CFDs on forex, gold, indices and more.