on backtesting try to create exit orders also if there is open order without position yet, to allow entry order adjustment

This commit is contained in:
Axel-CH
2024-12-01 11:13:59 -04:00
parent 73d53579d9
commit 16d2dbc9d7

View File

@@ -1399,7 +1399,7 @@ class Backtesting:
self.wallets.update()
# 4. Create exit orders (if any)
if trade.has_open_position:
if trade.has_open_position or trade.has_open_orders:
self._check_trade_exit(trade, row, current_time) # Place exit order if necessary
# 5. Process exit orders.