From d6082c33a730b65be8d010a502382b80bd4a7f4c Mon Sep 17 00:00:00 2001 From: adriance Date: Mon, 28 Mar 2022 21:29:50 +0800 Subject: [PATCH] fix type error --- freqtrade/optimize/backtesting.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/freqtrade/optimize/backtesting.py b/freqtrade/optimize/backtesting.py index 102f33fe7..b63c404fc 100644 --- a/freqtrade/optimize/backtesting.py +++ b/freqtrade/optimize/backtesting.py @@ -938,12 +938,12 @@ class Backtesting: indexes[pair] = row_index self.dataprovider._set_dataframe_max_index(row_index) - for trade in list(open_trades[pair]): + for t in list(open_trades[pair]): # 1. Cancel expired buy/sell orders. - if self.check_order_cancel(trade, current_time): + if self.check_order_cancel(t, current_time): # Close trade due to buy timeout expiration. open_trade_count -= 1 - open_trades[pair].remove(trade) + open_trades[pair].remove(t) self.wallets.update() # 2. Process buys.