Updating condition to use sell_profit_offset without setting sell_profit_only to True

This commit is contained in:
zx 2021-08-10 03:01:07 +03:00
parent b40bd74c63
commit db37c8a51c

View File

@ -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