BOTLABPlatformFleetAuditLearnLab News

Learn · 2026-10-26

Grid Trading Bot Backtest: How to Test One Honestly

Bot counts and results quoted in this guide are as of 2026-10-26. Current numbers: Fleet · For judges.

A grid trading bot backtest is only useful if it models how grid orders actually fill, charges every fee and funding payment, and includes the moment price leaves your range. Most grid backtests look smooth because they skip at least one of those, so the honest test is less about the profit line and more about what happens at the edges.

This guide shows how to backtest a grid bot properly, where grid backtests usually lie, and how to read the result before you risk real money.

What a grid trading bot backtest has to prove

A grid bot places buy orders below the current price and sell orders above it, at fixed spacing. Each time price drops to a buy level and then rises back to the next sell level, the bot completes a "round trip" and books a small gain.

That design makes two promises your backtest must check:

A backtest that only shows the first part is half a test. Grid bots tend to look excellent in sideways data and fail in trending data, so the question is never "did it make money in this window?" but "what did it do in the windows it was not designed for?"

How to run a grid trading bot backtest step by step

1. Use data fine enough to see the fills

Grid levels are often 0.5–2% apart. On 1-hour or 4-hour candles, price can touch several levels inside one bar, and you cannot know the order in which it touched them.

2. Define a realistic fill rule

A limit order "touched" is not a limit order "filled". There is a queue in front of you.

3. Charge every cost

Grid bots trade a lot for small gains, so costs decide the outcome.

4. Pick the range without peeking

This is the most common hidden bias in grid backtests. If you look at a chart, see that price stayed between two levels for three months, and then set your grid to exactly that range, you have used future information. Of course it worked: you drew the box around the answer.

Instead, set the range with a rule that only uses past data at the time, for example "range = last 30 days' high and low, recalculated weekly". Our guide on detecting look-ahead bias covers more ways this sneaks in.

5. Decide what happens at the edges

Your backtest must include an explicit rule for when price leaves the grid:

Each choice gives a very different equity curve. Whatever you choose, test it as part of the strategy, not as an afterthought.

6. Cover more than one market regime

Include at least one strong uptrend, one strong downtrend and one sideways period. A single calm month is a sample of one regime, as we put it in One sunny week isn't a climate.

Worked example: why the edges matter

Illustration only. These are made-up round numbers to show the arithmetic. They are not BOTLAB results and not a forecast.

Imagine a spot grid on a coin priced at 100 USDT:

Inside the range. One round trip on a 100 USDT order with a 2-point gap earns about 2 USDT gross. Fees on both sides cost about 0.20 USDT. Net is about 1.80 USDT. If the backtest shows 40 round trips in a month, that is roughly 72 USDT net.

Then price breaks down to 80. Five buy orders filled on the way down, at 98, 96, 94, 92 and 90. At a price of 80, each is now worth less:

| Buy price | Loss at 80 (per 100 USDT order) | |---|---| | 98 | about 18.4 USDT | | 96 | about 16.7 USDT | | 94 | about 14.9 USDT | | 92 | about 13.0 USDT | | 90 | about 11.1 USDT | | Total | about 74 USDT |

One move of 20% wipes out the whole month of round trips, before any slippage on an exit. If this were a leveraged futures grid, the same move could hit liquidation and add funding costs.

The lesson: a grid backtest that ends while price is still inside the range is showing you the 72 USDT and hiding the 74.

How to read the results honestly

Trade count overstates your sample

A grid bot can log hundreds of round trips in a few weeks. That looks like a big sample, but those trades are highly correlated: they all depend on the same thing, price staying in the range. Three hundred round trips inside one sideways month are closer to one observation of "sideways market" than to 300 independent tests. See how many trades a backtest needs for why the number of independent outcomes matters.

Win rate will look high, and mean little

Grid bots close winners often and hold losers as open inventory. A 90% win rate on closed trades can sit next to a large unrealised loss. Always judge on:

Check for overfitting

If you tested 50 combinations of range width, grid count and spacing, then the best one will look good partly by luck. Signs of overfitting:

Use walk-forward testing: choose settings on one period, then test them unchanged on the next. Our honest backtesting guide walks through the process.

Then forward test on paper

A backtest is a hypothesis. The next step is paper trading on live prices for long enough to see a range break, then comparing paper fills with what the backtest predicted. The gap between them, from fills, latency and fees, is information you cannot get from historical data.

How we judge bots at BOTLAB

We run every bot through 6 statistical gates (G1–G6), defined on the site, and publish paper trading (simulated money, real prices) results, losers included. Of 204 bots tracked as of 26 Oct 2026, 202 are NOT_READY. One, mr4h/long, has passed all 6 gates with 110 paper trades between 16 Aug and 26 Oct 2026, and even there our verdict is "sample too small to conclude". That is the standard we suggest for any grid bot: passing tests is a reason to keep watching, not proof of an edge.

If you already have a bot's trade log, you can run it through our free tool: Check your bot. Details of the hosted software and plans are on /platform.

FAQ

Is a grid trading bot profitable?

It can make money in ranging markets and lose money in trending ones, and nobody can know in advance which regime is coming. A backtest can tell you how the bot behaved in past regimes after costs. It cannot tell you future results. Our article on whether a trading bot is profitable explains how to test that question.

Can I backtest a grid bot for free?

Yes. You can use free historical candle data and a spreadsheet or open-source backtesting library, as long as you apply strict fill rules and real fees. Free paper trading on live prices is a good second step before any real money.

What is the best grid trading bot strategy?

There is no single best setting. A useful grid strategy is one whose range rule, spacing and exit rule survive walk-forward testing across several regimes, with acceptable drawdown when price leaves the range. Be cautious of any setting that only works on one period.

Should a grid bot use spot or futures?

Futures add leverage, funding costs and liquidation risk, which a backtest must model explicitly. Spot grids avoid liquidation but still carry inventory risk when price trends down. This is a general description, not a recommendation for your situation.

Key takeaways

Not available in restricted jurisdictions (see the Service Agreement). You trade with your own exchange account; BOTLAB never holds funds.

Paper trading results are simulated. Past results don't predict future results. Crypto trading can lose money, including all capital. Not financial advice.

Want these checks run on your own strategy? See the strategy and backtest audit.

More guides

Test before you trust. Score your own bot's trade log against the same statistical gates we use — free, in your browser, nothing uploaded.
Check your bot free or get a written strategy audit · see how we monitor bots on the platform