cTrader

AlgoWay Blog

Guides, manuals and platform references.

Core
JSON & Alerts
MT5 / Expert Advisors
Errors
Integrations
Other Publications
AlgoWay Strategy Lab

Freqtrade Startup Candles: Check Indicator Stability

Moving-average curves from different history windows converging near the latest candle

Two runs can agree on the latest candle and disagree on its indicator value. The missing information may be behind the candle, not ahead of it: a recursive calculation carries part of its earlier state into each new value.

For an automated trading bot, the useful question is whether that difference changes a decision. A value that looks identical at chart scale can still land on the other side of an entry threshold. If you are comparing signal quality with execution results, AlgoWay's backtest-versus-live guide for TradingView workflows provides the broader distinction. Establish what signal should exist before investigating how an order was executed.

A small memory can survive many candles

Consider an illustrative smoother defined as new value = 0.2 × latest close + 0.8 × previous value. This is arithmetic to explain the mechanism, not a Freqtrade test or a recommended indicator setting.

Suppose two calculations start with values of 100 and 102, then receive exactly the same subsequent closes. Their initial difference is 2. After each shared update, the difference is multiplied by 0.8 because the new close contributes equally to both.

Shared updatesRemaining differenceCalculation
11.62 × 0.8
50.655362 × 0.8⁵
20About 0.023062 × 0.8²⁰

The disagreement shrinks without abruptly vanishing at a particular period length. That is why “the indicator uses 20 candles” is not, by itself, a proof that 20 startup candles reproduce a long-history calculation.

Compare history lengths with recursive analysis

Freqtrade's recursive-analysis command compares final-row indicator values across startup-history lengths against a longer benchmark. It requires downloaded historical candles and does not run a trading-performance backtest. The documentation recommends at least 5,000 benchmark candles.

This illustrative invocation assumes your own existing configuration, strategy and matching downloaded spot data:

freqtrade recursive-analysis -c config.json -s MyStrategy \
  -p BTC/USDT -i 5m --timerange 20260101-20260201 \
  --startup-candle 199 499 999

Replace the strategy name, pair, timeframe and dates with your actual research setup. The counts are comparison points, not universal recommendations. This command has not been executed for this article, and no strategy result is implied.

The output reports percentage differences. nan% indicates an unavailable calculation; a dash represents no difference. A displayed 0.000% can conceal a smaller rounded difference. The check covers indicators calculated in populate_indicators and informative decorators, not calculations placed in entry or exit methods. It compares the final row, so the table alone does not establish that earlier trading decisions agree.

Choose a history requirement your bot can actually obtain

The strategy's startup_candle_count describes the history needed for stable indicators. Freqtrade loads preceding candles for a historical test and removes the startup portion before trading; missing startup data can shift the effective test start. Its startup-period documentation also explains exchange candle limits and the extra requests that longer histories can require.

Do not copy a large number from another strategy and call the issue solved. Record the longest relevant indicator requirement, available history for the exchange and timeframe, and the actual first tradable timestamp. A test that quietly starts later is a different sample, even if the requested date range is unchanged.

Judge the difference against the rule

Imagine a rule that enters only when an indicator is greater than 50. Two hypothetical calculations of 49.999 and 50.001 disagree about entry despite being almost equal. Two readings of 55.000 and 55.002 agree about this particular threshold. Neither pair says anything about profitability.

For a crossing rule, compare both the previous and current values. Agreement on the final side of the threshold does not establish agreement on when the crossing happened.

A useful research record therefore keeps the startup count, unrounded indicator values, timestamps and resulting entry or exit booleans together. Repeat the comparison around decision boundaries and on more than one end date. These are follow-up checks to perform, not results reported here.

Initialization sensitivity is separate from future information leaking into a signal. Use the Freqtrade lookahead-analysis guide for that question. A stable indicator can still use unavailable future data, and a causal indicator can still need more history. Write down which problem each check actually addressed before moving to dry-run observation.

Last updated: October 27, 2026