backtesting margin_mode key fix

This commit is contained in:
Sam Germain 2022-02-27 11:59:27 -06:00
parent 8af2ea754f
commit 6fdcc714bf

View File

@ -130,7 +130,7 @@ class Backtesting:
# TODO-lev: This should come from the configuration setting or better a
# TODO-lev: combination of config/strategy "use_shorts"(?) and "can_short" from the exchange
self.trading_mode: TradingMode = config.get('trading_mode', TradingMode.SPOT)
self.margin_mode: MarginMode = config.get('trading_mode', MarginMode.NONE)
self.margin_mode: MarginMode = config.get('margin_mode', MarginMode.NONE)
self._can_short = self.trading_mode != TradingMode.SPOT
self.progress = BTProgress()