OptiNod Academy

Grid Trading — The Machine That Harvests Chop, and Why One Trend Takes It Apart

A grid's smooth cumulative curve plots only realized gains, so the calmer the curve looks, the deeper the unrealized losses you have not yet cut are piling up underneath it. This piece uses verified BTC cases to lay out how a structure that collects gains in a sideways box comes apart in a single trend, and the operating rules for running a bot only while its range assumption holds.

> A grid's smooth cumulative curve looks like a calm uptrend, but in reality it is the unrealized losses on the opposite side — positions you have not yet cut — stacking up like rungs of a ladder.

That is why the smoother the curve, the deeper the debt you have postponed closing. Grid Trading slices a fixed price range into even intervals to build a grid, then mechanically repeats one rule: buy when price drops one rung, sell when it rises one rung. If a rung is 1% wide and you subtract 0.5% in fees, each round trip realizes that rung's gain. As long as price keeps oscillating within the same range, the same capital stacks gains dozens of times a day, so the cumulative profit-and-loss curve rises almost in a straight line.

Most people look at this curve and call it an "automatic money printer that earns even while you do nothing." The "stable X% per month" backtest curves that bot exchanges advertise are mostly this same smooth straight line. But that straight line plots only realized profit and loss. Because a grid buys at each rung as price falls, an unbroken decline leaves buy positions it cannot close stacking up like a ladder. This unrealized loss does not show up on the curve.

So the fact that a grid curve is smooth looks like a sign that things are running well, but in reality it means you are holding the opposite-side positions without having cut a single one. The smoothness of the curve and the depth of the unrealized debt you are holding grow together. When you look at a grid's cumulative curve, look first not at the slope of the straight line but at the length of the unrealized-loss ladder laid out beneath it.

The split between the realized-PnL curve and the actual account curve
The split between the realized-PnL curve and the actual account curveA grid shows the realized PnL of closed trades smoothly, but the unrealized loss on open positions shows up in the actual account curve.

The Cumulative Curve Plots Only the Realized Part, So Its Smoothness Is Debt You Have Postponed

The reason a grid's cumulative profit-and-loss curve is smooth is simple. The curve adds up only the gains realized by round-tripping rungs. When price falls and a buy rung is filled, that position stays in the account at an unrealized loss, and the curve does not change at all. A flat curve looks like the losses have disappeared, but in reality it is the result of pushing those losses off the curve.

This is dangerous because the screen the trader sees and the real risk in the account drift apart from each other. Looking only at the realized curve, gains keep stacking even in a downtrend, so on screen the bot appears to be making money. Meanwhile the account's real value is being shaved down by the size of the unrealized-loss ladder. If you measure maximum drawdown from the realized-PnL curve alone, this risk is not even measured.

In September 2024, BTCUSDT oscillated all month between a low of $52,550 and a high of $66,498, with a September 1 close of $57,301. Had you laid a 1.5%-wide grid across this range, dozens of rung round trips would have occurred and the realized curve would have risen cleanly. Run the same bot through a trending stretch and the shape of the curve changes completely.

When you run a grid bot on the chart, always keep the realized cumulative curve and the account equity curve up side by side. The moment the two curves start to diverge is the moment the unrealized ladder begins to stack.

A Grid Bets on Mean Reversion in One Direction Only, So When a Trend Arrives the Bot Falls Apart

Every rung in a grid rests on the same assumption: that price returns to this range. The act of buying one rung down is a mean reversion bet that price will bounce and let you sell at the rung above. A grid that does not assume a range cannot exist.

So when price leaves the range and keeps going one direction, the grid repeats the most unfavorable trade exactly as it was designed to. In a downtrend it buys at every falling rung, lowering the average price while endlessly growing a losing position. The reason a trend breaks the bot is that the bot is built to treat a decline as nothing but a chance to buy cheaper. Trend following and mean reversion each make money only in opposite market regimes, and a grid is the most extreme form of betting every rung on the mean-reversion side.

The November 2022 FTX collapse is a textbook case. BTCUSDT fell over two days from a November 7 close of $20,591 to a November 9 low of $15,588. A bot with a grid laid across the $20,000–$22,000 range would have repeated buys at every rung all the way down, so by the time price broke the lower bound the entire account was filled with an unrealized-loss ladder. Even then, the realized curve still displayed the gains it had banked a few days earlier.

Once price breaks the top or bottom of the grid, from that moment the bot can no longer make a profit and just keeps averaging down. Draw the range boundaries on the chart as horizontal lines, and treat the moment price touches a boundary as the end of the stretch where the bot works properly.

Behind the Phrase "Infinite Grid" Lies the Premise That Capital Is Infinite

The reason settings like "no-limit grid" and "infinite grid" are dangerous is that saying the price range has no floor rests on the premise that your capital has no floor. To keep buying no matter how far price drops, the funds backing those buys would have to be infinite. A real account has a floor.

In a grid that uses leverage, this premise leads straight to risk of ruin. The deeper the unrealized-loss ladder gets, the more the account's margin is eaten away, and when some rung touches the liquidation price the entire position is force-liquidated even though the bot never cut a single loss. A grid is a structure that, in exchange for steadily realizing small gains, takes on one rare tail loss that can wipe out the whole account.

On May 19, 2021, BTCUSDT fell nearly 30% in a single day, from that day's open of $42,850 to a low of $30,000. An account running a 3x-leverage infinite grid across the $40,000–$45,000 range faced a drop where one day's move alone could sink the entire ladder into a deep unrealized loss and touch the liquidation price. The bot's realized curve had been a smooth uptrend right up to the day before.

When you evaluate an infinite grid, first calculate as a number "how much further below the bottom of the range does price have to fall for margin to hit zero." If that number is smaller than a single past daily candle's range, that grid is infinite in name only — in reality it is a finite, short grid.

Narrowing the Rungs Shrinks Each Gain, and Fees Eat the Gain

The narrower you make the rungs, the more round trips occur and the smoother the curve looks — but this smoothness carries a price. The rung width is the maximum gain you can capture in one round trip, and the slippage and fees on both sides come out of that gain. Narrow the rungs and the curve smooths out, but the net gain per rung is shaved by fees to the same degree.

For example, if you set each rung at 0.3% wide and a market-order round trip costs 0.1% on each side for 0.2% total, the net gain left in hand from round-tripping one rung is just 0.1%. On days when volatility falls short of the rung width and rungs barely fill, no round trip happens at all, so narrowing the rungs earns no gains and only stacks the unrealized ladder more densely. Narrowing the rungs is the work of finely fitting the grid to past volatility, which is a classic form of overfitting.

Set rung width to the volatility of the asset. If you set rung width with ATR, wide rungs are automatically assigned to high-volatility assets and narrow rungs to low-volatility ones. Set rung width as a fixed multiple of ATR rather than a fixed %, and first confirm that the rung leaves a net gain of at least 3x the fee per round trip. The 3x value is the minimum buffer to absorb the degree to which slippage and missed fills shrink the realized gain below the calculation.

A Grid's Profit Comes From the Judgment of Choosing the Range Well

The core of how a grid bot makes money looks like the repeated act of round-tripping rungs, but the real basis for making money is the judgment that this asset will not leave this range right now. The bot makes a profit only while that judgment is right, and from the moment the judgment is wrong it just keeps averaging down. Automation is only the tool that executes the judgment; the decision that divides profit from loss is the range a person chose.

So the place to lay a grid should be a sideways box where support and resistance clearly wall off both sides. The safest place for the range assumption is when the upper and lower bounds of the Donchian Channel have been pressed flat for a period and ADX (Average Directional Index) is low, signaling a weak trend, both at once. Conversely, when the channel width begins to widen, that is a sign the box is breaking, so you should stop the bot.

The following is one setup for laying a grid in a sideways box. The "70% of box width" value on the take-profit label is a pre-emptive defensive line that reduces new buys before the invalidation condition (a 1 ATR break) triggers, keeping the ladder from growing any longer.

  • Entry (set the range): When the difference between the 20-day high and low is narrow — within ±3% of that range's center price — and ADX<20, set the space between the box top and bottom as the grid range.
  • Rung width: Set rung width to daily ATR×0.5, but first confirm that the net gain per rung is at least 3x the round-trip fee.
  • Capital allocation: Divide total operating capital by the number of rungs, and keep leverage at 1x so that even if price falls all the way to the box bottom and every buy rung fills, margin does not touch the liquidation price.
  • Take-profit / management: When price passes the point 70% of the box width up from the box bottom (with 30% of the distance to the top remaining), stop creating new rungs and settle only the positions already filled.
  • Invalidation (stop the bot): If the close breaks the box top or bottom by 1 ATR or more, stop the bot and manage the remaining unrealized positions separately.

While the box holds, let the bot run as is; when the invalidation condition triggers, a person steps in to cut the ladder. The time the smooth curve looks best is the time the unsettled debt has stacked up longest. Deciding as a number, before you run the bot, where to cut that debt is the core of grid operation.

Traps People Commonly Fall Into

Adding to the grid based on the realized curve alone. This is the pattern of adding funds and increasing rungs because the realized curve is rising smoothly. The smoothness is a sign that the unrealized ladder has not yet been settled, so adding funds is the same as increasing the size of the debt you have not settled. The time the curve looks best is often the time the ladder has stacked up longest.

Mistaking a structure without stop-losses for a safe one. This is the pattern of seeing a grid as loss-free because it does not take stop-losses. Not taking stop-losses means you are simply not realizing the loss while accumulating it as an unrealized loss, and it is a structure that, in exchange for collecting small gains, takes on a rare tail loss in full. A structure with no stop-losses looks as if the risk has disappeared, but in reality the risk has been postponed so that it all arrives at once.

Run the Bot Only After You Have Confirmed the Box Is Valid

The core of making a grid robust is the procedure of confirming, before you run the bot, that the range assumption is valid. Because all of a grid's risk appears at once the moment the range assumption breaks, checking that assumption is the single biggest safeguard. Run the bot only when all of the following items are met.

  • [ ] The difference between the 20-day high and low is narrow — within ±3% of that range's center price — and ADX<20.
  • [ ] The Donchian Channel's upper and lower width is holding without widening versus the prior stretch.
  • [ ] The net gain per rung (rung width − round-trip fee) is at least 3x the round-trip fee.
  • [ ] Even if every rung fills down to the box bottom, margin does not touch the liquidation price (at 1x leverage).
  • [ ] You have set an invalidation condition in advance that stops the bot if the close breaks a box boundary by 1 ATR.

Look again at a grid's smooth curve, and it looks like evidence the bot is doing well, but in reality it is a screen that hides how much of the opposite-side position — the part you have not yet cut — has piled up. When the curve is calmest the ladder is deepest, and the single trend that settles that ladder all at once erases all the profit earned along the way.

How a range-bound grid turns into a loss ladder in a breakout market
How a range-bound grid turns into a loss ladder in a breakout marketWhile price is inside the box it sells at grids touched above and buys at grids touched below, but once it breaks the box bottom only buy fills accumulate and unrealized loss stacks up like a staircase.