Skip to main content
grid tradingwhat is grid tradinggrid bot
Grid trading explained: what it is and how grid bots work

Grid trading explained: what it is and how grid bots work

Grid trading is a strategy that splits a price range into levels, places buy orders below the current price and sell orders above it, and sells each bought part one level higher. It earns from repeated swings inside the range and loses when the price leaves the range and the coins it holds keep falling.

The strategy is mechanical and suits automation, but a poorly configured grid loses money to fees, gets caught by breakouts or sits idle because the spacing is wrong. This guide covers the formulas, the main grid types, a worked BTC/USDT example and the checks to run before you set a grid.

A note on grid bots and Freya Finance

This is general strategy education. Freya's grid bot is coming soon. Don't confuse it with Freya's Grid of Orders, the ladder of averaging orders inside a DCA bot (see Entry Orders & the Grid). Today Freya runs DCA bots and signal bots.

Key Takeaways

  • A grid bot places buy orders below the price and sell orders above it across a range; each buy that is sold one level higher earns the gap between the levels, minus fees.
  • Arithmetic grids use equal dollar spacing between levels; geometric grids use equal percentage spacing, which suits wider ranges.
  • Spot grids hold the coin with no leverage; futures grids trade contracts with leverage and can start neutral, long or short.
  • The worked example shows how to calculate the profit of one grid cycle after fees, and why a step smaller than about three times the round-trip fee is not worth running.
  • Grid trading suits sideways, range-bound markets (weak trend strength, for example ADX below 25) and struggles in strong directional breakouts.
  • Set grid width using 2× the 14-day ATR or the 20-period Bollinger Band width to match the asset's actual volatility range.
  • Grids suit ranges and DCA suits markets that pull back and recover; the decision rule below helps you choose.

Trading risk

The dollar amounts and percentages in this guide are worked examples, not recommendations. Crypto trading can lose money: size every bot with funds you can afford to lose, and read the full Risk Disclosure before going live.

What is grid trading?

Grid trading is a rules-based way to trade a price range: you choose a lower and an upper price, split the range into levels and let orders at those levels buy low and sell one level higher, again and again. One buy and the matching sell one level higher make one grid trade, often called a grid cycle.

Grid trading in cryptocurrency is usually run by a bot, because crypto markets trade 24 hours a day, 7 days a week, and prices often swing inside a range for days or weeks. A grid can run on the spot market, where it buys and holds the coin, or on futures, where it trades contracts with leverage (see the grid types below).

A grid needs two things: the price must keep moving up and down inside the range, and each step must be wide enough to cover the fees on both the buy and the sell.

How Grid Bots Work

A grid bot divides a price range into equally spaced levels and places limit orders at each level. Below the current price, the bot places buy orders. Above the current price, it places sell orders. When price drops to a buy level, the bot buys. When it subsequently rises to the next level above, the bot sells and keeps the difference, minus fees.

The Core Mechanism

Think of a grid as a vertical ladder laid across a price chart:

  1. Define a range: Upper bound (ceiling) and lower bound (floor)
  2. Set grid levels: The number of rungs on the ladder
  3. Bot places orders: Buy limits below current price, sell limits above
  4. Price oscillates: Each time price crosses a grid line downward → buy. Each time it crosses upward → sell.
  5. Cycles complete: Every buy followed by a sell one level higher is one grid cycle; its gain is the gap between the levels minus fees

The more the price bounces within the range, the more grid cycles complete.

A grid does not need to predict direction inside the range, but a spot grid holds more coins as the price falls, so it still loses value in a decline. A DCA bot works differently: it adds to one position as the price falls and closes it at a take profit above the average entry price, so it needs a recovery, while a grid needs repeated swings.

What Happens at the Boundaries

  • Price hits upper bound: All grid levels have been sold. The bot holds only the quote currency (USDT). No more sells can execute, so the bot is idle until price drops back into range.
  • Price hits lower bound: All grid levels have been bought. The bot holds only the base currency (BTC). No more buys can execute, so the bot is idle, and you hold unrealized losses if price keeps dropping.
  • Price returns to range: The bot resumes normal operation, executing orders as price crosses grid lines again.

Types of grid trading: spot and futures, neutral, long and short

Grids come in two market types, and on futures they can start in one of three directions.

Spot grid. The grid trades the coin itself with your own capital: it buys with USDT below the price and sells coins above it. There is no leverage and nothing to liquidate, but as the price falls the grid holds more of the coin, so a drop below the range leaves you holding coins worth less than you paid.

Futures grid. The grid trades futures contracts, usually with leverage. Leverage makes each step's gain and loss larger and adds liquidation risk: if the price runs far enough against the open position, the exchange closes it. On perpetual contracts, funding payments also add to or subtract from the result.

Grid typeStarts withGains whenMain risk
Spot gridUSDT for the buy orders, plus coins bought at the start for the sell ordersThe price swings inside the rangeThe price falls below the range while the grid holds coins
Futures neutral gridNo positionThe price swings around the starting priceA strong move either way, made larger by leverage
Futures long gridA long positionThe price swings, with an extra gain if it risesA fall below the range; liquidation with high leverage
Futures short gridA short positionThe price swings, with an extra gain if it fallsA rise above the range; liquidation with high leverage

A neutral grid opens longs as the price falls below its starting point and shorts as it rises above it, closing each one a level later. A long grid behaves like a spot grid with leverage, and a short grid is its mirror image.


Grid Parameters Explained

Every grid bot configuration requires four fundamental parameters. Get these right, and the grid trades on its own inside the range. Get them wrong, and you either waste capital or miss trades.

1. Upper Bound (Ceiling Price)

The highest price in your grid range. No sell orders are placed above this level. Setting this too low means the bot stops selling during normal price swings and misses profit. Setting it too high wastes capital on grid levels that price never reaches.

How to choose: Use a resistance level from the chart, or calculate as: Current Price + (2 × ATR × √periods). For a practical shortcut, use the upper Bollinger Band on a daily chart.

2. Lower Bound (Floor Price)

The lowest price in your grid range. No buy orders are placed below this level. Setting this too high means the bot stops buying during normal dips. Setting it too low spreads your capital across levels that rarely trigger.

How to choose: Use a support level from the chart, or calculate as: Current Price - (2 × ATR × √periods). The lower Bollinger Band on a daily chart works as a shortcut.

3. Number of Grid Levels

The total number of price levels (rungs) in the grid. More levels = smaller gaps = more frequent trades = smaller profit per trade. Fewer levels = larger gaps = less frequent trades = larger profit per trade.

The trade-off: With 5 levels across a $10,000 range, each gap is $2,000, so price needs to move $2,000 for one grid cycle. With 50 levels, each gap is $200: more cycles, but each earns less, and fees eat a larger percentage.

Sweet spot: For most setups, 8 to 25 grid levels balance frequency against per-trade profitability. The exact number depends on your range width and fee structure.

4. Investment Per Grid Level

The dollar amount allocated to each grid level. This can be calculated as:

Investment per level = Total Capital ÷ Number of Grid Levels

If you have $1,000 and 10 grid levels, each level gets $100.

You need capital on BOTH sides. Some capital must be in the quote currency (USDT) to fund buy orders below current price, and some must be in the base currency (BTC) or reserved to fund sell orders above. If you deploy a grid with $1,000 USDT and the price is in the middle of your range, roughly half funds buy orders and half funds sell orders.


Arithmetic vs Geometric Grid Spacing

The spacing between grid levels determines how your capital is distributed across the range. There are two approaches, and choosing the wrong one for your range width is a common mistake.

Arithmetic (Linear) Grid

Each grid level is separated by the same dollar amount.

Formula:

Grid Spacing = (Upper Bound - Lower Bound) ÷ Number of Grids

Level_n = Lower Bound + (n × Grid Spacing)

Example: Range $92,000 to $108,000, 8 grids:

Spacing = ($108,000 - $92,000) ÷ 8 = $2,000

Level 0: $92,000
Level 1: $94,000
Level 2: $96,000
Level 3: $98,000
Level 4: $100,000
Level 5: $102,000
Level 6: $104,000
Level 7: $106,000
Level 8: $108,000

Profit per grid (per $100 invested):

  • Buy at $92,000, sell at $94,000 → profit = $100 × ($2,000 ÷ $92,000) = $2.17
  • Buy at $104,000, sell at $106,000 → profit = $100 × ($2,000 ÷ $104,000) = $1.92

Notice: the dollar spacing is equal, but the percentage return per grid varies: lower levels yield higher percentage returns than upper levels.

Geometric (Logarithmic) Grid

Each grid level is separated by the same percentage.

Formula:

Grid Ratio = (Upper Bound ÷ Lower Bound) ^ (1 ÷ Number of Grids)

Level_n = Lower Bound × (Grid Ratio ^ n)

Example: Range $92,000 to $108,000, 8 grids:

Grid Ratio = (108,000 ÷ 92,000) ^ (1/8) = 1.17391 ^ 0.125 = 1.02025 (≈ 2.02% per level)

Level 0: $92,000
Level 1: $93,863
Level 2: $95,763
Level 3: $97,702
Level 4: $99,679
Level 5: $101,698
Level 6: $103,756
Level 7: $105,857
Level 8: $108,000

Profit per grid (per $100 invested): Every level has the same 2.02% gap, so each cycle earns about $2.02 before fees.

Which One Should You Use?

FeatureArithmetic GridGeometric Grid
Spacing MethodEqual dollar amount between levelsEqual percentage between levels
Profit Per GridVaries: higher at lower prices, lower at higher pricesConstant percentage at every level
Best ForNarrow ranges (< 20% width)Wide ranges (> 20% width)
Capital DistributionMore capital concentrated at higher pricesEvenly distributed by percentage
ComplexitySimple to calculate and understandRequires exponential math
Typical Use CaseBTC ranging $95K to $105KETH ranging $2,800 to $4,200 (50% range)
Fee SensitivityUpper levels more vulnerable to fee erosionUniform fee impact across levels

Rule of thumb: if your upper bound is less than 1.2× your lower bound (a 20% range), arithmetic and geometric grids produce nearly identical results. Above 1.3× (30%+ range), geometric grids distribute profit more evenly and are the better choice.


Optimal Market Conditions for Grid Trading

Grid bots are not universal tools. They're precision instruments designed for specific market conditions.

Where Grids Excel: Range-Bound Markets

The ideal grid market has three characteristics:

  1. Defined support and resistance: Price bounces predictably between two levels
  2. Sufficient volatility within the range: Price actually oscillates; a flat line produces no grid fills
  3. No strong directional bias: Price doesn't persistently push toward one boundary

How to confirm a range-bound market:

  • ADX (Average Directional Index) below 25: Indicates weak trend strength, which suits grids
  • Bollinger Band width stable: Bands neither expanding (breakout coming) nor contracting (squeeze)
  • Price repeatedly touching both support and resistance: At least 2-3 bounces off each side

In a strong uptrend, price blows through the upper bound, and the bot sells all its positions at the top of the range, then sits idle while the asset continues climbing. You've been sold out of a winning trade.

In a strong downtrend, price crashes through the lower bound, and the bot fills all buy orders, then sits idle while the asset keeps falling. You're holding a losing position with no grid levels left to average or sell.

Market ConditionGrid FitWhy
Sideways (range-bound)Best fitMaximum oscillation = maximum grid fills
Choppy with no trendGood fitFrequent fills, but a less predictable range
Mild uptrend (< 5%/week)MixedSome fills, but upper levels sell out
Strong uptrend (> 10%/week)Poor fitSold out quickly, misses upside
Mild downtrendPoor fitAccumulates losses at lower levels
Strong downtrend / crashWorst fitAll buys filled, holding heavy bags

Grid trading BTC example: a BTC/USDT grid from $92K to $108K

Let's build a complete grid configuration with real numbers. Every calculation is shown, with no hand-waving.

Setup Parameters

ParameterValue
Trading PairBTC/USDT
Total Capital$1,000
Current BTC Price$100,000
Lower Bound$92,000
Upper Bound$108,000
Grid Levels10
Grid TypeArithmetic
Exchange Fee0.1% per trade (taker)

Calculate Grid Levels and Spacing

Grid Spacing = ($108,000 - $92,000) ÷ 10 = $1,600 per level
LevelPriceOrder Type (at start)
0$92,000Buy
1$93,600Buy
2$95,200Buy
3$96,800Buy
4$98,400Buy
5$100,000← Current price
6$101,600Sell
7$103,200Sell
8$104,800Sell
9$106,400Sell
10$108,000Sell

At launch, the bot places 5 buy orders (levels 0 to 4) below the current price and 5 sell orders (levels 6 to 10) above.

Capital Allocation

With $1,000 and 10 grid levels:

Investment per level = $1,000 ÷ 10 = $100 per level
  • Buy side: 5 levels × $100 = $500 reserved in USDT for buy orders
  • Sell side: 5 levels × $100 = $500 worth of BTC purchased at start for sell orders (0.005 BTC at $100,000)

Profit per grid cycle, before and after fees

When the bot buys at one level and sells at the next level up:

Gross profit per grid = Investment × (Grid Spacing ÷ Buy Price)
Buy LevelBuy PriceSell PriceGross Profit (per $100)Fee Cost (buy + sell)Net Profit
0 → 1$92,000$93,600$1.74$0.20$1.54
1 → 2$93,600$95,200$1.71$0.20$1.51
2 → 3$95,200$96,800$1.68$0.20$1.48
3 → 4$96,800$98,400$1.65$0.20$1.45
4 → 5$98,400$100,000$1.63$0.20$1.43
5 → 6$100,000$101,600$1.60$0.20$1.40
6 → 7$101,600$103,200$1.57$0.20$1.37
7 → 8$103,200$104,800$1.55$0.20$1.35
8 → 9$104,800$106,400$1.53$0.20$1.33
9 → 10$106,400$108,000$1.50$0.20$1.30

Average net profit per grid cycle: $1.42

Adding up the cycles

If BTC oscillates across the full range and every grid level completes one buy-sell cycle:

Total profit (1 full sweep) = 10 levels × $1.42 avg = $14.20

How many cycles each level completes is the part nobody knows in advance. It depends on how often the price crosses each level: levels near the middle of the range, where the price spends more time, usually complete more cycles than levels near the edges. The total is the number of completed cycles times the net profit per cycle, minus any loss on coins the grid still holds when you stop it. A backtest on recent price data shows how many cycles a given range would have completed.

For grid results on historical market data, see grid bot profitability: real market data.


Grid or DCA: a quick decision rule

For a worked BTC/USDT comparison with the same budget and fees, see DCA vs grid bot: which strategy to choose.

Grid bots and DCA bots are both common automated strategies, but they suit different market conditions.

DimensionGrid BotDCA Bot
Core MechanismBuy low, sell high within a range; gains from oscillationBuy more as price drops, sell when price recovers above the average entry price
Ideal MarketSideways, range-bound (ADX < 25)Volatile with pullbacks (choppy uptrend)
Profit SourcePrice oscillation between grid levelsRecovery from dips; averaging down lowers the average entry price
Position ManagementMultiple small positions at each grid levelSingle position that grows with safety orders
Capital UsageSpread evenly across all grid levelsDeployed progressively as price drops
Risk ProfileBounded by the range, but a breakout hurtsDepends on a recovery; a deep drop can use up every safety order
Worst CaseStrong breakout: sold out (upside) or holding bags (downside)Endless decline: all safety orders used, deep underwater
Hands-Off CapabilityHigh inside the range; needs attention near the edgesHigh, but deep drops may need a decision from you
Monthly Return (typical)3 to 10% in range-bound markets4 to 12% in volatile trending markets
Best PairsEstablished pairs with defined ranges (BTC, ETH)Volatile pairs with strong recovery history (BTC, ETH, SOL)

Decision rule:

  • Is the market range-bound with clear support/resistance? → Grid bot
  • Is the market trending with regular pullbacks? → DCA bot (see our DCA Bot Strategy Guide)
  • Is the market in a strong, one-directional trend? → Neither: manual trading or sit on the sidelines
  • Not sure about the market condition? → Use ADX: below 25 = grid, above 25 = DCA or manual

On Freya today you can run the DCA side of this rule with a DCA bot; Freya's grid bot is coming soon.


Understanding failure modes is as important as understanding success conditions. Grid bots have two primary failure scenarios.

Failure Mode 1: Upside Breakout

BTC is ranging $92K to $108K, and you run a grid. Then Bitcoin breaks to $115,000 on a major catalyst.

What happens:

  1. All sell orders fill as price climbs through each grid level
  2. The bot sells the last tranche at $108,000
  3. Price continues to $115,000, and the bot has no position and no sell orders left
  4. You're holding 100% USDT while BTC rallies 6.5% above your range

The cost: You captured grid profits within the range (good), but missed the $7,000/BTC move above your upper bound (bad). If you'd simply held BTC, you'd have made more.

Mitigation strategies:

  • Keep 20-30% of your capital outside the grid as a "breakout reserve" in spot BTC
  • Set alerts at 95% of your upper bound to evaluate manually
  • Use a trailing upper bound that adjusts upward as price approaches the ceiling

Failure Mode 2: Downside Breakdown

BTC drops from $100,000 through your lower bound of $92,000, continuing to $85,000.

What happens:

  1. All buy orders fill as price drops through each grid level
  2. The bot buys the last tranche at $92,000
  3. Price continues to $85,000, and the bot holds about 0.0103 BTC bought at an average of about $97,500
  4. Unrealized loss: about $128 on the $1,000 (the BTC is worth about $872 at $85,000), before counting the grid profits already collected

The cost: You hold a declining asset with no more buy levels to average down. Unlike DCA bots, grid bots don't have safety orders that continue buying below the range.

Mitigation strategies:

  • Set a stop-loss order 2-3% below the lower bound ($89,240 for a $92,000 floor)
  • Reduce position size on grid levels near the lower bound
  • Monitor ADX: if it rises above 30, consider pausing the grid

The most dangerous scenario for a grid bot is a breakdown followed by a slow recovery. The bot bought all the way down, and now price is slowly climbing back through the range, but the bot is selling those positions at the same levels it bought them, netting zero or tiny profits while you wait for a full recovery. This is called "grid lock" and can tie up capital for weeks.


Setting Grid Width Using ATR and Bollinger Bands

Guessing your grid range is a recipe for either setting it too narrow (frequent breakouts) or too wide (capital spread too thin). Use volatility indicators to set data-driven ranges.

Method 1: ATR-Based Grid Width

The Average True Range (ATR) measures average daily price movement. Multiply by a factor to estimate a reasonable range.

Formula:

Grid Width = Current Price ± (ATR_14 × Multiplier)

Upper Bound = Current Price + (ATR_14 × Multiplier)
Lower Bound = Current Price - (ATR_14 × Multiplier)

Example with BTC at $100,000:

If the 14-day ATR on the daily chart is $3,200:

Multiplier = 2.5 (a wider range with fewer breakouts)

Upper Bound = $100,000 + ($3,200 × 2.5) = $108,000
Lower Bound = $100,000 - ($3,200 × 2.5) = $92,000
Total Range = $16,000 (16% of current price)

Multiplier guidelines:

MultiplierRange WidthRisk LevelUse Case
1.5NarrowAggressiveHigh-frequency, narrow grid
2.0MediumModerateStandard grid, balanced risk
2.5WideConservativeWide grid, lower breakout risk
3.0WidestVery conservativeMaximum coverage, capital-intensive

Method 2: Bollinger Band Width

Bollinger Bands (20-period, 2 standard deviations) provide a built-in volatility range. Use the outer bands as your grid boundaries.

Formula:

Upper Bound = Upper Bollinger Band (20, 2)
Lower Bound = Lower Bollinger Band (20, 2)

For wider coverage, use 2.5 or 3 standard deviations:

Upper Bound = SMA_20 + (2.5 × StdDev_20)
Lower Bound = SMA_20 - (2.5 × StdDev_20)

Example with ETH at $3,500:

If the 20-day SMA is $3,500 and standard deviation is $280:

BB Upper (2σ) = $3,500 + (2 × $280) = $4,060
BB Lower (2σ) = $3,500 - (2 × $280) = $2,940
Grid Range = $1,120 (32% of price)

Recalculate your grid boundaries every 1-2 weeks as volatility changes. If ATR is declining, tighten your grid to avoid idle levels. If ATR is expanding, widen the grid to avoid premature breakouts. A simple rule: revisit the boundaries when ATR changes by more than about 20% from your initial calculation.

Combining Both Methods

For a more cautious range, use both methods and take the intersection:

  1. Calculate ATR-based range (2× multiplier)
  2. Calculate Bollinger Band range (2σ)
  3. Use the narrower of the two as your grid range

This approach prevents you from setting a range wider than the market's current volatility justifies.


Grid Configuration Checklist

Before launching any grid bot, verify every item on this checklist:

StepCheckAction
1Market condition confirmed range-boundADX < 25, price has bounced between S/R at least 2×
2Range set using ATR or Bollinger BandsNot guessed: calculated from volatility data
3Grid levels appropriate for range widthEach gap at least 3× the round-trip fee (buy + sell)
4Capital fully allocatedTotal capital ÷ grid levels = investment per level
5Fees accounted forNet profit per grid > 0 after buy + sell fees
6Stop-loss set below lower bound2-3% below lower bound to limit downside
7Breakout alerts configuredAlert at 95% of both upper and lower bounds
8Backtested against recent price historyMinimum 30 days of data covering current market conditions

For comprehensive backtesting methodology, see our Backtesting Guide.


Frequently Asked Questions

What is grid trading in crypto?

Grid trading in crypto is a bot strategy that places buy orders below the current price and sell orders above it inside a range you choose, then sells each bought part one level higher. It suits sideways markets, and crypto trades around the clock, so a bot can catch swings at any hour. It loses when the price falls out of the range while the grid holds coins, and it misses gains when the price breaks out above the range.

Can I run a grid bot on Freya?

Not yet: Freya's grid bot is coming soon. Today you can run DCA bots and signal bots, and test DCA settings with a backtest. Freya's Grid of Orders is the ladder of safety orders inside a DCA bot, not a grid bot.

How much capital do I need for a grid bot?

Enough for every level to meet the exchange's minimum order value for the pair, plus the coins the sell side needs at the start. Capital is roughly the number of levels times the order size per level; in the BTC example above, 10 levels of $100 used $1,000. Exchange fees are a percentage of each order, so a small grid pays the same fee rate per cycle as a large one. What decides whether a grid is worth running is the step: each gap should cover the round-trip fee at least three times. Start with an amount you can afford to lose.

How many grid levels should I set?

For a 10 to 20% price range, 8 to 15 levels is a common choice. More levels = more frequent but smaller profits. Fewer levels = larger but less frequent profits. The critical constraint: profit per grid cycle must exceed trading fees by at least 3×. With 0.1% fees per trade (0.2% round trip), your grid spacing needs to be at least 0.6% of the price. For BTC at $100,000, that's a minimum $600 gap between levels.

Does grid trading work on altcoins?

It can, with care. Large, liquid coins such as ETH or SOL have the order book depth a grid needs and spend periods in ranges. Avoid low-cap tokens with less than $5M daily volume, where slippage eats the small gain per step, and avoid tokens in structural decline: a spot grid, like a long DCA bot, cannot make money on an asset that only goes down.

What happens to my profit if BTC breaks out of the range?

If BTC breaks above your upper bound, you've already sold all positions at each grid level, so your profit from those grid cycles is realized and kept. You just miss the additional upside above the range. If BTC breaks below your lower bound, you hold BTC bought at various grid levels with unrealized losses. Your grid profits partially offset these losses, but a large enough breakdown will result in net loss.

How do grid bots compare to holding spot?

In a range, a grid can collect small gains while holding only tracks the price; in a strong uptrend, holding keeps the whole rise while the grid sells early. Which ends higher depends on the path, the step and the fees.

Should I use a grid bot and a DCA bot together?

It can make sense. Run a grid on a pair in a confirmed range (for example, BTC during consolidation) and a DCA bot on a pair showing trending behavior with pullbacks (for example, ETH in a choppy uptrend). Allocate capital independently to each bot and monitor correlation: if both pairs tend to move together, you're doubling your directional exposure, not diversifying. On Freya you can run the DCA side today; the grid bot is coming soon. For more on managing multiple bot risk, see our Risk Management Guide.

How do I know when to close a grid bot?

Close or reconfigure when any of these conditions appear: ADX rises above 30 (a trend is forming), the price has touched the same boundary 3+ times without reversal (a breakout may be coming), ATR expands by 50% or more (a volatility regime change), or fees take most of the profit of each cycle.


Create an account

Put your knowledge into practice by opening a Freya account today.

Register Now

Related Articles

This content is for educational purposes only and does not constitute financial advice. Cryptocurrency trading involves significant risks. Never invest more than you can afford to lose.