Strategies we backtested grid trading strategy

Tested by BacktestingMax

Grid trading strategy backtest on forex, gold and silver

Does grid trading work?

Not on most markets. A grid trading strategy places buy orders at fixed steps below the price and sell orders at the same steps above it. Each trade takes profit one step back toward the start price, where the grid began. We backtested a basic grid on 10 markets from 2011 to 2025: the 7 major currency pairs, EUR/GBP, gold and silver. The results include the spread, but not overnight (swap) fees. The step was half the daily ATR (average true range: how far price moves in an average day). Each side had 10 orders, and a hard stop 11 steps from the start price closed that side's open trades at once. The grid won 84.5% of its trades, but 5 out of 10 markets lost money. Why did it lose? Each hard stop lost about 1% of the account, as much as about 56 winning trades made. If price moved up and down at random, the grid would get about 55 winning trades per hard stop; it got 54.6. Only EUR/GBP, USD/CAD and NZD/USD made money in both 2011–2019 and 2020–2025. On EUR/GBP and USD/CAD, price came back to the grid lines more often, and both made just over 10% in 15 years. Other spacings, and waiting for a calm market, did not clearly help.

10 backtests 2011–2025 Trading costs included Tested 2 November 2026

Where it worked 10 backtests
Made money
5
of 10 tests, with the standard rules
Made money in both periods
3
2011–2019 and again 2020–2025
Best backtest
+11%
EUR/GBP, 15-minute chart: account growth 2011–2025
Wider grid: lines 1 daily ATR apart
1
tests made money in both periods, compared with 3 with the standard rules

Made money in both periods

  • USD/CAD, 15-minute
  • NZD/USD, 15-minute
  • EUR/GBP, 15-minute

The results

Results on every market

Each box shows one backtest of the grid trading strategy with the standard rules, from 2011 to 2025, after trading costs: the % result, and a small chart of the account balance. The solid line is the account balance and the dashed line is the starting balance. Green results made money; red results lost money. Under each result: whether it made money in both 2011–2019 and 2020–2025, or passed all four of our checks (see "How a test passes" further down).

Market 15-minute
EUR/USD +0.2% Made money overall, lost in one period
GBP/USD +4% Made money overall, lost in one period
USD/JPY −13% Lost money
AUD/USD −9% Lost money
USD/CAD +10% Passed all four checks
USD/CHF −1% Lost money
NZD/USD +5% Made money in both periods
EUR/GBP +11% Passed all four checks
Gold −11% Lost money
Silver −6% Lost money
All the numbers, test by test
Market Chart Trades Win rate Profit factor Result Max drawdown 2011–2019 2020–2025 Monte Carlo drawdown Trading costs
EUR/USD 15-minute 3,284 84.7% 1.01 +0.2% −6.3% −0.4% +0.6% −4.1% $859
GBP/USD 15-minute 3,062 85.9% 1.08 +3.7% −7.8% +6.4% −2.5% −2.9% $936
USD/JPY 15-minute 2,912 80.3% 0.74 −13.4% −14.0% −7.8% −6.0% −14.2% $965
AUD/USD 15-minute 3,258 82.4% 0.83 −9.0% −12.0% −4.4% −4.7% −10.5% $1,357
USD/CAD 15-minute 3,000 87.6% 1.27 +10.2% −5.4% +3.4% +6.5% −1.6% $1,048
USD/CHF 15-minute 853 84.1% 0.92 −1.1% −4.8% −1.7% +0.6% −2.7% $334
NZD/USD 15-minute 2,622 86.5% 1.13 +4.5% −4.6% +3.8% +0.7% −2.3% $1,447
EUR/GBP 15-minute 2,863 88% 1.31 +10.6% −2.9% +5.0% +5.4% −1.6% $1,305
Gold 15-minute 3,676 82.2% 0.82 −10.7% −11.1% −6.6% −4.4% −12.0% $1,648
Silver 15-minute 3,386 84% 0.89 −5.8% −9.1% +2.7% −8.3% −7.7% $3,369

Profit factor is the money won divided by the money lost. Above 1 means the test made money. Max drawdown is the biggest fall from the highest balance. 2011–2019 and 2020–2025 show the result in each period on its own. Monte Carlo drawdown: we shuffled the trades into a random order 1,000 times; in 95% of those runs, the worst drawdown was this number or less. Result is the change in the account, with the risk of each trade set to 1% of the account at that time.

The account balance

The best test and the middle test

Best test EUR/GBP, 15-minute chart +10.6% from 2011 to 2025
Middle test (median): half of the 10 did better, half did worse EUR/USD, 15-minute chart +0.2% from 2011 to 2025

What we found

What the 10 backtests show

  1. The grid won most of its trades and still lost money in 5 out of 10 tests. Of 28,916 trades, 24,425 (84.5%) reached their take-profit. We measure results in R: 1R is 1% of the account, about what one full grid lost at its hard stop. A winning trade made one step minus the spread (the gap between the buy and the sell price). A full grid's 1% is 55 steps, so a win made about 0.017R. The 447 hard stops, about 3 a year on each market, lost 0.96R each on average, because each one closed up to 10 trades at once. So a grid needs about 56 winning trades for each hard stop. Suppose price moved one grid line up or down at random, like a coin toss. Then this grid would average 55 winning trades per hard stop: just enough to pay for the hard stop's loss before the spread. Across the 10 markets, it got 54.6. The winning trades made +418.7R together, and the hard stops lost 430.6R. The trades still open at the end of 2025 lost 2.9R, so 14.7R was lost in all (the parts are rounded).

  2. The grid made money only on markets where price kept coming back to its lines. EUR/GBP (+10.6%) and USD/CAD (+10.2%) got 72.0 and 71.0 winning trades per hard stop, and NZD/USD (+4.5%) got 64.8. These 3 markets made money in both 2011–2019 and 2020–2025, and EUR/GBP and USD/CAD passed all four of our checks. The markets that lost the most moved a long way in one direction and came back less often. They were USD/JPY (−13.4%, 41.0 winning trades per hard stop), gold (−10.7%, 46.5) and AUD/USD (−9.0%, 47.1). The direction shows in which side hit its hard stop. When price rises, the sell trades above the start price keep losing, so the sell side hits its stop more often. Gold rose 204.3% from 2011 to 2025, and the sell side of its grid hit the hard stop 42 times, against 23 for the buy side. So the gold grid lost money while gold itself tripled. USD/CAD also rose (25 sell-side stops against 12), but price came back to its lines often enough to make money. The table 'The markets that came back to the grid lines more often made money' shows every market.

  3. With all 10 markets together, spacing the lines closer or further apart did not change the number of winning trades per hard stop, and neither did a trend filter. Market by market, it varied a lot: with the wider grid, from 81.0 on EUR/GBP to 34.1 on gold. With lines 0.25, 0.5 and 1 daily ATR apart, the grid got 56.3, 54.6 and 55.7 winning trades per hard stop. That is close to the 55 that random price moves would give, each time (see 'Every spacing got about 55 winning trades per hard stop'). The tighter grid traded 4.7 times as often and paid the spread more often, so it lost more: 25.7R in all, compared with 14.7R for the standard grid. The wider grid hit its hard stop only 94 times in 15 years on the 10 markets together: 3 to 17 times on each. So its results stayed close to zero: −0.5R in all. ADX is an indicator of how strong a trend is, from 0 to 100, and many traders read a value below 25 as no strong trend. Starting a grid only when the daily ADX was below 25 made 31% fewer trades and lost 9.9R instead of 14.7R. It lost less only because it traded less: per trade, it lost as much as the standard grid.

  4. Without the hard stop, the grid won 98.5% of its trades, but on most markets it stopped trading for years. With no stop, a grid never ends, and a losing trade stays open until price comes back. On 9 out of 10 markets, price moved past all 10 lines on one side, and those 10 trades were still open at the end of 2025. On 7 of them, the grid made no new trade for at least 4 years: since December 2012 on USD/JPY, and since August 2019 on gold. On gold, the grid started in January 2011. Its sell orders, between $1,352 and $1,437, filled and took profit 221 times from 2011 to 2019. Their last 10 fills came from June to August 2019, and those trades were still open at the end of 2025, with gold at $4,319. The trade sizes were set as in the standard grid. Counting those open trades, the gold test's account fell 53.2% from its highest point, and it ended 43.3% down. With the hard stop, it fell 11.6% counted the same way; the 11.1% in the table counts closed trades only. 5 out of 10 tests made money, the same number as with the hard stop. This version is not in the table under 'Can the grid trading strategy be improved?'. That table counts each trade in the years it closed, and these losing trades closed only when the test ended.

  5. A hard stop limits the loss only if a broker can fill it near its price. On 15 January 2015, the Swiss central bank removed its cap on the Swiss franc, and USD/CHF fell 29% in 18 minutes, from 1.0218 to 0.7263. Our backtest filled that day's hard stop at its price, a loss of 0.96R. A real broker could not have filled every stop order at its price that day, so a real grid would have lost more. The shock also set the step of a USD/CHF grid two weeks later. The grid that started after the 15 January stop hit its own hard stop on 29 January. The next one started that day, when the daily ATR still included the day of the shock. So its lines were about 129 pips apart (a pip is 0.0001 on USD/CHF), 3.8 times the usual 34. That grid never reached its hard stop: it was still running at the end of 2025, and it made only 7 to 23 trades a year from 2016.

Market by market

The markets that came back to the grid lines more often made money

Each row is one market with the standard rules, from 2011 to 2025, after the spread. A winning trade reached its take-profit. A hard stop closed all the open trades on one side of a grid at once. The buy side is the buy trades below the start price, and the sell side is the sell trades above it. 'Needed to break even' is the number of winning trades that pay for one hard stop on that market, after the spread. If price moved at random, a grid would get about 55.

Market Result 2011–2025 Winning trades Hard stops Winning trades per hard stop Needed to break even
EUR/GBP +10.6% 2,519 35 (18 buy side, 17 sell side) 72.0 55.0
USD/CAD +10.2% 2,628 37 (12 buy side, 25 sell side) 71.0 55.8
NZD/USD +4.5% 2,268 35 (21 buy side, 14 sell side) 64.8 57.3
GBP/USD +3.7% 2,629 44 (26 buy side, 18 sell side) 59.8 55.2
EUR/USD +0.2% 2,781 50 (28 buy side, 22 sell side) 55.6 55.3
USD/CHF −1.1% 716 13 (7 buy side, 6 sell side) 55.1 56.0
Silver −5.8% 2,842 54 (21 buy side, 33 sell side) 52.6 58.9
AUD/USD −9.0% 2,685 57 (34 buy side, 23 sell side) 47.1 56.8
Gold −10.7% 3,020 65 (23 buy side, 42 sell side) 46.5 56.4
USD/JPY −13.4% 2,337 57 (23 buy side, 34 sell side) 41.0 54.8

Results are the change in the account from 2011 to 2025. 'Winning trades per hard stop' is the number of winning trades divided by the number of hard stops. 'Needed to break even' is the average loss of a hard stop divided by the average winning trade. It can be at or below 55, as on USD/JPY (54.8) and EUR/GBP (55.0). That is because 32 out of the 447 hard stops closed only 7 to 9 trades. A line's order had not been placed again in time, so those stops lost less. Counting only the hard stops that closed all 10 trades, a grid needed 55.2 to 59.7 winning trades per hard stop. For a grid, the number of hard stops says more about luck than the number of trades: EUR/GBP's result rests on 35 hard stops. USD/CHF made only 853 trades. A grid that started on 29 January 2015, two weeks after the Swiss franc shock, had lines about 129 pips apart and never reached its hard stop (see the findings).

Spacing and trend filter

Every spacing got about 55 winning trades per hard stop

Each bar shows the winning trades per hard stop of one version, all 10 markets together, from 2011 to 2025. If price moved one grid line up or down at random, a grid with 10 lines on each side and its hard stop 11 steps out would get 55. The version with ADX below 25 uses the standard spacing. Each note gives that version's winning trades, its hard stops and the result of all its trades together in R. 1R is 1% of the account, about what a full grid lost at its hard stop.

  • Tighter grid: lines 0.25 daily ATR apart115,262 winning trades, 2,046 hard stops. All trades together: −25.7R 56.3
  • Standard grid: lines 0.5 daily ATR apart24,425 winning trades, 447 hard stops. All trades together: −14.7R 54.6
  • Wider grid: lines 1 daily ATR apart5,235 winning trades, 94 hard stops. All trades together: −0.5R 55.7
  • Start a grid only when ADX is below 2516,915 winning trades, 310 hard stops. All trades together: −9.9R 54.6

A tighter grid needs a few more winning trades per hard stop than a wider one, because the spread is a bigger part of a smaller step. It needed about 57.0 with lines 0.25 daily ATR apart, 56.2 with 0.5 and 55.4 with 1. The wider grid got slightly more than it needed (55.7): its winning trades made +88.4R and its hard stops lost 88.0R. But its trades still open at the end of 2025 lost 0.9R, so in all it lost 0.5R. 'All trades together' adds up 10 separate test accounts, so it is not one account's result.

Small accounts

What a grid risks on a $10,000 account

The smallest trade most brokers allow is 0.01 lots: 1,000 units of a currency pair, 1 ounce of gold or 50 ounces of silver. This table uses the standard grid: lines half a daily ATR apart, 10 lines on each side and a hard stop 11 steps from the start price. Every line trades that smallest size. The step is half the daily ATR on a typical day (the median) in 2025. The table shows what a full grid would lose, as a share of $10,000, and the account you need for that loss to be 1%. We worked it out from the daily ATR in our price data, not from the backtest trades.

Market Grid step on a typical day in 2025 A full grid at 0.01 lots, as a share of $10,000 Account needed for 1% per grid
EUR/USD 41.1 pips 2.3% $22,600
GBP/USD 45.6 pips 2.5% $25,100
USD/JPY 67.0 pips 2.5% $24,700
AUD/USD 27.6 pips 1.5% $15,200
USD/CAD 36.3 pips 1.5% $14,600
USD/CHF 30.3 pips 2.0% $19,700
NZD/USD 26.5 pips 1.5% $14,600
EUR/GBP 19.8 pips 1.4% $14,300
Gold $26.16 14.4% $143,900
Silver $0.412 11.3% $113,300

A full grid loses 55 steps of one line's trade size. For example, a typical gold step in 2025 was $26.16, so 55 steps of 1 ounce is about $1,439: 14.4% of $10,000. For the pairs not quoted in US dollars (USD/JPY, USD/CAD, USD/CHF and EUR/GBP), the loss is turned into dollars at that day's exchange rate. In the most volatile weeks of 2025, the step was about twice as big, and so was the risk.

The strategy

What the grid trading strategy is

Grid trading is a way to trade without guessing which way price will go next. You place buy orders at fixed steps below the price and sell orders at the same steps above it. On a chart, the orders look like the lines of a grid. Each trade takes profit at the next line back toward the start price, the middle of the grid. While price moves up and down inside the grid, the orders fill and take profit again and again. When price keeps going one way, the grid keeps adding trades against the move, and every open trade loses more. So a grid needs a stop-loss for a long move in one direction, or an account big enough to wait for price to come back. Grid bots on crypto exchanges and many grid EAs (automatic trading programs for MetaTrader) work this way, and their rules vary a lot. We tested a basic version: a two-sided fixed grid with a hard stop. Two-sided means it has buy orders below the price and sell orders above it. Fixed means the lines stay where they are until the grid ends. In our test, a grid ends only when price reaches a hard stop: there is no profit target for the whole grid and no time limit.

Grid step
Half of ATR(14) on the daily chart, measured when the grid starts. On a typical day (the median) from 2011 to 2025, half a daily ATR was 28 to 53 pips on the currency pairs, and 41.5 on EUR/USD. It was $10.69 on gold and $0.28 on silver. A pip is 0.0001 on most pairs and 0.01 on USD/JPY. Our daily candles run from 17:00 to 17:00 New York time. Daily candles with no price movement, and the small candles some of our data has after the weekly close on Friday, are left out of the ATR
Grid lines
10 buy orders below the start price and 10 sell orders above it, one every step. So at most 10 trades are open on each side
Take-profit
One spread before the next grid line back toward the start price
Hard stop
11 steps from the start price, one step past the 10th line. When price gets there, all open trades on that side close, the grid ends and a new grid starts. A grid has no other end: no profit target for the whole grid and no time limit
Risk
1% of the account per full grid, not per trade. Every line trades the same size, set when the grid starts. A full grid has an open trade at all 10 lines on one side when the hard stop is hit. It loses 10 + 9 + ... + 1 = 55 steps of that size, and that is 1% of the account. So one trade risks much less: 10/55 of 1% at the first line, and 1/55 of 1% at the 10th. A winning trade makes one step minus the spread: a little less than 1/55 of 1%. Under 'How we tested it', 'risking 1% of the account on each trade' means 1% per full grid on this page. So does 'the risk of each trade set to 1%' under 'All the numbers, test by test'
Account
$1,000,000. A grid splits its 1% risk between 10 trades. Each trade must be at least the smallest size a broker allows: 0.01 lots. That is 1,000 units of a currency pair, 1 ounce of gold or 50 ounces of silver. On a $10,000 account, that smallest size already makes a full grid risk more than 1% (see 'What a grid risks on a $10,000 account'). On $1,000,000, every line could trade the size that makes a full grid risk 1%. Sizes are rounded down to steps of 0.01 lots, so a full grid risked a little less than 1%. The % results would be about the same on any account large enough that this rounding barely changes the trade size: several times the accounts in that table
Chart
15-minute candles. A grid's orders wait at fixed prices, so the grid itself needs no chart. But our backtest engine places an order again only when a candle closes. So sometimes price reached a take-profit and came back to the line where that trade opened, within one candle. Then the backtest missed the new trade, and a grid bot would have made it. We also ran EUR/USD, EUR/GBP and gold on 5-minute and on 1-hour candles. The results stayed within 3.1 percentage points of the 15-minute ones. EUR/USD made +2.4% on 5-minute, +0.2% on 15-minute and +1.5% on 1-hour candles. EUR/GBP made +10.4%, +10.6% and +7.5%, and gold lost 11.1%, 10.7% and 11.4%
Fills
A limit order fills at its own price as soon as price touches it, and so does a take-profit. A hard stop fills at its price, or at a candle's open if price opens past it (a gap). We use 1-minute prices to see what happened first inside a candle. With a real broker, a buy order fills only when the ask price (the price you buy at) reaches it. A sell order fills only when the bid price (the price you sell at) does. So a few of these fills would not happen. In a crash, a stop-loss can fill far past its price (see the Swiss franc in the findings)
Trading costs
The spread is the gap between the buy price and the sell price. It is 0.8 pips on EUR/USD, 0.9 on USD/JPY, 1.0 on AUD/USD, 1.2 on GBP/USD and EUR/GBP, 1.3 on USD/CAD and 1.5 on USD/CHF and NZD/USD. It is $0.30 an ounce on gold and $0.020 on silver; the silver spread is wider than our backtest engine's own, to match a typical retail broker. Our engine fills limit orders and take-profits without a spread. So each take-profit sits one spread before the grid line, and a winning trade pays one full spread. With a typical step, that is about 2% to 4.5% of each win on the currency pairs, 3% on gold and 7% on silver. A trade closed at the hard stop pays half a spread. A real broker would charge a full spread there, but the missing half is less than 1% of a full grid's loss. The 'Trading costs' column under 'All the numbers, test by test' counts only that half spread at the hard stop, not the spread in the take-profits. We charged no commission
Overnight (swap) fees
Not included. Brokers charge (or sometimes pay) a fee for each night a trade is open at 17:00 New York time, and three times that fee on Wednesdays. 67.9% of the grid trades were open at 17:00 at least once. The average trade paid (or got) the fee 6.8 times, counting Wednesdays three times. A typical winning trade (the median) stayed open for 23.6 hours, and a typical trade closed at the hard stop for 6.6 days. For example, a fee of 0.3 pips a night would cost about 2 pips per trade: about 5% of a typical winning trade on EUR/USD, more than twice the spread. At many brokers, both buy and sell trades pay a fee on some markets, so these fees would lower most results on this page
Monte Carlo check
The check under 'How a test passes' shuffles single trades. A hard stop closes up to 10 trades at once, and a shuffle splits them up, so for a grid it shows a smaller fall than the real one. 'Max drawdown', which keeps the real order of the trades, is the better guide: 2.9% on EUR/GBP and 5.4% on USD/CAD, where the shuffle gave 1.6% on both. For a grid, the number of hard stops also says more about luck than the number of trades
Years
2011 to 2025. Before 2011, our 1-minute prices jump up and down much more than in later years, most of all on silver from 2007 to 2010. Those jumps look like errors in the old data. A grid takes profit on every small move back, so they would give it trades that probably could not have happened. So this test starts in 2011
Engine limits
Our backtest engine opens trades in one direction at a time. It refuses a new buy order while a sell trade is open, and a new sell order while a buy trade is open. In this grid, buys trade below the start price and sells above it, so this rarely mattered. When it did, the blocked order was placed once the other side's trades had closed
Price data
CFD prices: the prices a broker quotes for a CFD (contract for difference), the product most brokers outside the US offer for trading these markets

The rules we tested

  1. A grid starts at the close of a 15-minute candle. That close is the start price. ATR (average true range) is how far price moves in an average day, measured over the last 14 days on the daily chart. The step, the distance between two grid lines, is half of that ATR. The start price and the step stay the same until the grid ends.
  2. Place 10 buy limit orders below the start price, one every step, and 10 sell limit orders above it. A limit order waits at its price and fills when price reaches it. A sell order opens a short trade: you sell first, to profit if price falls.
  3. Each trade takes profit one spread before the next grid line back toward the start price. The spread is the gap between the buy price and the sell price. Stopping one spread short is how our backtest charges that cost. For example, a buy 3 steps below the start price takes profit one spread below the line 2 steps below the start price.
  4. When a trade has taken profit, place its order again at the same line. Our backtest does this when the 15-minute candle closes, if price is still on the correct side of the line. That is above the line for a buy order, and below it for a sell order. If not, the order waits until price is back on that side.
  5. Hard stop: every buy trade has its stop-loss 11 steps below the start price, one step past the 10th buy line. Every sell trade has its stop-loss 11 steps above it. When price gets there, all open trades on that side close and the grid ends. Its waiting orders on both sides are cancelled, and a new grid starts at the close of that candle, with a new start price and a new step.
  6. Every line trades the same size, set when the grid starts. There is no martingale: the size does not grow from one line to the next. Suppose all 10 lines on one side have an open trade when the hard stop is hit. Those trades lose 10 + 9 + ... + 1 = 55 steps of that size. Set the size so that this full loss is 1% of the account.

The method

How we tested it

The test

Markets
EUR/USD, GBP/USD, USD/JPY, AUD/USD, USD/CAD, USD/CHF, NZD/USD, EUR/GBP, Gold and Silver
Charts
15-minute candles
Dates
January 2011 to December 2025
Account
$1,000,000, risking 1% of the account on each trade
Trading costs
Included. Every trade pays that market's normal trading cost: the spread, which is the gap between the buy price and the sell price.

How a test passes

We call a test passed only if it meets all four checks. A strategy can make money in one backtest and still fail one of these checks.

  • At least 100 trades. With fewer trades, a good result could be luck.
  • It made money from 2011 to 2019 and again from 2020 to 2025. This shows whether the strategy kept working in the newer years, not only in the older ones.
  • A profit factor (the money won divided by the money lost) of at least 1.2 from 2020 to 2025, after trading costs.
  • In 95% of 1,000 random shuffles of the trades, the account must not fall more than 30% from its highest point.

Improvements

Can the grid trading strategy be improved?

We tried three changes that grid traders often argue about, one at a time, on the same 10 tests. Two change the space between the lines: a tighter grid, with lines a quarter of a daily ATR apart, and a wider one, with lines a full daily ATR apart. Both keep 10 lines on each side, the hard stop one step past the 10th line, and 1% risk per full grid. The third starts a new grid only when the market has no strong trend (daily ADX below 25). The table below explains each one. A grid with no hard stop is in the findings instead of this table, because its losing trades stayed open for years. If you pick the best change and judge it on the same years you used to pick it, it almost always looks better than it really is. So we picked the best change using 2011–2019 only: the change that made money in the most tests. In a tie, we would pick the one with the better middle test (the median: half of the tests did better, half did worse). Then we checked it on 2020–2025, the years we did not use to pick it.

Version Made money 2011–2019years used to pick the best version Made money 2020–2025years not used to pick it Made money in both periods Passed all four checks
Standard grid The rules under 'The rules we tested': lines half a daily ATR apart, 10 lines on each side, and a hard stop 11 steps from the start price. 5 of 10middle test +1.2% 5 of 10middle test −0.9% 3 2
Tighter grid: lines 0.25 daily ATR apart Lines a quarter of a daily ATR apart, half the standard step. The hard stop is still one step past the 10th line, so it is closer to the start price: 2.75 daily ATRs instead of 5.5. Each line trades twice the size, so a full grid still loses 1%. 5 of 10middle test 0.0% 4 of 10middle test −0.6% 3 1
Wider grid: lines 1 daily ATR apartBest on 2011–2019 Lines a full daily ATR apart, twice the standard step. The hard stop is 11 daily ATRs from the start price instead of 5.5, so price must move much further to reach it. Each line trades half the size, so a full grid still loses 1%. 8 of 10middle test +1.4% 2 of 10middle test −1.2% 1 1
Start a grid only when ADX is below 25 ADX(14) on the daily chart is an indicator of how strong a trend is, from 0 to 100. Many traders read a value below 25 as a market with no strong trend, where a grid should do best. With this change, a new grid starts only when the daily ADX is below 25. After a hard stop, the grid waits until the daily ADX is below 25 again. 6 of 10middle test +1.2% 3 of 10middle test −1.0% 3 2

In 2011–2019, the years we used to pick the best change, the wider grid did best. It made money in 8 out of 10 tests, compared with 5 with the standard rules. In 2020–2025, the years we kept for the check, it made money in only 2 out of 10, compared with 5. Only EUR/GBP made money in both periods with it, compared with 3 markets with the standard rules. The wider grid hit its hard stop only 3 to 17 times on each market in 15 years. Its gains were small: one more hard stop, about −1%, would have turned 4 of its 7 profitable tests into losses. The other two changes made money in both periods on 3 markets each, like the standard rules. The tighter grid made +28.0% on EUR/GBP, the best result of any version. But it also lost the most on the markets that moved one way: 27.2% on gold and 17.5% on USD/JPY. So in our test, no change made the grid clearly better: the market mattered more than the settings.

Passed all four checks with wider grid: lines 1 daily ATR apart

  • EUR/GBP, 15-minute

Questions

Questions traders ask

Does grid trading work?

Not on most markets, in our backtest. A grid places buy orders at fixed steps below a start price and sell orders above it, and each trade takes profit one step back. We tested a basic two-sided grid on the 7 major currency pairs, EUR/GBP, gold and silver, from 2011 to 2025, after the spread but before overnight fees. The step was half the daily ATR (how far price moves in an average day), with 10 orders on each side. A hard stop 11 steps from the start price closed all the open trades on one side at once. The grid won 84.5% of its trades, but 5 out of 10 markets lost money. Each hard stop lost about 1% of the account, as much as about 56 winning trades made, and the grid got 54.6 winning trades per hard stop. EUR/GBP (+10.6%) and USD/CAD (+10.2%) made the most, because price came back to their lines more often: 72 and 71 times per hard stop.

What is the best grid spacing?

None of the three spacings we tested clearly won. With lines 0.25, 0.5 and 1 daily ATR apart, the grid got 56.3, 54.6 and 55.7 winning trades per hard stop. That is close to the 55 that random price moves would give. So the spacing changed how often the grid traded, not the number of winning trades per hard stop. Lines 0.25 daily ATR apart made 4.7 times as many trades as lines 0.5 apart and paid the spread more often. They lost more in total: 25.7R, compared with 14.7R (1R is 1% of the account). With lines 1 daily ATR apart, the grid hit its hard stop only 3 to 17 times per market in 15 years, so its results stayed close to zero. It made money in 8 out of 10 tests in 2011–2019, but in only 2 out of 10 in 2020–2025.

Should a grid trading strategy have a stop-loss?

Yes, in our test, but only if your broker can fill it near its price. We used a hard stop: a stop-loss 11 steps from the start price that closes all the open trades on one side at once. Without it, the grid made money in 5 out of 10 tests, the same number, but it took much bigger risks. Losing trades stayed open until price came back. On 9 out of 10 markets, all 10 trades on one side were still open at the end of 2025. On 7 of them, the grid had not traded for at least 4 years. On gold, the sell trades opened in mid-2019 at $1,352 to $1,437 were still open at the end of 2025, with gold at $4,319. Counting those open trades, the gold test's account fell 53.2% from its highest point, compared with 11.6% with the hard stop, counted the same way. In all, the trades without a stop lost 37.0R, compared with 14.7R with the hard stop (1R is 1% of the account). But on 15 January 2015, when USD/CHF fell 29% in 18 minutes, a real broker could not have filled every stop order.

How much money do you need for grid trading?

About $14,300 to $25,100 on a currency pair, and over $100,000 on gold or silver, if you want a full grid to risk 1% of the account. A grid splits its risk between many small trades, and each one must be at least the smallest size a broker allows: 0.01 lots. We used the grid we tested: lines half a daily ATR apart, 10 lines on each side and a hard stop 11 steps from the start price. With 0.01 lots on every line, a full grid would risk 1.4% to 2.5% of a $10,000 account on the currency pairs, on a typical day in 2025. On gold it would risk 14.4%, and on silver 11.3%. So you need about $113,300 on silver and $143,900 on gold to keep a full grid at 1%.

Keep exploring

Related strategies we tested

RSI RSI + Bollinger Bands strategy backtest Made money in 5 of 30 tests, 4 of them in both periods. Best: EUR/GBP, 4-hour, +35% Pivot points Pivot point bounce strategy backtest on forex, gold and indices Made money in 3 of 27 tests, 3 of them in both periods. Best: Nasdaq 100, 5-minute, +257% ADX ADX / DMI crossover strategy backtest Made money in 7 of 30 tests, 1 of them in both periods. Best: USD/JPY, 4-hour, +18% RSI RSI overbought/oversold strategy backtest Made money in 4 of 24 tests, 2 of them in both periods. Best: DAX, 1-hour, +92% Bollinger Bands Bollinger Bands mean reversion strategy backtest Made money in 9 of 36 tests, 3 of them in both periods. Best: S&P 500, 4-hour, +46%
The strategy code we ran

This is the exact code from the BacktestingMax strategy engine. Paste it into the strategy editor in the app to run it on any market.

class GridTrading(Strategy):
    """Grid trading: a basic two-sided fixed grid with a hard stop. Grid rules vary a lot
    between traders and bots; this is the simplest common form.
    The grid. A grid starts at the close of a candle. That close is its start price, and its
    step is 0.5 x ATR(14) of the daily candles: the average daily range over the last 14 days
    (Wilder's smoothing; daily candles with no price movement, and the small candles some data
    has after the weekly close on Friday, are left out). Both stay fixed for the life of the
    grid.
      - 10 buy limit orders wait below the start price, one every step.
      - 10 sell limit orders wait above it, one every step.
      - Each trade takes profit one spread before the next grid line back toward the start
        price: a buy 3 steps below the start takes profit one spread below the line 2 steps
        below it. Our engine fills a limit order at its own price and charges no spread on it,
        so this is how each grid trade pays the spread (you buy at the ask and sell at the bid).
      - When a line's trade has taken profit, its order is placed again at the close of that
        candle, if price is still on the correct side of the line (above a buy line, below a
        sell line). If not, it waits until price is back.
      - Hard stop. Every buy has its stop-loss one step below the 10th buy line, 11 steps below
        the start price, and every sell one step above the 10th sell line. When price gets
        there, all open trades on that side close and the grid ends: its waiting orders on both
        sides are cancelled, and a new grid starts at the close of that candle. A grid has no
        other end (no profit target for the whole grid, no time limit).
      - Size. Every line trades the same size (no martingale), set when the grid starts: a loss
        of 1 + 2 + ... + 10 = 55 steps on one line's size is 1% of the account. So a full grid,
        with all 10 lines on one side open when the hard stop is hit, loses about 1%.
    Engine limits. This engine keeps one direction at a time: it refuses a new buy order while
    a sell trade is open, and a new sell order while a buy trade is open. In this grid, buys
    trade below the start price and sells above it, so the two sides are almost never open
    together. When they are (price crossed the start price inside one candle), the blocked
    order is placed again once the other side's trades have closed.
    The changes, one at a time:
      step_atr  = 0.25  tighter grid: lines 0.25 x the daily ATR apart
      step_atr  = 1.0   wider grid: lines 1 x the daily ATR apart
      adx_max   = 25    start a new grid only when the daily ADX(14) is below 25 (a market
                        without a strong trend); while it is 25 or more, wait
      hard_stop = 0     no hard stop: open trades stay open until they reach their take-profit,
                        however far price goes (same sizes as with the stop), and the grid
                        never restarts
    """
    params = {"step_atr": Param(type=float, default=0.5, min=0.05, max=5.0),
              "levels": Param(type=int, default=10, min=1, max=20),
              "adx_max": Param(type=float, default=0.0, min=0.0, max=100.0),
              "hard_stop": Param(type=int, default=1, min=0, max=1)}
    max_open_positions = 20
    lookback = 20
    # The spread each market pays in these tests, in pips (gold's pip is $0.01, silver's
    # $0.001). Other markets: 1 pip.
    SPREAD_PIPS = {"EURUSD": 0.8, "GBPUSD": 1.2, "USDJPY": 0.9, "AUDUSD": 1.0,
                   "USDCAD": 1.3, "USDCHF": 1.5, "NZDUSD": 1.5, "EURGBP": 1.2,
                   "EURJPY": 1.4, "GBPJPY": 2.5, "XAUUSD": 30.0, "XAGUSD": 20.0}
    def init(self, ctx):
        self.d1 = ctx.tf("D1")
        self.d1_adx = self.d1.indicator("builtin:adx", period=14)
        self.d1_done = -1      # the last daily candle counted in the ATR
        self.prev_close = None
        self.trs = []
        self.atr = None
        self.grid = None
    def update_atr(self):
        """Wilder ATR(14) of the daily candles, without flat or weekend candles."""
        idx = self.d1.bar_index
        while self.d1_done < idx:
            self.d1_done += 1
            off = idx - self.d1_done
            if off >= self.lookback:
                continue  # a gap of many days in the data: only the recent days count
            h, l, c = self.d1.high[off], self.d1.low[off], self.d1.close[off]
            if h is None or l is None or c is None or h <= l:
                continue  # no price movement: a holiday in the data
            # A daily candle closes at 17:00 New York, Monday to Friday. One that closes on a
            # Saturday or Sunday (UTC) is a few minutes of prices after the weekly close.
            if off == 0 and ((self.d1.bar_time // 86_400_000) + 3) % 7 >= 5:
                continue
            pc, self.prev_close = self.prev_close, c
            if pc is None:
                continue
            tr = max(h - l, abs(h - pc), abs(l - pc))
            if self.atr is None:
                self.trs.append(tr)
                if len(self.trs) == 14:
                    self.atr = sum(self.trs) / 14
            else:
                self.atr = (self.atr * 13 + tr) / 14
    def start_grid(self, ctx):
        n = ctx.params.levels
        step = ctx.params.step_atr * self.atr
        spread = self.SPREAD_PIPS.get(ctx.symbol, 1.0) * ctx.pip_size
        if step <= spread:
            return
        start = ctx.close[0]
        if start - (n + 1) * step <= 0:
            return
        # A full grid loses 1 + 2 + ... + n steps of one level's size (55 for 10 levels).
        # Size it so that this is 1%: one step on one level is 1% / 55.
        full = n * (n + 1) / 2
        unit = ctx.size_by_risk_pct(0.01 / full, stop=start - step, entry=start)
        if unit <= 0:
            return
        self.grid = {"start": start, "step": step, "tp": step - spread, "unit": unit,
                     "stop_low": start - (n + 1) * step, "stop_high": start + (n + 1) * step,
                     "buy": [None] * n, "sell": [None] * n}
    def arm_levels(self, ctx, g, positions):
        pending = {o.order_id for o in ctx.orders}
        open_ids = {p.entry_order_id for p in positions}
        has_long = any(p.is_long for p in positions)
        has_short = any(p.is_short for p in positions)
        stop = ctx.params.hard_stop == 1
        price = ctx.close[0]
        for side in ("buy", "sell"):
            ids = g[side]
            for k in range(1, len(ids) + 1):
                oid = ids[k - 1]
                if oid is not None and (oid in pending or oid in open_ids):
                    continue  # this level's order is waiting, or its trade is open
                ids[k - 1] = None
                if len(positions) >= ctx.max_open_positions:
                    return
                if side == "buy":
                    level = g["start"] - k * g["step"]
                    if has_short or price <= level:
                        continue  # placed again later
                    order = ctx.buy(size=g["unit"], limit=level, sl=g["stop_low"] if stop else None,
                                    tp=level + g["tp"], tag="grid_buy")
                else:
                    level = g["start"] + k * g["step"]
                    if has_long or price >= level:
                        continue
                    order = ctx.sell(size=g["unit"], limit=level, sl=g["stop_high"] if stop else None,
                                     tp=level - g["tp"], tag="grid_sell")
                if order is not None:
                    ids[k - 1] = order.order_id
    def on_bar(self, ctx):
        self.update_atr()
        if self.atr is None:
            return
        g = self.grid
        positions = ctx.positions
        stopped = g is not None and ctx.params.hard_stop == 1 and (
            ctx.low[0] <= g["stop_low"] or ctx.high[0] >= g["stop_high"])
        if stopped:
            # The hard stop: every trade on that side closed at its stop-loss in this candle.
            for side in ("buy", "sell"):
                for oid in g[side]:
                    if oid is not None:
                        ctx.cancel_order(oid)
            self.grid = g = None
            if positions:
                ctx.close_all()  # anything left closes at the next candle's open
                return
        if g is None:
            if positions:
                return
            adx = self.d1_adx.adx[0]
            calm = ctx.params.adx_max <= 0 or (adx is not None and adx < ctx.params.adx_max)
            if not ctx.gate("adx_below_max", calm):
                return
            self.start_grid(ctx)
            g = self.grid
            if not ctx.gate("grid_started", g is not None):
                return
        self.arm_levels(ctx, g, positions)

Your turn

Test the grid trading strategy yourself

Change the settings, the market or the stop-loss and see the result in seconds. Ask the BacktestingMax AI: Backtest a grid trading strategy on EUR/GBP, 15-minute chart: 10 buy limit orders every half daily ATR below the price and 10 sell limit orders above it, take profit one step back, close each side 11 steps from the start price, 1% risk per full grid.

Try it free in BacktestingMax

Free account. No credit card needed.

See every strategy we tested Browse strategies shared by traders

Backtest on historical data with trading costs, run by BacktestingMax. Past results do not guarantee future results, and nothing here is financial advice. Updated 2 November 2026.