Always call custom_sell - also when there's a new enter signal

This commit is contained in:
Matthias
2022-04-09 17:17:49 +02:00
parent ef18d09161
commit 114591048c
3 changed files with 11 additions and 5 deletions

View File

@@ -881,8 +881,8 @@ class IStrategy(ABC, HyperStrategyMixin):
current_rate = rate
current_profit = trade.calc_profit_ratio(current_rate)
if self.use_exit_signal and not enter:
if exit_:
if self.use_exit_signal:
if exit_ and not enter:
exit_signal = ExitType.EXIT_SIGNAL
else:
trade_type = "exit_short" if trade.is_short else "sell"