How a grid bot makes money
Most strategies try to guess where a price is going. A grid does not. It assumes only that the price will keep moving up and down, and it collects a small profit every time it does.
The ladder
You choose a range, say 100 to 130, and a number of levels, say 20. The bot cuts the range into 20 equal steps, which takes 21 lines, and rests limit orders on the lines nearest the current price: three buys on the lines below, three sells on the lines above.
When the price falls through a line, the buy on that line fills and the bot holds one slice. The sell for that slice now waits one line higher. When the price comes back up through that line, the slice is sold and the gap between the two lines is profit. The line below is then ready to buy again. Each buy-then-sell on neighbouring lines is one round trip.
On that example, each step is 1.5 USDT, about 1.3% of the price. That is the profit per round trip before fees, and it is the same however the price wanders, as long as it keeps crossing lines.
Two spacings are offered. Arithmetic spacing makes every step the same number of USDT; geometric spacing makes every step the same percentage. Within a narrow range (top less than about 1.5 times the bottom) they are nearly identical. Over a wide range, geometric keeps the low end from trading too rarely and the high end from trading for gaps that barely cover the fee.
When it works, and when it doesn't
A grid earns from oscillation. A stock or coin that swings back and forth inside your range, many times, is its best case. Two things hurt it.
- A fall through the bottom. Every line has bought on the way down, so the bot is holding a full position bought at higher prices, and there is nothing left to buy. It waits, still holding, until the price comes back into the range.
- A rise through the top. Every slice has been sold, so the grid has nothing left to sell and misses the rest of the climb. It also waits.
In both cases the bot keeps running and resumes by itself. Stopping it at the bottom would sell the position at the worst point.
Picking the range
Look at where the price has actually traded over the past weeks, not where you hope it goes. A range a little wider than the recent swings keeps the bot trading without leaving it outside. More levels mean smaller steps and more round trips; fewer levels mean larger steps and fewer. A step should be several times the round-trip fee, or the exchange takes most of the gap. A new grid on A9 starts holding nothing and buys only as the price comes down to its lines.
The trend gate A9 adds
The weak point of any grid is a one-way move, so A9's grid watches for one. Every 15 minutes it measures the efficiency ratio of the last two hours: how far the price actually travelled, divided by the total distance of every wiggle along the way. A straight line scores 1; a path that wanders back and forth scores near 0.
- When the ratio rises above 0.5 on a fall, the grid stops placing new buys. Its sells keep resting, so it can still exit.
- On a climb above 0.5, it holds its sells instead, so a straight run is sold higher in one piece rather than one step at a time. Its buys below keep resting.
- A hold lets go only when the ratio drops back under 0.4. The gap between 0.5 and 0.4 stops the bot switching on and off every quarter of an hour when the ratio hovers near the line.
New grids also lock one side after three fills in a row on that side, until the price turns back by one line. These are form defaults you can change. They are a guard against a one-way day, not a source of extra return.
Costs and fees
Three costs come out of each round trip.
- The exchange's trading fee, paid on the buy and on the sell. Grid orders rest on the book, so they usually pay the lower maker rate.
- Capital tied up. Money in slices bought above the current price earns nothing until the price comes back to them.
- The platform fee: a share of realized profit, 30% on Free, 25% on Core, 20% on Premium and 10% on Generation. It is charged only on profit above the bot's previous best, so a loss costs nothing and a recovery is not charged twice.