@@ -239,8 +239,8 @@ def _initialize_app_for_backtest(
239239 self ,
240240 backtest_start_date ,
241241 backtest_end_date ,
242- pending_order_check_interval ,
243242 market_data_sources ,
243+ pending_order_check_interval = None ,
244244 ) -> None :
245245 """
246246 Initialize the app for backtesting by setting the configuration
@@ -261,9 +261,11 @@ def _initialize_app_for_backtest(
261261 configuration_service .config [BACKTESTING_START_DATE ] = \
262262 backtest_start_date
263263 configuration_service .config [BACKTESTING_END_DATE ] = backtest_end_date
264- configuration_service .config [
265- BACKTESTING_PENDING_ORDER_CHECK_INTERVAL
266- ] = pending_order_check_interval
264+
265+ if pending_order_check_interval is not None :
266+ configuration_service .config [
267+ BACKTESTING_PENDING_ORDER_CHECK_INTERVAL
268+ ] = pending_order_check_interval
267269
268270 # Create resource dir if not exits
269271 self ._create_resource_directory_if_not_exists ()
@@ -498,7 +500,6 @@ def run(
498500 while self .algorithm .running :
499501 if number_of_iterations_since_last_orders_check == 30 :
500502 logger .info ("Checking pending orders" )
501- self .algorithm .check_pending_orders ()
502503 number_of_iterations_since_last_orders_check = 1
503504
504505 self .algorithm .run_jobs ()
@@ -675,7 +676,7 @@ def run_backtest(
675676 algorithm ,
676677 start_date ,
677678 end_date ,
678- pending_order_check_interval = '1h' ,
679+ pending_order_check_interval = None ,
679680 output_directory = None
680681 ) -> BacktestReport :
681682 """
@@ -740,7 +741,7 @@ def run_backtests(
740741 start_date : Optional [datetime ] = None ,
741742 end_date : Optional [datetime ] = None ,
742743 date_ranges : Optional [Tuple [datetime , datetime ]] = None ,
743- pending_order_check_interval = '1h' ,
744+ pending_order_check_interval = None ,
744745 output_directory = None
745746 ) -> List [BacktestReport ]:
746747 """
0 commit comments