Пример #1
0
        public void OnMessage(QuickFix.FIX41.OrderCancelReplaceRequest msg, SessionID s)
        {
            string orderid = (msg.IsSetOrderID()) ? msg.OrderID.Obj : "unknown orderID";

            QuickFix.FIX41.OrderCancelReject ocj = new QuickFix.FIX41.OrderCancelReject(
                new OrderID(orderid), msg.ClOrdID, msg.OrigClOrdID, new OrdStatus(OrdStatus.REJECTED));
            ocj.CxlRejReason = new CxlRejReason(CxlRejReason.UNKNOWN_ORDER);
            ocj.Text         = new Text("Executor does not support order cancel/replaces");

            try
            {
                Session.SendToTarget(ocj, s);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.ToString());
            }
        }
Пример #2
0
        private QuickFix.FIX41.OrderCancelReplaceRequest QueryCancelReplaceRequest41()
        {
            QuickFix.FIX41.OrderCancelReplaceRequest ocrr = new QuickFix.FIX41.OrderCancelReplaceRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                new HandlInst('1'),
                QuerySymbol(),
                QuerySide(),
                QueryOrdType());

            if (QueryConfirm("New price"))
            {
                ocrr.Set(QueryPrice());
            }
            if (QueryConfirm("New quantity"))
            {
                ocrr.Set(QueryOrderQty());
            }

            QueryHeader(ocrr.Header);
            return(ocrr);
        }
Пример #3
0
        private QuickFix.FIX41.OrderCancelReplaceRequest QueryCancelReplaceRequest41()
        {
            QuickFix.FIX41.OrderCancelReplaceRequest ocrr = new QuickFix.FIX41.OrderCancelReplaceRequest(
                QueryOrigClOrdID(),
                QueryClOrdID(),
                new HandlInst('1'),
                QuerySymbol(),
                QuerySide(),
                QueryOrdType());

            if (QueryConfirm("New price"))
                ocrr.Set(QueryPrice());
            if (QueryConfirm("New quantity"))
                ocrr.Set(QueryOrderQty());

            QueryHeader(ocrr.Header);
            return ocrr;
        }