Don't use strategy.stoploss too often

discovered in #7760
This commit is contained in:
Matthias 2022-11-27 15:44:14 +01:00
parent 3fc367f536
commit e4a3efc7d4

View File

@ -1151,7 +1151,7 @@ class FreqtradeBot(LoggingMixin):
stoploss = ( stoploss = (
self.edge.stoploss(pair=trade.pair) self.edge.stoploss(pair=trade.pair)
if self.edge else if self.edge else
self.strategy.stoploss / trade.leverage trade.stop_loss_pct / trade.leverage
) )
if trade.is_short: if trade.is_short:
stop_price = trade.open_rate * (1 - stoploss) stop_price = trade.open_rate * (1 - stoploss)