Improve handling of left_open_trades

This commit is contained in:
Matthias 2022-02-06 13:19:00 +01:00
parent 22173851d6
commit 17d748dd4c

View File

@ -609,7 +609,8 @@ class Backtesting:
for pair in open_trades.keys():
if len(open_trades[pair]) > 0:
for trade in open_trades[pair]:
if trade.open_order_id:
if trade.open_order_id and trade.nr_of_successful_buys == 0:
# Ignore trade if buy-order did not fill yet
continue
sell_row = data[pair][-1]