Updating condition to use sell_profit_offset without setting sell_profit_only to True
This commit is contained in:
parent
db37c8a51c
commit
47cbf4dd1b
@ -590,7 +590,7 @@ class IStrategy(ABC, HyperStrategyMixin):
|
|||||||
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)):
|
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