fix: use dynamic trading_mode for trades loading

closes #10540
This commit is contained in:
Matthias 2024-08-16 18:27:30 +02:00
parent e26ac6ed00
commit 4ca6e61726

View File

@ -521,15 +521,12 @@ class DataProvider:
(pair, timeframe or self._config["timeframe"], _candle_type), copy=copy
)
elif self.runmode in (RunMode.BACKTEST, RunMode.HYPEROPT):
_candle_type = (
CandleType.from_string(candle_type)
if candle_type != ""
else self._config["candle_type_def"]
)
data_handler = get_datahandler(
self._config["datadir"], data_format=self._config["dataformat_trades"]
)
trades_df = data_handler.trades_load(pair, TradingMode.FUTURES)
trades_df = data_handler.trades_load(
pair, self._config.get("trading_mode", TradingMode.SPOT)
)
return trades_df
else: