Skip to main content
A grid bot splits a price range into levels and places limit orders at each of them: buy orders below the current price and sell orders above it. Every time the price moves from one level to the next and back, the bot buys low and sells high, and keeps the difference. It does not need to predict direction, only movement. Grid bots work best in sideways markets, where the price swings up and down within a range.

How the grid works

  1. You set a lower and an upper price, and the number of grid levels between them.
  2. The bot places buy orders at the levels below the current price and sell orders at the levels above it.
  3. When a buy order fills, the bot places a sell order one level higher.
  4. When a sell order fills, the bot places a buy order one level lower.
  5. Every completed buy-and-sell pair locks in the profit of one grid step.
If the price leaves the range, the bot stops trading until it comes back, unless a stop condition ends it first.

Parameters

Arithmetic or geometric

Futures grid modes

  • Neutral. Starts with no position. Buys below the price and sells above it, so it builds a long as the price falls and a short as it rises.
  • Long. Opens a long position at start and sells into strength. Profits from swings and from an upward drift.
  • Short. Opens a short at start and buys back into weakness. Profits from swings and from a downward drift.

Example

Spot grid on SOL, range $180 to $220, 20 arithmetic grids, $2,000 investment.
  • Each level is $2 apart.
  • Each level holds about $100.
  • When SOL drops from $200 to $198, the bot buys at $198. When it then climbs back to $200, the bot sells at $200, earning about 1% on that $100, before fees.
  • A day of choppy price action across many levels repeats this many times.

Choosing settings

  • Range. Set it around the zone where the price has been moving recently. Too narrow and the price leaves it quickly. Too wide and each level holds little capital and trades rarely.
  • Number of grids. More grids mean more trades with smaller profit each. Make sure the profit per grid stays well above the trading fee for a buy and a sell.
  • Stop loss. Set one below the range on a spot or long grid, and above the range on a short grid.
In a strong trend, a grid bot keeps buying as the price falls, or keeps selling as it rises, and ends up holding a losing position at the edge of the range. With leverage, this can lead to liquidation.