Updating condition to use sell_profit_offset without setting sell_profit_only to True
This commit is contained in:
parent
cf27968b97
commit
b40bd74c63
@ -589,7 +589,8 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
current_rate = rate
|
current_rate = rate
|
||||||
current_profit = trade.calc_profit_ratio(current_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
|
# sell_profit_only and profit doesn't reach the offset - ignore sell signal
|
||||||
pass
|
pass
|
||||||
elif self.use_sell_signal and not buy:
|
elif self.use_sell_signal and not buy:
|
||||||
|
Loading…
Reference in New Issue
Block a user