make “if condition” more readable
This commit is contained in:
parent
2056b6f5f1
commit
8b3631d1ac
@ -251,10 +251,8 @@ class IStrategy(ABC):
|
||||
|
||||
trailing_stop = self.config.get('trailing_stop', False)
|
||||
|
||||
if force_stoploss == 0:
|
||||
trade.adjust_stop_loss(trade.open_rate, self.stoploss, initial=True)
|
||||
else:
|
||||
trade.adjust_stop_loss(trade.open_rate, force_stoploss, initial=True)
|
||||
trade.adjust_stop_loss(trade.open_rate, force_stoploss if force_stoploss
|
||||
else self.stoploss, initial=True)
|
||||
|
||||
# evaluate if the stoploss was hit
|
||||
if self.stoploss is not None and trade.stop_loss >= current_rate:
|
||||
|
Loading…
Reference in New Issue
Block a user