Freqtrade backtest vs dry run: why results differ
A backtest replays stored candles. A dry run trades the live market with simulated orders. The two rarely agree, and Freqtrade's docs say it plainly: backtesting will never replace running a strategy in dry-run mode. This page lists the documented reasons, then shows what Wickfleet checks before a bot starts.
What each mode does
| Part | Backtest | Dry run |
|---|---|---|
| Data | stored candles for the chosen time range | live candles from the exchange |
| Strategy | indicators and signals are calculated once per pair, over the whole range | analysed inside the bot loop, which runs every few seconds |
| Entry price | the candle's open, unless the strategy sets a custom price | from entry_pricing or custom_entry_price() |
| Fills | every order fills at the requested price while that price is inside the candle's high and low. No slippage | a limit order fills once the price reaches its level, or times out by unfilledtimeout. A market order fills against order book volume, with at most 5% slippage |
| Callbacks | at most once per candle | most of them once per loop, usually about every 5 seconds |
| Wallet | a starting balance from dry_run_wallet | a simulated wallet from dry_run_wallet |
| Fees | the exchange's default fee, or fee from the config | |
Documented reasons the results differ
| Reason | What happens | What Freqtrade offers |
|---|---|---|
| Lookahead bias | the strategy reads data a running bot does not have yet: shift(-1), a statistic over the whole column, .iloc[-1] in the populate functions, a higher timeframe joined with a plain .merge(). The backtest looks excellent and the bot does not repeat it | freqtrade lookahead-analysis |
| Too little startup history | some indicators are wrong until they have seen enough candles, and Freqtrade uses whatever value is in the dataframe | startup_candle_count, checked with freqtrade recursive-analysis |
| Inside a candle | a backtest sees only open, high, low and close. It evaluates stoploss before ROI within a candle and assumes the low came before the high for a stoploss, so backtests often show more stoploss exits than a dry run | --timeframe-detail 5m simulates the candle from a faster timeframe |
| Callback timing | callbacks such as custom_exit() and custom_stoploss() run at most once per candle in a backtest. In a running bot most of them run every few seconds | --timeframe-detail runs them once per detail candle |
| Orders that do not fill | a dry-run limit order can time out. In a backtest it fills whenever its price is inside the candle | unfilledtimeout and the pricing settings decide what a running bot does |
| Dynamic pairlists | they depend on the market of today, not on the market of the backtest range, and results are not guaranteed to be reproducible | a static pairlist, for example from freqtrade test-pairlist |
| Exchange limits | minimum amounts and price precision in a backtest are today's values. Freqtrade has no historic limits | nothing to set. Know it when a backtest reaches far back |
The docs suggest a backtest with --timeframe-detail as the last part of strategy development, to make sure the strategy does not lean on one of the candle assumptions. They add that only forward testing in dry-run mode can confirm a strategy.
A dry run is a simulation too
- Orders are simulated and never reach the exchange. Only read-only calls are made
- The balance is simulated from
dry_run_wallet - A limit order that crosses the price by more than 1% is treated as a market order
- With
stoploss_on_exchangethe stop price is assumed to be filled - Open orders stay open across a restart, on the assumption that they did not fill while the bot was off
The docs recommend a fresh database when a bot moves from dry run to real money.
What Wickfleet does with this
In Wickfleet a replay is a Freqtrade backtest of one bot over a date range you choose. It runs on the config the hub writes for that bot, so pairs, stake currency, wallet, open trade limit and fee match the bot, and it is always paper money. A replay runs without --timeframe-detail, so the candle assumptions above apply to it as well.
After the backtest, three more results come out of the same run.
| Step | Result |
|---|---|
| Lookahead analysis, with a minimum of 5 trades | clean, biased or inconclusive. Biased blocks a new bot with those settings. Live trading needs clean |
| Recursive analysis | a warning when an indicator drifts more than 0.1% at the strategy's own startup count |
| Robustness verdict | pass or fail with reasons, from the trades of the replay |
Both analyses are skipped for a FreqAI bot.

The robustness verdict
A backtest can be free of bias and still rest on one good month or a handful of trades. The verdict looks at that, with these default rules:
| Check | Pass rule |
|---|---|
| Walk-forward windows | the range is cut into 30-day windows, counted back from its end. At least 6 full windows |
| Total | profit after fees over the replay is above 0 |
| Consistency | at least half of the windows are profitable |
| Worst window | no window loses more than 15% |
| Monte Carlo | the trades are drawn again at random 10,000 times. At most 5% of the runs reach a 50% drawdown. With fewer than 20 trades the numbers are shown, not judged |
The replay also shows its profit against buying and holding over the same range. That number is shown, not judged.
What gates a bot
| Saving through the hub | Needs |
|---|---|
| A new bot | your own replay of exactly these settings, finished in the last 7 days, in which no lookahead bias was found. An inconclusive or skipped check and a recursive warning do not block |
| A bot with real money | the same, but the lookahead result must be clean (inconclusive blocks), and the robustness verdict passed. FreqAI bots cannot go live yet. The instance must also allow live trading and hold that bot's exchange key file |
The new-bot gate runs only when a bot is saved through the hub. The real-money gate runs there and again before the hub creates or replaces a live container, so a bot file committed straight to the registry cannot go live without it.
Every bot is a dry run by default, and the fleet page sums dry and live bots apart. To put several strategies through the same range, Compare replays two or more bots over one window.
A passed verdict describes the replayed range. It is not a forecast, and it does not replace the dry run.
Try it
git clone https://github.com/wickfleet/wickfleet.git
cd wickfleet
make quickstart
Needs Docker with Compose v2, git and make, on macOS or Linux. Everything runs on one machine, bound to 127.0.0.1, and a dry-run demo bot is waiting in the fleet. More in the install guide.
More on running a fleet
- Multiple bots on one serverWhat each bot needs of its own, by hand and from a registry
- One dashboard for every botFleet totals, compare and risk on top of FreqUI
- Lookahead bias checksWhat it is, how to find it, and the gate before a bot starts
- A strategy without PythonBlocks, a plain-words readback and the generated code
- Docker Compose, one addressMany bots behind one origin, and where the CORS error comes from
- Dashboards comparedOpen-source ways to watch several Freqtrade bots
Wickfleet is software for running trading bots, not a recommendation to buy or sell anything. Backtests and replays describe the past, not the future. Every bot is a dry run on a simulated wallet by default.