Grid and martingale EAs: 54 configurations, 33 blew up
Grid and martingale EAs are the best-selling category in retail algo trading, and the sales pitch is always the same screenshot: a 95%+ win rate and an equity curve that looks like a savings account. Both are true. Neither is the point.
We ran the standard retail grid — open a position, add another every N points against you, close the whole basket when it nets a profit, no stop loss — over 55 months of M1 data on six markets, three grid spacings and three martingale multipliers. Every number below comes out of that run.
The market decides, not the settings
| Market | Survived / total | Median months to blow-up | Median return of survivors |
|---|---|---|---|
| US500 | 8 / 9 | 23.5 | +5.04% |
| EURUSD | 7 / 9 | 4.2 | +46.05% |
| USDJPY | 4 / 9 | 2.8 | +48.33% |
| GBPUSD | 2 / 9 | 8.7 | +32.47% |
| XAUUSD | 0 / 9 | 6.0 | none left |
| BTCUSD | 0 / 9 | 0.1 | none left |
US500 and EURUSD spend most of their time oscillating, and a grid harvests oscillation — 8 of 9 and 7 of 9 configurations survived. Gold and Bitcoin trended hard over this period, and every single configuration died: 0 of 9 and 0 of 9. The median Bitcoin grid lasted 0.1 months — three days.
A grid is not a strategy in the usual sense. It is a bet that price comes back. When it does, the bet pays a little, over and over. When it does not, it pays everything back at once.
Martingale sets the clock, not the outcome
| Martingale multiplier | Blown / total | Median months to blow-up |
|---|---|---|
| x1 (flat) | 7 / 18 | 25.8 |
| x1.5 | 12 / 18 | 2.2 |
| x2 | 14 / 18 | 2.9 |
Without martingale, 7 of 18 configurations blew up, and the ones that did lasted a median of 25.8 months — long enough to look like a track record, long enough to attract more money. Double the lot each level and the median drops to 2.9 months. Martingale does not change whether a grid dies. It changes whether you get two years of confidence first.
The same EA, the same settings, two markets
| Market | Step · mult | Outcome | Months | Final | Baskets | Max legs | Deepest float loss |
|---|---|---|---|---|---|---|---|
| EURUSD | 50 · x2 | survived | 55.0 | +105.71% | 1,490 | 10 | $6,462 |
| XAUUSD | 50 · x2 | blown up | 1.7 | -34.72% | 261 | 10 | $6,119 |
| XAUUSD | 100 · x2 | blown up | 21.3 | -2.03% | 1,321 | 11 | $19,266 |
| BTCUSD | 20 · x1 | blown up | 34.3 | -97.94% | 12,231 | 50 | $35,263 |
| US500 | 20 · x2 | survived | 55.0 | +118.31% | 7,995 | 14 | $4,823 |
| GBPUSD | 50 · x1 | survived | 55.0 | +40.57% | 697 | 50 | $10,229 |
Row one and row two are the identical configuration — 50-point grid, doubling each level. On EURUSD it returned +105.71% over 55 months. On gold it was dead in 1.7 months. Any vendor selling that EA would show you the first row.
Row three is the one worth staring at. It finished at −2.03% — you would call that break-even. It got there by growing an account to nearly three times its starting size over 21 months and then losing all of it in the final stretch:
XAUUSD, 100-point grid, doubling each level. Over 21 months it closed 1,321 baskets, every single one at a profit, taking the account from $10,000 to $28,918. Then one move ended it at $9,797 — below where it started.
What you actually have to sit through
Grids do not show you their risk as drawdown, because nothing is realised until the basket closes. It shows up as floating loss — open positions bleeding while the EA keeps adding:
- Median deepest floating loss across all 54 runs: 61% of the account
- Worst: 383% — nearly four times the starting balance underwater
- 18 of 54 configurations were at some point floating a loss larger than the entire account
Even the mildest setup we tested — EURUSD, 50-point grid, no martingale, which finished +28.46% — was at one point holding 35 open positions and $3,004 underwater on a $10,000 account. The question is not whether the backtest is profitable. It is whether you would still be holding at that moment.
"Just add a stop loss" - we tested that too
This is the first thing everyone says, and it is a fair question: cap the loss on each basket, take the hit, start a fresh grid. So we ran the same 54 configurations again with a hard basket stop at 5%, 10% and 20% of the starting balance - 216 backtests in total.
Survival improves a lot. The returns do not survive with it. To keep this honest, the table below compares only the 21 configurations that stayed alive both with and without a stop, so none of it is survivorship bias:
| Basket stop | Survived / 54 | Median return, same configs |
|---|---|---|
| none (as sold) | 21 / 54 | +33.01% |
| 5% | 31 / 54 | -1.63% |
| 10% | 31 / 54 | -3.62% |
| 20% | 26 / 54 | +5.14% |
A 5% or 10% stop takes a strategy that returned a median +33.01% over 55 months and leaves it at roughly zero. The reason is not subtle: a grid earns by selling volatility - small, frequent payments for carrying the risk that price does not come back. The tail risk is the earning mechanism. Cut the tail and the income goes with it.
Note that the effect is not monotonic - a 20% stop does better than 5% or 10%. A tight stop fires on ordinary pullbacks and turns the grid into a high-frequency loss machine; a wide one only cuts the baskets that genuinely go wrong. Even then, the median configuration barely cleared break-even.
In a trending market a stop does not help at all
| Market | no stop | 5% | 10% | 20% |
|---|---|---|---|---|
| EURUSD | 7/9 +36.7% | 8/9 +0.4% | 8/9 +2.5% | 7/9 +15.4% |
| US500 | 8/9 +4.9% | 9/9 -1.7% | 9/9 -1.7% | 9/9 +4.2% |
| GBPUSD | 2/9 -92.9% | 8/9 -14.9% | 8/9 -2.6% | 6/9 -5.3% |
| USDJPY | 4/9 -2.9% | 6/9 -39.0% | 6/9 -39.4% | 4/9 -73.0% |
| XAUUSD | 0/9 -69.0% | 0/9 -97.6% | 0/9 -97.2% | 0/9 -97.1% |
| BTCUSD | 0/9 -61.3% | 0/9 -100.0% | 0/9 -95.3% | 0/9 -86.1% |
Gold and Bitcoin stay at 0 of 9 at every stop level, and the returns get worse, not better - gold falls from -69.0% to -97.2%. The 5% stop on gold fired a median of 88 times per run, for $45,839 of cumulative stopped losses on a $10,000 account. In a sustained trend every fresh grid restarts straight back into the move. Without a stop the account dies once; with one it dies by a thousand cuts.
There is a second reason the stop cannot save these runs: it bounds your loss, not your leverage. Margin is charged on notional size, so a martingale ladder can sit comfortably inside its 10% loss limit and still trip the broker's margin stop-out.
The configurations that did work
Two setups came out genuinely usable with a 20% basket stop:
- US500, 20-point grid, doubling, 20% stop: +89.02% over 55 months, deepest floating loss $1,767
- EURUSD, 50-point grid, x1.5, 20% stop: +55.19%, deepest floating loss $1,900
Roughly 10-14% a year with a peak floating loss under 20% is a real result. But each is the best of nine configurations, and the median at the same stop level was about +4%. You cannot know in advance which one you will pick - which is exactly the test we apply to our own templates: a strategy counts when its neighbours also work, not when the best cell of a grid search does.
Why this article does not come with a template
We do not offer a grid EA, and the reason is structural rather than moral: our Strategy Spec describes one position with a stop loss, and a grid is many positions with none. We wrote a separate simulator for this article precisely because our own backtest engine cannot express a grid — running one through it would have been dishonest.
If you want the mechanics in your own hands, the ingredients a grid relies on are the ones we deliberately keep: a stop loss on every trade, position sizing tied to that stop, and a report that shows the out-of-sample column.
How this was measured
- M1 data, Jan 2022 – Aug 2026 (55 months, M1 data). Grid levels and basket targets are triggered on the bar's high/low, not the close.
- Spread charged on every entry and exit at each symbol's real value. Swap is not charged — grids hold positions for months, so the real cost is worse than shown.
- $10,000 start, 1:100 leverage, margin call at 50% (MetaTrader's default stop-out).
- Levels capped at 50 per grid. A real EA without that cap would die sooner, so these results are, if anything, kinder to the grid than reality.
- The simulator is
scripts/grid_sim.pyin our own repo; the parameters are in the tables above.
FAQ
Do grid EAs work?
They work in ranging markets and die in trending ones. Over this 55-month sample, 8 of 9 configurations survived on the S&P 500 and 0 of 9 survived on gold. Since you cannot know in advance which regime the next two years belong to, "does it work" is the wrong question — "how long until it doesn't" is the right one.
Is a grid without martingale safe?
Safer, not safe. Flat lot sizing blew up 7 of 18 times here. It also survives long enough to be convincing: the ones that failed lasted a median of 25.8 months.
Does adding a stop loss fix a grid EA?
It fixes the dying, not the earning. A 5-10% basket stop raised survival from 21 of 54 runs to 31, but the median return across the same configurations fell from +33.01% to roughly zero. On gold and Bitcoin it did not even fix the dying: 0 of 9 survived at every stop level.
What about the 95% win rate in the vendor's screenshot?
It is probably real. We closed 67,633 baskets in this test and every one was a winner — including the 36,321 that belonged to accounts that ended up dead. In a grid, win rate measures nothing except how patient the EA is.
Can I just use a big account so it survives?
More capital buys more levels, which buys more time. It does not change the outcome, because the position size grows as the price runs. In this test the deepest floating loss reached 383% of the starting balance — an account ten times larger would have taken that hit too, just later.
Can I build a grid EA on TradingWithEA?
No. Every strategy here carries a stop loss and one position at a time. That is a deliberate limit, and this article is the reason for it.