Esempio n. 1
0
 private void HandleDeletedLimitOrder(ILimitOrder order)
 {
     order.UnRegisterDeleteNotificationHandler(HandleDeletedLimitOrder);
     order.UnRegisterFilledNotification(HandleDeletedLimitOrder);
     LimitOrders.Remove(order.ExchangeOrderId);
     ClientOrders[order.ClientId].Remove(order);
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
 }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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();
        }