From b40bd74c6384c4b39bc2cf6dab3933af7fbc827c Mon Sep 17 00:00:00 2001 From: zx Date: Tue, 10 Aug 2021 02:53:06 +0300 Subject: [PATCH] Updating condition to use sell_profit_offset without setting sell_profit_only to True --- freqtrade/strategy/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index bb8980a53..db1fdd70c 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -589,7 +589,8 @@ class IStrategy(ABC, HyperStrategyMixin): current_rate = rate current_profit = trade.calc_profit_ratio(current_rate) - if (self.sell_profit_only and current_profit <= self.sell_profit_offset): + if ((self.sell_profit_only and current_profit <= self.sell_profit_offset) + or (current_profit >= 0 and current_profit <= self.sell_profit_offset)): # sell_profit_only and profit doesn't reach the offset - ignore sell signal pass elif self.use_sell_signal and not buy: