def update_order(self, order: OrderData): """""" # print('algo template update_order, order.is_active:%s' % order.is_active()) if not order.is_active(): for l in self.leg_orders[order.vt_symbol]: if order.vt_orderid == l[0]: self.leg_orders[order.vt_symbol].remove(l) self.on_order(order)
def update_order(self, order: OrderData) -> None: """""" if order.is_active(): self.active_orders[order.vt_orderid] = order else: if order.vt_orderid in self.active_orders: self.active_orders.pop(order.vt_orderid) self.calculate_frozen()
def update_order(self, order: OrderData): """""" # print('algo template update_order, order.is_active:%s' % order.is_active()) if not order.is_active(): vt_orderids = self.leg_orders[order.vt_symbol] if order.vt_orderid in vt_orderids: vt_orderids.remove(order.vt_orderid) # if order.vt_orderid in self.active_short_orderids: # self.active_short_orderids.remove(order.vt_orderid) self.on_order(order)