private void HandleDeletedLimitOrder(ILimitOrder order) { order.UnRegisterDeleteNotificationHandler(HandleDeletedLimitOrder); order.UnRegisterFilledNotification(HandleDeletedLimitOrder); LimitOrders.Remove(order.ExchangeOrderId); ClientOrders[order.ClientId].Remove(order); }
public void RemoveOrder(ILimitOrder order) { switch (order.Way) { case WayEnum.Buy: BuyOrders.Remove(order); break; case WayEnum.Sell: SellOrders.Remove(order); break; } order.UnRegisterDeleteNotificationHandler(HandleDeleteOrFilled); order.UnRegisterFilledNotification(HandleDeleteOrFilled); }
public void RemoveLimitOrder(ILimitOrder order) { if (!PriceSlots.ContainsKey(order.Price)) { return; } PriceSlots[order.Price].RemoveOrder(order); RemoveSlotIfEmpty(order.Price); order.UnRegisterDeleteNotificationHandler(RemoveLimitOrder); order.UnRegisterFilledNotification(RemoveLimitOrder); order.UnRegisterModifyNotificationHandler(HandleLimitOrderModify); SetBestBidAndAsk(); }
private void HandleDeletedLimitOrder(ILimitOrder order) { order.UnRegisterDeleteNotificationHandler(HandleDeletedLimitOrder); order.UnRegisterFilledNotification(HandleDeletedLimitOrder); LimitOrders.Remove(order.ExchangeOrderId); ClientOrders[order.ClientId].Remove(order); }
public void RemoveOrder(ILimitOrder order) { switch (order.Way) { case WayEnum.Buy: BuyOrders.Remove(order); break; case WayEnum.Sell: SellOrders.Remove(order); break; } order.UnRegisterDeleteNotificationHandler(HandleDeleteOrFilled); order.UnRegisterFilledNotification(HandleDeleteOrFilled); }
public void RemoveLimitOrder(ILimitOrder order) { if (!PriceSlots.ContainsKey(order.Price)) return; PriceSlots[order.Price].RemoveOrder(order); RemoveSlotIfEmpty(order.Price); order.UnRegisterDeleteNotificationHandler(RemoveLimitOrder); order.UnRegisterFilledNotification(RemoveLimitOrder); order.UnRegisterModifyNotificationHandler(HandleLimitOrderModify); SetBestBidAndAsk(); }