Simplify leverage_prep interface

This commit is contained in:
Matthias
2022-02-28 19:34:10 +01:00
parent 8e2d3445a7
commit 1d27cbd01f
2 changed files with 3 additions and 6 deletions

View File

@@ -695,17 +695,12 @@ class Backtesting:
trading_mode=self.trading_mode,
leverage=leverage,
interest_rate=interest_rate,
isolated_liq=isolated_liq,
orders=[],
)
trade.adjust_stop_loss(trade.open_rate, self.strategy.stoploss, initial=True)
if self.trading_mode == TradingMode.FUTURES:
if isolated_liq is None:
raise OperationalException(
f'isolated_liq is none for {pair} while trading futures, '
'this should never happen')
trade.set_isolated_liq(isolated_liq)
order = Order(