This is not needed since backtesting does not have open orders.

This commit is contained in:
Reigo Reinmets 2021-12-26 20:01:48 +02:00
parent 045225beef
commit 817a65b656

View File

@ -353,11 +353,6 @@ class Backtesting:
def _get_adjust_trade_entry_for_candle(self, trade: LocalTrade, row: Tuple def _get_adjust_trade_entry_for_candle(self, trade: LocalTrade, row: Tuple
) -> LocalTrade: ) -> LocalTrade:
# If there is any open orders, wait for them to finish.
for order in trade.orders:
if order.ft_is_open:
return trade
current_profit = trade.calc_profit_ratio(row[OPEN_IDX]) current_profit = trade.calc_profit_ratio(row[OPEN_IDX])
stake_amount = strategy_safe_wrapper(self.strategy.adjust_trade_position, stake_amount = strategy_safe_wrapper(self.strategy.adjust_trade_position,
default_retval=None)( default_retval=None)(