backtesting._get_ohlcv_as_lists removed # TODO-lev: Candle-type should be conditional, either "spot" or futures

This commit is contained in:
Sam Germain 2022-02-02 13:30:05 -06:00
parent 64bfa118e0
commit 73d10b5c02

View File

@ -333,8 +333,12 @@ class Backtesting:
df_analyzed.loc[:, col] = 0 if not tag_col else None df_analyzed.loc[:, col] = 0 if not tag_col else None
# Update dataprovider cache # Update dataprovider cache
self.dataprovider._set_cached_df(pair, self.timeframe, df_analyzed, CandleType.SPOT) self.dataprovider._set_cached_df(
# TODO-lev: Candle-type should be conditional, either "spot" or futures pair,
self.timeframe,
df_analyzed,
CandleType.FUTURES if self.trading_mode == TradingMode.FUTURES else CandleType.SPOT
)
df_analyzed = df_analyzed.drop(df_analyzed.head(1).index) df_analyzed = df_analyzed.drop(df_analyzed.head(1).index)