freqtrade download-data does not add your strategy's startup candles, but backtesting needs them. When they are missing, backtesting moves its start later without failing. Check before every run: required data start = backtest start - startup_candle_count x timeframe, compared with the first candle shown by list-data --show-timerange for each pair. In Freqtrade's own example (5m, 400 candles, January 2019), data is needed from 2018-12-30 14:40, and a 2019-01-01 download shifts the start to 2019-01-02 09:20. Fix short data with download-data --prepend.
Calculation and worked example. AI-assisted drafting. Educational information; no individual financial advice.
Two timeranges that do not mean the same thing
--timerange appears on both download-data and backtesting, and it is easy to assume they line up. Freqtrade's documentation (checked 15 November 2026) says they do not.
- download-data is "a strategy-independent command" and "does not care about the 'startup-period' defined in a strategy". In the data-download docs, Freqtrade says: "It's up to the user to download additional days if the backtest should start at a specific point in time (while respecting startup period)."
- backtesting does care. The strategy customization docs say that with
startup_candle_countset, backtesting loads extra candles before your start date, computes the indicators, and then removes the unstable period before trading begins.
When the extra candles are not on disk, Freqtrade does not fail. It quietly moves your start date later: "If data for the startup period is not available, then the timerange will be adjusted to account for this startup period." Your report then covers less time than you asked for.
This article is a repeatable pre-flight check for that gap. How to choose the value itself is covered in picking startup_candle_count from recursive-analysis.
The official example, recomputed
Freqtrade's example backtests January 2019 on 5m candles with startup_candle_count = 400:
- 400 × 5 minutes = 2,000 minutes = 1 day, 9 hours 20 minutes.
- Loading therefore needs data from 2018-12-30 14:40. The documentation prints "~2018-12-30 11:40". The tilde marks it as approximate, and the exact arithmetic gives 14:40.
- If data only starts at 2019-01-01 00:00, the start moves forward by the same 1 day 9:20, to 2019-01-02 09:20. That matches the documented fallback exactly.
So the rule you can check before every run is:
required data start = backtest start − (startup_candle_count × timeframe)
Read the first candle with list-data
freqtrade list-data --show-timerange prints, for each pair, timeframe and trading mode, the first and last candle on disk. Freqtrade's own data-download page shows sample rows such as ETH/USDT, 5m, spot, from 2017-08-17 04:00:00 to 2026-07-15 04:35:00. Add -p to limit it to your pairs, and --trading-mode futures if you test futures. The page warns that --show-timerange "May take a while to calculate".
Here is the check applied to that documented row, with a 400-candle startup on 5m (date arithmetic only; the batch evidence holds the script):
| Requested backtest start | Data needed from | First candle on disk (docs sample) | Covered? | Effective start |
|---|---|---|---|---|
| 2017-08-17 00:00 | 2017-08-15 14:40 | 2017-08-17 04:00 | No | 2017-08-18 13:20 |
| 2017-08-18 00:00 | 2017-08-16 14:40 | 2017-08-17 04:00 | No | 2017-08-18 13:20 |
| 2017-08-19 00:00 | 2017-08-17 14:40 | 2017-08-17 04:00 | Yes | as requested |
Run this on every pair. One short-history pair is enough to move the effective start of that pair's results.
How much extra history each timeframe needs
The lookback grows with the timeframe. For the documented startup_candle_count = 400:
| Timeframe | Startup lookback | Download from, for a 2019-01-01 start |
|---|---|---|
| 1m | 6 h 40 min | 2018-12-31 17:20 |
| 5m | 1 day 9 h 20 min | 2018-12-30 14:40 |
| 15m | 4 days 4 h | 2018-12-27 20:00 |
| 1h | 16 days 16 h | 2018-12-15 08:00 |
| 4h | 66 days 16 h | 2018-10-26 08:00 |
| 1d | 400 days | 2017-11-27 00:00 |
Freqtrade notes that the value is the longest period any of your informative timeframes needs, counted in candles. Size the download for the timeframe that produces it.
Fixing a short download: prepend, not re-download
The data-download page has two behaviours that catch people out:
- Given start points are ignored if data already exists. "Given starting points are ignored if data is already available, downloading only missing data up to today." Re-running
download-data --timerange 20181230-on an existing dataset does not fetch the older candles. --prependadds older data. Freqtrade's example isfreqtrade download-data --exchange binance --pairs ETH/USDT XRP/USDT BTC/USDT --prepend --timerange 20210101-20220101. The documentation adds that in this mode Freqtrade ignores the end date if data is available, and uses the existing data's start point instead.
For the January 2019 example, the fix is a prepend with a start of 20181230 or earlier. After that, run list-data --show-timerange again, before the backtest.
The pre-flight in four lines
- Read
startup_candle_countfrom your strategy (or your recursive-analysis decision). - Compute the required data start for your backtest timerange and timeframe.
- Compare it with the first candle that
list-data --show-timerangeshows for every pair. - If any pair is short, run
download-data --prepend --timerange <required start>-<current first candle>and check again.
Save the list-data output with your backtest export. It is the evidence that the window you report is the window you tested. The backtest statistics tool and the in-sample and out-of-sample timerange split article assume your windows are what you say they are. This check makes sure they are. The timeframe-detail option needs its own lower-timeframe download, so run the same check on that timeframe too.
Sources & method
What this article adds
A four-line pre-flight that compares the data start a backtest needs with list-data --show-timerange output. It recomputes Freqtrade's documented example and notes that the exact load start is 2018-12-30 14:40, not the approximate 11:40 printed in the docs, while the documented fallback start of 2019-01-02 09:20 matches. It applies the check to Freqtrade's own list-data sample row, tabulates the 400-candle lookback for six timeframes, and highlights two download-data behaviours (existing data ignores the start point; --prepend adds older data) that explain why re-downloading does not fix a short dataset.
How it was prepared
The data-download, strategy-customization and backtesting pages were fetched from freqtrade.io (stable) on 2026-11-14, and re-fetched on the morning of 2026-11-15 (Asia/Shanghai). All three pages returned HTTP 200, with Last-Modified still Thu, 12 Nov 2026 05:44:20 GMT. The documented wording used in this article was unchanged, including the 400-candle 5m January 2019 example, the ~2018-12-30 11:40 load start, the 2019-01-02 09:20 fallback, list-data --show-timerange, the ETH/USDT 5m sample row (2017-08-17 04:00:00 to 2026-07-15 04:35:00), given-start ignore, and --prepend. The coverage check (evidence/fx/startup_coverage_check.py) is pure date arithmetic using only those documented inputs. It was rerun on 2026-11-15 with the same output as the 14 November PREP run. Freqtrade was not run for this article, so no exchange data or backtest output is claimed. Informative-timeframe sizing follows the docs' wording and is not tested here.
- Freqtrade docs: Data Downloading (startup period, list-data --show-timerange, --prepend) Checked 2026-11-15
- Freqtrade docs: Strategy Customization (startup_candle_count and the backtesting example) Checked 2026-11-15
- Freqtrade docs: Backtesting (--timerange) Checked 2026-11-15
Data Downloading supports download-data being strategy-independent and ignoring the startup period, the user's responsibility to download extra days, list-data --show-timerange and the sample row, given start points being ignored when data exists, and --prepend with its end-date behaviour and example command. Strategy Customization supports startup_candle_count, the 400 x 5m January 2019 example, the approximately 2018-12-30 11:40 load start, the adjusted start of 2019-01-02 09:20, and informative timeframes. Backtesting supports the --timerange formats.
For corrections, contact the publisher. Editorial policy · Affiliate disclosure