Ejemplo n.º 1
0
        protected void ProcesssExecutionReportMessage(object param)
        {
            try
            {
                QuickFix.FIX44.ExecutionReport execReport = (QuickFix.FIX44.ExecutionReport)param;
                string clOrdId = execReport.GetString(QuickFix.Fields.Tags.ClOrdID);

                lock (tLock)
                {
                    if (SentOrders.ContainsKey(clOrdId))
                    {
                        string sender = SentOrders[clOrdId];

                        if (TestingModules.ContainsKey(sender))
                        {
                            FIXExecutionReportWrapper wrapper = new FIXExecutionReportWrapper(clOrdId, execReport, Configuration);
                            TestingModules[sender].ProcessMessage(wrapper);
                        }
                        else
                        {
                            DoLog(string.Format("{0}-Unknown sender @{1} ", Configuration.Name, sender), Fwk.Main.Common.Util.Constants.MessageType.Error);
                        }
                    }
                    else
                    {
                        DoLog(string.Format("{0}-Ignoring unknown ClOrdId execution report @{1} ", Configuration.Name, clOrdId), Fwk.Main.Common.Util.Constants.MessageType.Information);
                    }
                }
            }
            catch (Exception ex)
            {
                DoLog(string.Format("Critical error processing execution report @{0}:{1}", Configuration.Name, ex.Message), Fwk.Main.Common.Util.Constants.MessageType.Error);
            }
        }
Ejemplo n.º 2
0
        public void OnMessage(QuickFix.FIX44.ExecutionReport m, SessionID s)
        {
            _mainform._addMsg("Received execution report (4.4)\r\n");

            string msg = "Order Dump Begin =======================\r\n";

            msg += "\r\n";

            msg += "OrdemInfo:\r\n";
            msg += "==========\r\n";
            msg += "Account .........: " + m.Account.getValue() + "\r\n";
            msg += "Numero da ordem .: " + m.ClOrdID.getValue() + "\r\n";
            msg += "Symbol ..........: " + m.Symbol.getValue() + "\r\n";
            msg += "ExchangeNumber ..: " + m.OrderID.getValue() + "\r\n";
            msg += "Status ..........: " + m.OrdStatus.getValue() + "\r\n";
            msg += "Status ..........: " + FixMessageUtilities.TraduzirOrdemStatus(m.OrdStatus.getValue()) + "\r\n";
            msg += "Quantidade ......: " + m.OrderQty.getValue() + "\r\n";
            msg += "Qtde restante ...: " + (m.OrderQty.getValue() - m.CumQty.getValue()) + "\r\n";
            if (m.IsSetLastPx())
            {
                msg += "Preco ...........: " + m.LastPx.getValue() + "\r\n";
            }

            if (m.IsSetText())
            {
                msg += "Text ............: [" + m.Text.getValue() + "]\r\n";
            }

            if (m.IsSetField(5149))
            {
                msg += "Memo5149 ........: " + m.GetString(5149) + "\r\n";
            }

            msg += "\r\n";

            msg += "\r\nOrder Dump End =========================\r\n";

            _mainform._addMsg(msg);
        }