check if config contains trailing_stoploss

This commit is contained in:
chrisapril 2018-01-02 16:10:13 +01:00
parent 8480f53730
commit df86d72f8b

View File

@ -171,7 +171,7 @@ def min_roi_reached(trade: Trade, current_rate: float, current_time: datetime) -
return True
# Check if profit is positive, time matches and current rate is below trailing stop loss
if current_profit > 0:
if current_profit > 0 and 'trailing_stoploss' in _CONF:
logger.debug('Check trailing stop loss...')
time_diff = (current_time - trade.open_date).total_seconds() / 60
for duration, threshold in sorted(_CONF['trailing_stoploss'].items()):