From df86d72f8b963c2ac91f3bd7552f8184d4c7bafb Mon Sep 17 00:00:00 2001 From: chrisapril Date: Tue, 2 Jan 2018 16:10:13 +0100 Subject: [PATCH] check if config contains trailing_stoploss --- freqtrade/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/main.py b/freqtrade/main.py index dc8a93309..22faf9029 100755 --- a/freqtrade/main.py +++ b/freqtrade/main.py @@ -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()):