make “if condition” more readable

This commit is contained in:
misagh 2018-10-01 17:49:27 +02:00
parent 2056b6f5f1
commit 8b3631d1ac

View File

@ -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: