don't allow short trades in spot mode

This commit is contained in:
Matthias
2022-02-21 19:19:12 +01:00
parent c3c815e794
commit 70f4305dfa
7 changed files with 15 additions and 6 deletions

View File

@@ -129,7 +129,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', 'spot'))
self.trading_mode: TradingMode = config.get('trading_mode', TradingMode.SPOT)
self._can_short = self.trading_mode != TradingMode.SPOT
self.progress = BTProgress()