Example #1
0
 public sealed override void onMessage(QuickFix43.TradingSessionStatus message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #2
0
 public sealed override void onMessage(QuickFix43.SettlementInstructions message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #3
0
 public sealed override void onMessage(QuickFix43.TradeCaptureReportRequest message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #4
0
 public sealed override void onMessage(QuickFix43.Reject message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
     MsgReject(message, session);
 }
Example #5
0
 public sealed override void onMessage(QuickFix43.SecurityDefinitionRequest message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #6
0
 public sealed override void onMessage(QuickFix43.NewOrderMultileg message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #7
0
 public sealed override void onMessage(QuickFix43.OrderMassCancelRequest message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #8
0
 public sealed override void onMessage(QuickFix43.MarketDataSnapshotFullRefresh message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #9
0
 public sealed override void onMessage(QuickFix43.MassQuoteAcknowledgement message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #10
0
 public sealed override void onMessage(QuickFix42.SequenceReset message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #11
0
 public sealed override void onMessage(QuickFix43.DerivativeSecurityList message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #12
0
 public sealed override void onMessage(QuickFix42.MarketDataRequestReject message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #13
0
 public sealed override void onMessage(QuickFix42.IndicationofInterest message, SessionID session)
 {
     Fix.Out(new StackTrace(new StackFrame(true)).GetFrame(0).GetMethod().ToString());
 }
Example #14
0
 //从网关返回的应用消息
 public void fromApp(QuickFix.Message message, SessionID sessionID)
 {
     crack(message, sessionID);
     Fix.Out(message);
 }
Example #15
0
 //发送应用消息到网关(比如下单,撤单,查询相关消息等)
 public void toApp(QuickFix.Message message, SessionID sessionID)
 {
     Fix.Out(message);
 }
Example #16
0
        static void Main(string[] args)
        {
            var cp = Process.GetCurrentProcess().MainModule.FileName;

            Directory.SetCurrentDirectory(Path.GetDirectoryName(cp));

            try
            {
                var fe = new FixExecutor();
                fe.AddCallBack(Om);
                fe.AddCallBack(Om);
                fe.Start(@"E:\FixEngine\FixEngine\myserver.cfg");

                for ( ; ;)
                {
                    Console.WriteLine("quit stop goon buy sell cbuy csell qbuy qsell?");

                    var cmd = Console.ReadLine();//.ToLower();

                    if ("quit" == cmd)
                    {
                        break;
                    }

                    Console.WriteLine(fe.DealCommand(cmd));

                    if ("buy" == cmd)
                    {
                        var open = Console.ReadLine();
                        if (open == "open" || open == "close")
                        {
//                            application.SendNewOrder(true, open == "open", "cffe", "IF1112", Console.ReadLine(), Console.ReadLine());
                        }
                    }
                    else if ("sell" == cmd)
                    {
                        var open = Console.ReadLine();
                        if (open == "open" || open == "close")
                        {
//                            application.SendNewOrder(false, open == "open", "cffe", "IF1112", Console.ReadLine(), Console.ReadLine());
                        }
                    }
                    else if ("cbuy" == cmd)
                    {
//                        application.CancelOrder(true, "IF1112", Console.ReadLine());
                    }
                    else if ("csell" == cmd)
                    {
//                        application.CancelOrder(false, "IF1112", Console.ReadLine());
                    }
                    else if ("qbuy" == cmd)
                    {
//                        application.QueryOrder(true, "IF1112", Console.ReadLine());
                    }
                    else if ("qsell" == cmd)
                    {
//                        application.QueryOrder(false, "IF1112", Console.ReadLine());
                    }
                }

                fe.Stop();
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Fix.Out(e.ToString());
                Console.ReadLine();
            }
            finally
            {
                Fix.Out("AtExit");
            }
        }