예제 #1
0
        void ServerBlackwood_newOrderCancelRequest(long tlID)
        {
            int bwID = 0;

            if (_bwOrdIds.TryGetValue(tlID, out bwID))
            {
                foreach (BWOrder o in m_Session.GetOpenOrders())
                {
                    if (o.OrderID == (int)bwID)
                    {
                        o.Cancel();
                    }
                }
            }
        }
예제 #2
0
        void ServerBlackwood_newOrderCancelRequest(long tlID)
        {
            v("cancel request received for: " + tlID);
            int  bwID  = 0;
            bool match = false;

            if (_bwOrdIds.TryGetValue(tlID, out bwID))
            {
                foreach (BWOrder o in m_Session.GetOpenOrders())
                {
                    if (o.OrderID == (int)bwID)
                    {
                        match = true;
                        o.Cancel();
                        v("found blackwood order: " + o.OrderID + " for tlid: " + tlID + " and requested cancel.");
                    }
                }
            }
            if (!match)
            {
                v("could not cancel order: " + tlID + " as no matching blackwood order was found.");
            }
        }