Skip to content
MT5MT4soonTradingViewsooncTradersoonNinjaTradersoonPythonsoon
Expert Advisors & automation

Grid trading

Also called Grid strategy, Forex grid trading, Grid EA, Grid bot

Grid trading is a strategy that places buy or sell orders at fixed price steps above and below a starting price. Each order aims for a small profit as price swings back and forth, with no forecast of direction.

The catch: one steady trend can wipe out weeks of those small wins. Before you run one, look past the profit per level. The number that decides your risk is how much open loss the grid can carry before your broker's stop-out closes your positions for you.

How a grid of orders is built

Most grids are built from five settings. You pick an anchor price, which is where the grid starts. You pick a grid step, which is the distance in pips between levels. Then you set a lot size per level, a take profit for each order and a maximum number of levels.

The grid step is the setting that matters most. Size it against how far the pair usually moves in a day, and keep it many times the spread. Here is an illustrative example. A pair moves about 100 pips on a normal day and the spread is 1 pip. A 20-pip step gives 100 ÷ 20 = 5 levels that one day's swing can cross. The spread then costs 1 ÷ 20 = 5% of each 20-pip win.

Use two rules. If the step is less than about 10 times the spread, widen it, because the spread eats too much of each win. If the step is close to or larger than the daily range, shrink it, because levels will rarely fill.

A buy grid places buy orders at each step below the anchor, so you buy as price falls. A sell grid places sell orders at each step above it. A two-way grid does both. All open grid trades together are called the basket. Many automated grids manage the basket as one unit and close everything at a combined profit target.

Buy grid, sell grid and two-way grid around an anchor price
Buy levels sit below the anchor and sell levels above it, each one grid step apart. A two-way grid uses both sides. Illustrative values.

A buy grid in a range and in a trend

The figures here are an illustrative example. You run a buy grid on a USD-quoted pair with the anchor at 1.1000. The grid step is 20 pips and each level trades 0.10 lot, which is $1 per pip. Buy levels sit at 1.0980, 1.0960, 1.0940, 1.0920 and 1.0900, and each order takes profit 20 pips higher.

The chart below shows both outcomes. First, price dips to 1.0960 and comes back above 1.1000. The buys at 1.0980 and 1.0960 both hit their take profits. That is 20 pips × $1 = $2 each, so you make $4.

Buy grid with 20-pip steps: a dip that recovers, then a one-way fallIllustration
Anchor1.1000Buy level 11.0980Buy level 21.0960Buy level 31.0940Both take profits hit2 buys filled5 buys open, $200 floating l

Then price falls without bouncing. The grid re-places the two closed buys, so all five levels fill on the way down to 1.0900, and none of them reaches its take profit. The calculation below shows what you now hold, and what happens if the fall carries on to 1.0800.

Floating loss on a 5-level buy grid, 20-pip steps, 0.10 lot per level
Pips against each buy at 1.090080 + 60 + 40 + 20 + 0= 200 pips
Floating loss at 1.0900200 × $1= $200
Extra loss if price falls 100 more pips5 × 100 × $1= $500
Floating loss at 1.0800$200 + $500= $700
Open loss vs. range profit$700 vs. $4

$700 ÷ $4 = 175 dip-and-recover cycles like the first one to earn back a single 200-pip fall.

The floating-loss formula to run before you start

When price reaches your last level, your open loss is:

Pip value × grid step × N × (N − 1) ÷ 2, where N is the number of levels.

The formula assumes equal lots on every level, with no multiplier, and the first level one step below the anchor. Check it against the example: $1 × 20 × 5 × 4 ÷ 2 = $200. After that, every extra pip of fall costs you N × pip value, which is $5 per pip here.

Use it as a decision rule. Work out the loss at the price where you would give up on the grid. If that loss is more than you would accept on a single trade, cut the levels, cut the lot size or widen the step. Do this before you start, not once the basket is already open.

Some grids multiply the lot size at each new level, a method called martingale. That makes the formula grow much faster. With a 2× multiplier, level five trades 16 times the first lot. With lots of 0.10, 0.20, 0.40, 0.80 and 1.60, the same position at 1.0900 carries 80 × $1 + 60 × $2 + 40 × $4 + 20 × $8 + 0 × $16 = $520 of floating loss, against $200 with equal lots.

Floating loss at 1.0900: equal 0.10 lots vs a 2× martingale gridIllustration
Equal lots (0.10 each)
$200
2× multiplier (0.10 to 1.60)
$520
The same five levels and the same price, but doubling the lot at each level raises the open loss from $200 to $520.

Why your balance rises while a grid is losing

Watch equity, not balance. Closed small wins raise your balance, while open losses only show in equity. A rising balance with falling equity is the classic sign of a grid in trouble.

Balance rising while equity falls in a losing grid
Each closed win lifts the balance, but the open loss only shows in equity. The widening gap is the warning sign. Illustrative values.

Turn that warning sign into a rule you set in advance. If equity falls 5% below balance, stop adding levels. If it falls 10% below, close the whole basket. With illustrative numbers: on a $5,000 balance, 5% is $250. In the earlier example the grid is $200 down at 1.0900. Below that, each pip costs $5, so it reaches $200 + 10 × $5 = $250 at 1.0890. That is where you stop adding levels. The $500 close-out line (10%) comes at $200 + 60 × $5 = $500, at 1.0840.

Checks before you switch a grid on

  • Count how many levels fit between today's price and your give-up price, and use that as N.
  • Set a hard exit for the whole basket, either a price or an equity loss. Without one, the grid's loss has no limit.
  • Look at the market's recent behaviour. Grids suit sideways markets and suffer in trends. Avoid starting one just before major news.
  • Make sure your margin can hold every level at once, plus the extra loss beyond the last level.
  • Make sure the step is much larger than the spread. Otherwise the spread eats each small win.
  • Check an automated grid's settings for a hidden lot multiplier.
  • Test it on a demo account through both a quiet range and a strong trend.

FAQ

Do overnight swap fees matter for a grid?

Yes. A grid in drawdown can hold many positions for days, and each one pays or earns swap every night. If the swap is negative, the cost grows with the number of open levels and can wipe out the small take-profit wins.

Can I run a grid by hand without a grid robot?

You can place the pending orders by hand. Managing the take profits, refilling levels and tracking the basket gets slow once several levels are open. Traders who do it by hand usually keep to a few levels and set one stop for the whole group.

Are grid robots allowed on prop-firm and broker accounts?

It depends on the firm. Some restrict grid or martingale strategies, or limit the number of open positions. Read the account rules before you attach a grid robot, because breaking them can cancel the account.

Related terms