Skip to content

Commit 3932470

Browse files
authored
Merge pull request freqtrade#12541 from stash86/main-stash
make sure the strat's startup count don't get replaced
2 parents 8269384 + d901f4b commit 3932470

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

freqtrade/optimize/analysis/recursive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def __init__(self, config: dict[str, Any], strategy_obj: dict):
3939
self.dict_recursive: dict[str, Any] = dict()
4040

4141
self.pair_to_used: str | None = None
42+
self._strat_scc: int | None = None
4243

4344
# For recursive bias check
4445
# analyzes two data frames with processed indicators and shows differences between them.
@@ -151,7 +152,8 @@ def prepare_data(self, varholder: VarHolder, pairs_to_load: list[DataFrame]):
151152
backtesting._set_strategy(backtesting.strategylist[0])
152153

153154
strat = backtesting.strategy
154-
self._strat_scc = strat.startup_candle_count
155+
if self._strat_scc is None:
156+
self._strat_scc = strat.startup_candle_count
155157

156158
if self._strat_scc < 1:
157159
raise ConfigurationError(

0 commit comments

Comments
 (0)