From db37c8a51c0f0a337055fe98b67ef34b748859f6 Mon Sep 17 00:00:00 2001 From: zx Date: Tue, 10 Aug 2021 03:01:07 +0300 Subject: [PATCH] Updating condition to use sell_profit_offset without setting sell_profit_only to True --- freqtrade/strategy/interface.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/strategy/interface.py b/freqtrade/strategy/interface.py index db1fdd70c..7150c5a31 100644 --- a/freqtrade/strategy/interface.py +++ b/freqtrade/strategy/interface.py @@ -589,7 +589,7 @@ 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