Merge pull request #12449 from stash86/develop-copy

throw error on recursive analysis on 0 startup candle
pull/12452/head
Matthias 6 months ago committed by GitHub
commit 95f2cc0f88
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -8,6 +8,7 @@ from typing import Any
from pandas import DataFrame
from freqtrade.exceptions import ConfigurationError
from freqtrade.exchange import timeframe_to_minutes
from freqtrade.loggers.set_log_levels import (
reduce_verbosity_for_bias_tester,
@ -152,6 +153,13 @@ class RecursiveAnalysis(BaseAnalysis):
strat = backtesting.strategy
self._strat_scc = strat.startup_candle_count
if self._strat_scc < 1:
raise ConfigurationError(
f"The strategy defines invalid startup candle count of {self._strat_scc}. "
f"This will lead to recursive issues on some indicators. "
f"Please define a proper startup_candle_count in the strategy."
)
if self._strat_scc not in self._startup_candle:
self._startup_candle.append(self._strat_scc)
self._startup_candle.sort()

Loading…
Cancel
Save