Load "correct" timeframes (mark vs. funding fees)...

This commit is contained in:
Matthias 2024-01-04 15:30:06 +01:00
parent 50287ce556
commit d5d3188b99

View File

@ -277,8 +277,10 @@ class Backtesting:
else:
self.detail_data = {}
if self.trading_mode == TradingMode.FUTURES:
self.funding_fee_timeframe: str = self.exchange.get_option('mark_ohlcv_timeframe')
self.funding_fee_timeframe: str = self.exchange.get_option('funding_fee_timeframe')
self.funding_fee_timeframe_secs: int = timeframe_to_seconds(self.funding_fee_timeframe)
mark_timeframe: str = self.exchange.get_option('mark_ohlcv_timeframe')
# Load additional futures data.
funding_rates_dict = history.load_data(
datadir=self.config['datadir'],
@ -295,7 +297,7 @@ class Backtesting:
mark_rates_dict = history.load_data(
datadir=self.config['datadir'],
pairs=self.pairlists.whitelist,
timeframe=self.funding_fee_timeframe,
timeframe=mark_timeframe,
timerange=self.timerange,
startup_candles=0,
fail_without_data=True,