From 34a44b9dd23212a2f8de07ac13ae5d081658d736 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 31 May 2022 20:32:29 +0200 Subject: [PATCH] Fix backtesting bug when canceling orders closes #6911 --- freqtrade/optimize/backtesting.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index bfb4031cc..fa5065370 100755 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -932,11 +932,13 @@ class Backtesting: else: # Close additional entry order del trade.orders[trade.orders.index(order)] + trade.open_order_id = None return False if order.side == trade.exit_side: self.timedout_exit_orders += 1 # Close exit order and retry exiting on next signal. del trade.orders[trade.orders.index(order)] + trade.open_order_id = None return False return None