move strategy load after candle type has been defined

This commit is contained in:
Stefano
2025-08-14 12:45:34 +09:00
parent 32437a95f3
commit 09ef2c9dea

View File

@@ -33,13 +33,6 @@ class RecursiveAnalysis(BaseAnalysis):
super().__init__(config, strategy_obj)
strat = StrategyResolver.load_strategy(config)
self._strat_scc = strat.startup_candle_count
if self._strat_scc not in self._startup_candle:
self._startup_candle.append(self._strat_scc)
self._startup_candle.sort()
self.partial_varHolder_array: list[VarHolder] = []
self.partial_varHolder_lookahead_array: list[VarHolder] = []
@@ -149,6 +142,13 @@ class RecursiveAnalysis(BaseAnalysis):
self.local_config["candle_type_def"] = prepare_data_config["candle_type_def"]
backtesting._set_strategy(backtesting.strategylist[0])
strat = backtesting.strategy
self._strat_scc = strat.startup_candle_count
if self._strat_scc not in self._startup_candle:
self._startup_candle.append(self._strat_scc)
self._startup_candle.sort()
varholder.data, varholder.timerange = backtesting.load_bt_data()
varholder.timeframe = backtesting.timeframe