fix bug with trailing_stop_offset if it's disabled

This commit is contained in:
Matthias 2019-01-13 14:13:41 +01:00
parent 372c5d813a
commit 5ea332e9be

View File

@ -302,7 +302,7 @@ class IStrategy(ABC):
# and if profit is positive # and if profit is positive
stop_loss_value = force_stoploss if force_stoploss else self.stoploss stop_loss_value = force_stoploss if force_stoploss else self.stoploss
sl_offset = self.config.get('trailing_stop_positive_offset', 0.0) sl_offset = self.config.get('trailing_stop_positive_offset') or 0.0
if 'trailing_stop_positive' in self.config and current_profit > sl_offset: if 'trailing_stop_positive' in self.config and current_profit > sl_offset: