ForexCopilotEA

Strategy

Grid Trading Explained: How Grid EAs Work, What the Maths Says and Where They Break

By Benjamin Lee · Updated · 9 min read

A grid trading robot places orders at fixed distances above and below the price and collects small profits as the market moves back and forth. On a ranging market it can look like a machine that prints money, with a win rate above 70 percent and a smooth equity curve. It is also the design behind most of the large account losses reported in forums, because its risk does not show up in the win rate at all. This guide explains the two kinds of grid, works through the arithmetic of what a deep grid costs, and gives you the checks that separate a grid with a hard limit from one that is simply waiting for the market to go wrong.

Key takeaways

  • A grid wins often and loses rarely, and the rare loss can be larger than all the wins before it.
  • With fixed lots, a grid's floating loss grows with the square of its depth: doubling the depth roughly quadruples the loss.
  • Margin use grows with every level, so the deepest basket is where a broker's close-out happens.
  • Two things make a grid survivable: a hard stop or drawdown limit that actually fires, and capital sized to the deepest basket.
  • A high win rate and a smooth curve are what a grid looks like before its worst trend. Judge it by the deepest basket in its history.

Two things called grid trading

The word covers two designs that behave very differently, and you should know which one an EA uses before you read anything else about it.

The two kinds of grid
Two-sided breakout gridAveraging (recovery) grid
How it opens tradesPending buy-stops above and sell-stops below the price; whichever side triggers, runsOpens a position, then adds more in the same direction every time price moves against it
How it exitsEach trade has its own stop and target, or a trailing stopCloses the whole basket when the average entry is in profit by a small amount
Where the risk sitsIn each trade's stop. Many small, defined lossesIn the basket. One large, undefined loss if price never comes back
Win rateModerateVery high
ExampleGold breakout EAs that straddle a session openAveraging EAs on range-bound pairs

When people warn about grids, they mean the second kind. The first is closer to a breakout strategy with pending orders and carries the risks of one; our scalping guide covers its execution issues. The rest of this guide is about the averaging grid, because that is where the arithmetic gets interesting.

How an averaging grid works

The EA opens a first buy. If price falls by a set distance, say 20 pips, it opens a second buy at the lower price. If price falls another 20 pips, a third, and so on. Each new position pulls the average entry price down. As soon as price rises back to a point just above the average entry, the EA closes every position together at a small net profit. Because price in a range keeps returning to its average, most baskets close at a profit, quickly. That is where the 70 to 90 percent win rate comes from, and why a grid backtests so well on a calm market.

Rebound: basket closes in profitaverage entry 98.50basket target 99.10Result: small win4 buys open, price 99.30No rebound: the basket keeps growingaverage entry 96.50basket target 97.10Result: deep floating loss8 buys open, price 93.00
Illustrative only; prices are invented. The same rule runs in both panels. On the left, price rebounds before the basket gets large and everything closes in profit. On the right, price keeps falling, the grid keeps buying, and the average entry stays far above the market.

The problem is the right-hand panel. A grid has no opinion about whether the market is ranging or trending. It keeps averaging down into a trend, because that is what its rule says, until it runs out of margin, hits a stop or stops adding. All the profit it earned from the left-hand baskets is at risk in the right-hand one.

The arithmetic of a deep grid

Take EURUSD, a grid with a 20-pip spacing and a fixed lot of 0.01, where one pip on 0.01 lot is worth about $0.10. Suppose price falls steadily. When the grid has n levels open and price is at the bottom of the last one, the first position is n minus 1 spacings in loss, the second n minus 2, and so on. The total floating loss is the spacing times the pip value times n(n-1)/2, so it grows with the square of the number of levels.

Floating loss of a fixed-lot grid as it deepens (EURUSD, 20-pip spacing, 0.01 lot, about $0.10 per pip)
Levels openPrice has fallenFloating lossMargin used at 1:100 (about $11 per level)
580 pipsAbout $20About $55
10180 pipsAbout $90About $110
20380 pipsAbout $380About $220
40780 pipsAbout $1,560About $440
  • 5 levels$20
  • 10 levels$90
  • 20 levels$380
  • 40 levels$1,560
Floating loss of the same grid at different depths, scaled so 40 levels fills the bar (dollars shown)

Look at what quadrupling the depth from 10 to 40 levels does: the loss goes from $90 to $1,560, about seventeen times, while margin goes up four times. On a $1,000 account the grid at 40 levels is long past a margin call at 50 percent margin level, which is the close-out level for European retail accounts under ESMA rules. The calculation uses a fixed lot. If the grid increases the lot as it deepens, which many do, the loss grows far faster than the square. That version is a martingale, and we cover it in the next guide.

What makes a grid survivable

Grid EAs that last tend to have a few things in common. None of them removes the risk; all of them put a ceiling on it.

  1. A hard limit that fires. A maximum number of levels, a maximum total lot, or a maximum floating drawdown as a percentage of equity at which the EA closes everything and stops. The limit must be low enough to be survivable and the EA must actually honour it.
  2. Capital sized to the deepest basket, not to the average. Work out the loss and the margin at the maximum number of levels. The account must survive that, with room to spare, at the leverage you actually have.
  3. Fixed or slowly growing lots. Lot multipliers turn a bad grid into a disaster. A multiplier of 1.0 to 1.2 behaves very differently from 2.0.
  4. A trend or volatility filter. A rule that stops adding levels, or stops opening new baskets, when ADX or ATR says the market is trending hard. It reduces how often the grid is caught.
  5. A news filter. Gaps and spikes jump over levels and over stops. See our guide on the economic calendar and news filters.
  6. A swap and weekend plan. Baskets held for days pay swap and carry gap risk; see weekend gaps and rollover.

Note that the first two controls are your responsibility as much as the vendor's. An EA with a sensible maximum-drawdown input is only as safe as the value you leave in it, and the default is often set to show the strategy in a good light. Set it yourself, test what happens when it fires and know the loss in dollars before you start.

How to judge a grid EA from the outside

  • Ask for the deepest basket. In positions, lots and equity drawdown, on the version you are buying, and when it happened. A vendor who cannot answer does not know or will not say.
  • Compare balance drawdown and equity drawdown. A grid can show a small drawdown on closed trades while sitting deep underwater on open ones. On one vendor's long-running signal we found a 13.9 percent balance drawdown beside a 72.4 percent equity drawdown; see our Waka Waka verdict.
  • Read the average win against the worst loss. A grid with an average win of $10 and a worst trade of $540 needs 54 winners to pay for one bad basket.
  • Look for the long record, not the best month. A record that spans a major trend, with the deepest basket shown, is worth more than ten months of calm.
  • Check what the vendor changed after a bad stretch. A version history that quietly changes the limits after each deep drawdown is a warning.
  • Respect our scoring rule. In our EA verdicts a grid or martingale cannot score better than High risk, however good the record, because the worst case is open-ended by design.
Before you run a grid EA
0/7

If a grid is what you want, treat the vendor's win rate as a measure of how often the strategy is not yet wrong. For a longer, worked look at a recovery system with a defined rule, see our zone recovery guide, and for what to do when a basket is deep, see what to do when an EA is in drawdown. Our strategy comparison puts grids next to trend and scalping systems, and our grid category lists the grid EAs in the shop with the design stated on each page.

Sources and further reading

  1. MetaTrader 5 Help: Strategy TestingThe Strategy Tester: testing modes, settings and forward testing.
  2. MetaTrader 5 Help: Testing ReportWhat each figure in the tester's report means, including drawdown.
  3. ESMA: ESMA agrees to prohibit binary options and restrict CFDs to protect retail investorsThe EU leverage limits, margin close-out, negative balance protection and risk-warning rules for retail CFD accounts.

Frequently asked questions

What is grid trading in forex?

Grid trading places orders at fixed distances around the price. A breakout grid uses pending orders on both sides and lets the triggered side run. An averaging grid adds positions as price moves against the first and closes the basket at a small profit when price returns.

Is grid trading profitable?

It can be on ranging markets, where most baskets close at a small profit. Its risk is concentrated in rare trends, where a deep basket can lose more than many wins earned. Whether it is profitable over time depends on the limits it uses and the capital behind it.

Why do grid EAs have such a high win rate?

Because the strategy keeps averaging until price returns to a small profit, most baskets eventually close in profit. The rare baskets that do not are large losses, so a high win rate says little about safety.

How much money do I need to run a grid EA?

Enough to survive the deepest basket the EA is allowed to reach, at your real leverage, with margin to spare. Work out the floating loss and margin at the maximum number of levels, and size the account to that, not to the average basket.

Is a grid the same as a martingale?

Not necessarily. A grid with fixed lots adds the same size at each level. A martingale increases the lot as it adds. Many grid EAs include a lot multiplier, which makes them martingale-like and much riskier.

Expert Advisors in these styles

Apply the checks above to any of these before you buy: read the manual, run your own backtest, and start on demo.