Grid and martingale expert advisors attract traders because their results look calm: a steady line of small wins and very few losing days. The same mechanics that produce that line also concentrate risk into rare, large losses. This guide explains how these systems work, shows with numbers how their exposure grows, and lists the safeguards worth looking for.
Grid, martingale and averaging down
The three ideas are often combined in one EA, but each works differently.
Grid
A grid EA opens positions at fixed price intervals, such as every 20 pips. Some grids trade in one direction and add a trade each time price moves another step against them. Others place buy and sell orders above and below the market and collect profit as price swings back and forth. Either way, the number of open trades grows the further price travels without coming back.
Martingale
Martingale increases the lot size after a loss or at each new level, most often by doubling it: 0.01, 0.02, 0.04, 0.08 and so on. The idea, borrowed from gambling, is that one win at the larger size recovers all the earlier losses. Some EAs use gentler multipliers such as 1.3 or 1.5, which slow the growth without removing it.
Averaging down
Averaging-down systems add to a losing position so its average entry price moves closer to the market. The EA then closes the whole group of trades, called a basket, as soon as the combined position shows a small net profit. Combined with a grid and a lot multiplier, a modest bounce is enough to close the basket in profit.
Why the results look so smooth
Markets retrace most of the time. A grid EA that waits for a retracement and closes each basket at a small profit wins most of its baskets, often for months in a row. The balance curve, which only counts closed trades, climbs steadily with almost no dips.
The losses haven't gone away. They are still open. While a basket is underwater, its floating loss sits in equity, not balance. The balance line rises while the equity line sags, and the sag gets deeper the longer price runs against the basket. A statement that shows only closed trades, or a balance graph, hides that risk completely.
The result is a lopsided pattern: a high win rate, small average wins and an occasional loss big enough to undo many months. The question with any grid or martingale EA isn't whether that loss can happen. It's how large the loss is when it does, and whether the account survives it.
How exposure grows: a worked example
Take a simple buy grid on EURUSD. It opens a new level every 20 pips against the position, starting at 0.01 lots and doubling each time. Assume a USD account, so one pip on 1.00 lot is worth $10, with EURUSD near 1.1000 and leverage of 1:100, so each 1.00 lot uses about $1,100 of margin. Spread, swap and commission are left out to keep the numbers clean.
| Level | Pips below first entry | Lot opened | Total lots | Floating loss as the level opens | Margin in use |
|---|---|---|---|---|---|
| 1 | 0 | 0.01 | 0.01 | $0 | $11 |
| 2 | 20 | 0.02 | 0.03 | $2 | $33 |
| 3 | 40 | 0.04 | 0.07 | $8 | $77 |
| 4 | 60 | 0.08 | 0.15 | $22 | $165 |
| 5 | 80 | 0.16 | 0.31 | $52 | $341 |
| 6 | 100 | 0.32 | 0.63 | $114 | $693 |
| 7 | 120 | 0.64 | 1.27 | $240 | $1,397 |
| 8 | 140 | 1.28 | 2.55 | $494 | $2,805 |
| 9 | 160 | 2.56 | 5.11 | $1,004 | $5,621 |
| 10 | 180 | 5.12 | 10.23 | $2,026 | $11,253 |
After N levels the total size is 0.01 × (2N − 1) lots, so every extra level roughly doubles the exposure, the margin and the loss.
Two things stand out. First, the basket needs very little to close in profit. After ten levels, the break-even price is only about 20 pips above the last entry, a single grid step. That is why these EAs win so often. Second, the cost of being wrong explodes. At ten levels, every further pip costs about $102, and the margin in use is over $11,000 for a position that started at 0.01 lots.
What a strong trend does to the account
Now run that grid on a $5,000 account. When price reaches the ninth level, 160 pips below the first entry, the eight open trades are down $1,004. Equity is $3,996 and the margin in use is $2,805, which leaves $1,191 of free margin. The ninth order needs $2,816, so the EA can't open it.
The account is now holding 2.55 lots, and every pip costs $25.50. If the broker's stop-out level is 50%, the broker starts closing positions when equity falls to half the margin in use, about $1,400. That happens roughly 100 pips later, around 260 pips from the first entry, with about 72% of the account gone. A one-way move of that size is not unusual on a major pair over a few days or weeks.
Other things push the account in the same direction:
- Gaps. Weekend and news gaps can jump past several levels at once, so the grid opens late or not at all.
- Swap. It is charged on every open trade each night, and a basket held for weeks pays it on an ever larger position.
- Spread widening. Wider spreads at rollover and around news deepen the floating loss on every open trade at the same moment.
- A bigger account only delays it. Because each level doubles the margin and the loss, doubling the balance buys roughly one more level.
Why backtests hide the tail risk
Grid and martingale EAs are easy to make look good in the strategy tester:
- The test period may miss the trend that breaks the system. An EA tuned on ranging years can show years of smooth profit and still fail on the first sustained trend after them.
- Optimization rewards survivors. It picks the grid step and multiplier that happened to survive that particular history. Settings that just missed the worst move rank first by construction.
- The balance curve gets the attention. Reports and screenshots often show balance. The equity drawdown, the deepest number of levels reached and the largest lot opened tell the real story.
- Poor data and fixed spreads soften the spikes. Low-quality history smooths out sharp moves, and a fixed spread hides the widening that hits a full basket during news.
- The metrics look excellent until they don't. Profit factor and win rate stay high right up to the losing basket, which is why many trades and many years matter.
When you test one, read the equity line, record the maximum open trades and maximum lot, and test the strongest trending periods you can find. Our backtesting guide covers the tester settings, and how to evaluate an expert advisor covers the numbers to check.
Safeguards worth looking for
No setting makes a grid or martingale EA safe. These controls decide whether a bad trend costs a planned amount or the whole account.
| Safeguard | What it does | What to check |
|---|---|---|
| Hard equity stop | Closes all the EA's trades when the floating loss reaches a set amount or percentage. | That it works on equity, not balance, and that you set it to a loss you accept. |
| Maximum levels or trades | Stops adding positions after a set number. | What happens at the cap. An EA that simply waits with no stop is still exposed. |
| Maximum lot | Caps the size of any single order. | That the cap applies to multiplied lots, not just the first trade. |
| Gentle or no multiplier | Grows lots slowly, or keeps them fixed. | The total exposure at the maximum level, not just the starting lot. |
| News and session filter | Pauses new baskets around major releases and at rollover. | Which events it covers, and whether it also stops adding to open baskets. |
| Trend filter | Avoids starting baskets against a strong trend. | Whether it can still add levels once a basket is open. |
| Capital per lot | A recommended minimum balance for each 0.01 starting lot. | That the figure covers the maximum levels at your leverage, with the equity stop in place. |
How to spot a hidden grid or martingale
Not every seller says an EA uses a grid. The trade history gives it away:
- Several trades in the same direction opened at regular price distances.
- Lot sizes that step up within a group, such as 0.01, 0.02, 0.04, or 0.10, 0.13, 0.17.
- Groups of trades closed in the same second with a small combined profit.
- Losing trades held for days or weeks while winning trades close within hours.
- A win rate close to 100% alongside a maximum drawdown that is never stated.
Size it for the worst case
If you run a grid or martingale EA, size it from the loss you are willing to take, not the profit you hope for:
- Find the EA's starting lot, multiplier, grid step and maximum levels in its inputs or documentation.
- Add up the total lots at the maximum level and work out the margin they need at your leverage with the margin calculator.
- Calculate the floating loss when the last level opens and at a set distance beyond it. The pip value calculator gives the value of each pip.
- Set a hard equity stop at that loss or less, and make sure the account can carry the full margin until the stop is hit.
- Decide whether you could accept losing that amount in a single move. If not, lower the starting lot or the maximum levels.
- Check your account's rules. Some prop firms restrict grid and martingale strategies, and floating losses alone can breach an equity-based drawdown limit. Our prop firm rules guide covers what to read.
For a wider plan covering risk per trade and running several EAs together, read our guide to risk management for EA trading.