Unfortunately in current backtrader IBBroker implementation only the following order statuses (coming from IB) are recognized :
SUBMITTED, FILLED, CANCELLED, INACTIVE, PENDINGSUBMIT, PENDINGCANCEL, PRESUBMITTEDSee the following code (in IBBroker.py) if you'd like to change/add that:
def push_orderstatus(self, msg): # Cancelled and Submitted with Filled = 0 can be pushed immediately try: order = self.orderbyid[msg.orderId] except KeyError: return # not found, it was not an order if msg.status == self.SUBMITTED and msg.filled == 0: ... elif msg.status == self.CANCELLED: ... elif msg.status == self.PENDINGCANCEL: ... elif msg.status == self.INACTIVE: ... elif msg.status in [self.SUBMITTED, self.FILLED]: ... elif msg.status in [self.PENDINGSUBMIT, self.PRESUBMITTED]: ... else: # Unknown status ... pass