Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="message"></param>
        /// <param name="sessionId"></param>
        private void OnMessage(QuickFix.FIX42.OrderCancelReject message, SessionID sessionId)
        {
            try
            {
                Rejection rejection = new Rejection(new Security()
                {
                    Symbol = String.Empty
                }, _provider, message.TransactTime.getValue());

                rejection.OrderId        = message.OrigClOrdID.getValue();
                rejection.RejectioReason = message.CxlRejReason.getValue().ToString();

                if (RejectionArrived != null)
                {
                    RejectionArrived(rejection);
                }

                if (Logger.IsInfoEnabled)
                {
                    Logger.Info("Cancel / CancelReplace rejection arrived : " + rejection.OrderId, _type.FullName, "OnMessage");
                }
            }
            catch (Exception exception)
            {
                Logger.Error(exception.ToString(), _type.FullName, "OnMessage");
            }
        }
        /// <summary>
        /// Recevies order cancellation message
        /// </summary>
        /// <param name="reject"></param>
        /// <param name="sessionID"></param>
        private void OnMessage(QuickFix.FIX42.OrderCancelReject reject, SessionID sessionID)
        {
            if (Logger.IsInfoEnabled)
            {
                Logger.Info("On Order Cancel Reject, OrderId=" + reject.OrigClOrdID.getValue(), _type.FullName, "OnMessage");
            }
            Order getOrder =
                (from order in _orders where order.OrderID == reject.OrigClOrdID.getValue() select order)
                .FirstOrDefault();

            if (getOrder != null)
            {
                Rejection rejection = new Rejection(getOrder.Security, _provider);
                rejection.OrderId = getOrder.OrderID;
                if (OrderRejectionArrived != null)
                {
                    OrderRejectionArrived(rejection);
                }
            }
        }
Esempio n. 3
0
 public void OnMessage(QuickFix.FIX42.OrderCancelReject m, SessionID s)
 {
     _mainform._addMsg("Received order cancel reject\r\n");
 }