Quick exit when order should be maintained.
This commit is contained in:
parent
3be2afdd88
commit
8c19953cdd
@ -890,7 +890,10 @@ class Backtesting:
|
||||
) # default value is current order price
|
||||
|
||||
# cancel existing order whenever a new rate is requested (or None)
|
||||
if requested_rate != order.price:
|
||||
if requested_rate == order.price:
|
||||
# assumption: there can't be multiple open entry orders at any given time
|
||||
return False
|
||||
else:
|
||||
del trade.orders[trade.orders.index(order)]
|
||||
|
||||
# place new order if None was not returned
|
||||
|
Loading…
Reference in New Issue
Block a user