Guide

How to test a grid bot before using real money

A grid bot's result depends on the market it meets, so one good week proves little. A useful test checks the setup's math, replays different market conditions and then runs on live prices without real money. This guide shows how, step by step.

Updated · 8 min read

Short answer

  • Use three layers: a calculator for the math, a backtest for past conditions, a virtual forward test on live prices.
  • A realistic test counts both fees, funding, liquidation and a strict fill rule; otherwise it is optimistic.
  • Judge total P/L and the worst moment, not grid profit alone.
  • Test across rising, falling and sideways periods, and compare directional with neutral setups.
  • Move to real money with the same settings and a small amount, with the exit rule written down.

Why test at all?

Grid bot settings interact: range, number of levels, margin, leverage and the market all change each other's effect. A setting that worked in a quiet week can liquidate in a trending one. Testing is the cheapest way to find that out, before the market teaches it with real money.

Three ways to test, and what each one shows

  1. Calculator (instant): checks the setup's arithmetic without any price history: step size, net profit per grid after fees, order size, worst-case liquidation price and how much an exit from the range would cost. Use it first; it catches impossible setups in seconds. Try the grid bot calculator.
  2. Backtest (minutes): replays past prices with your settings. Fast and good for comparing settings, but it only shows how the bot would have done in that particular period, and it is easy to make optimistic.
  3. Virtual forward test (days): runs the bot on live market prices with a virtual balance. It is the closest to real use because nobody knows the next price yet, but it takes time.

Each layer catches different problems. Skipping the calculator wastes test time on broken setups; stopping at the backtest leaves the most important question unanswered: what happens on prices the setup has never seen?

What a realistic test must include

A test is only as good as its rules. If any of these is missing or simplified, the result is usually better than reality:

  • Both fees: maker and taker fees on every buy and every sell.
  • Funding: paid or received on the full position size for as long as inventory is held.
  • Liquidation: with the exchange's maintenance margin, at the moment the position is largest.
  • A strict fill rule: an order fills when price trades through the level, not when it merely touches it.
  • Exchange limits: minimum order size and quantity step; tiny orders that the exchange would reject must not count.
  • Liquidity: on thin pairs, virtual fills are more optimistic than a real order book would allow.

A step-by-step test plan

  1. Pick a liquid pair and write down why you expect it to range.
  2. Check the math in the calculator: the step should be several times the round-trip fee, and the worst-case liquidation price well outside the range.
  3. Backtest over different conditions: at least one rising, one falling and one sideways period, not only the latest week.
  4. Compare setups fairly: same pair, same period, same margin; for example a long grid against a neutral grid on the same range.
  5. Write the exit rule before the forward test: a time limit, maximum inventory, a price outside the range or a loss you accept.
  6. Run a virtual forward test on live prices for one to two weeks, without changing settings mid-test.
  7. Read the result with the metrics below, then decide.
Example

Two bots on the same pair and range: a long grid and a neutral grid, 100 USDT margin each, same leverage. After a week the long grid shows more grid profit but a larger open loss after a dip; the neutral grid earned less but its worst moment was smaller. That comparison, not either number alone, is the result.

Which numbers to look at

  • Total P/L, not grid profit alone: completed round trips plus the open position, minus fees and funding.
  • The worst moment (largest drawdown) during the test: could you have held through it with real money?
  • Distance to liquidation at that worst moment.
  • Time in range: how long price stayed between the lower and upper limits.
  • Open inventory at the end: a bot that ends holding a large losing position has not finished its test.
  • Fee share: how much of the gross grid profit went to fees.

Common testing mistakes

  • Generalising from one good week, usually a sideways one.
  • Trying many settings and keeping the one with the best past result: it fits the past, not the future.
  • Leaving out fees or funding because they look small.
  • Testing with different margin or leverage than you will use for real.
  • Testing with an amount you would not actually risk, so the drawdowns feel unimportant.
  • Changing settings in the middle of a test and still reading it as one result.

From test to real money

If the test result is acceptable, including its worst moment, move to the exchange with the same settings and a smaller amount than you tested with, and keep the exit rule. In Botrader, the “Take to exchange” button lists a bot's settings in the target exchange's form order, ready to copy; Botrader itself never sends orders.

Keep comparing: the first real weeks are also a test, this time of how close the simulation was to reality.

Questions

Is a backtest enough to trust a grid bot?

No. A backtest shows how the setup would have done in one past period. It can be optimistic and it cannot show prices that have not happened yet. Use it to compare settings, then confirm with a virtual forward test on live prices.

How long should I test a grid bot?

Long enough to see more than one market condition. A virtual forward test of one to two weeks plus backtests over rising, falling and sideways periods is a reasonable minimum.

What is paper trading for a grid bot?

Running the bot with a virtual balance on live market prices. Orders are simulated, so you see how the setup behaves without risking money.

Why are my test results better than my real results?

Usually because something was simplified in the test: fills counted on a touch, fees or funding left out, a thin pair treated as liquid, or a calm test period. A stricter test closes most of that gap.

Can I test a grid bot for free?

Yes. Botrader's trial lets you run grid bots on live prices with a virtual balance, and the calculator is free without an account.

Related: Why do grid bots lose money?

Test your grid bot on live prices

Botrader simulates fees, funding and liquidation with a strict fill rule, on real market data, with a virtual balance. No exchange account and no exchange API keys needed.