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:
@@ -1399,7 +1399,7 @@ class Backtesting:
|
|||||||
self.wallets.update()
|
self.wallets.update()
|
||||||
|
|
||||||
# 4. Create exit orders (if any)
|
# 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
|
self._check_trade_exit(trade, row, current_time) # Place exit order if necessary
|
||||||
|
|
||||||
# 5. Process exit orders.
|
# 5. Process exit orders.
|
||||||
|
|||||||
Reference in New Issue
Block a user