From fb7c0792c017f9deae8a397272ba310eca798664 Mon Sep 17 00:00:00 2001 From: eSeR1805 Date: Tue, 17 May 2022 01:41:01 +0300 Subject: [PATCH] Track trade entries canceled by user. --- freqtrade/optimize/backtesting.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 64107ae18..933cc2aea 100755 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -297,6 +297,7 @@ class Backtesting: self.rejected_trades = 0 self.timedout_entry_orders = 0 self.timedout_exit_orders = 0 + self.canceled_trade_entries = 0 self.dataprovider.clear_cache() if enable_protections: self._load_protections(self.strategy) @@ -884,6 +885,7 @@ class Backtesting: return True elif self.check_order_replace(trade, order, current_time, row): # delete trade due to user request + self.canceled_trade_entries += 1 return True # default maintain trade return False @@ -1087,6 +1089,7 @@ class Backtesting: 'rejected_signals': self.rejected_trades, 'timedout_entry_orders': self.timedout_entry_orders, 'timedout_exit_orders': self.timedout_exit_orders, + 'canceled_trade_entries': self.canceled_trade_entries, 'final_balance': self.wallets.get_total(self.strategy.config['stake_currency']), }