Exemple #1
0
        public void OnLogon(SessionID sessionID)
        {
            //Console.WriteLine("Logon - " + sessionID.ToString());

            //this.ActiveSessionID = sessionID;

            //Session tempSession = Session.LookupSession(sessionID);
            //tempSession.

            //IsConnected = true;

            HashSet <QuickFix.SessionID> sessionIDSet = MySessionSettings.GetSessions();

            //sessionIDSet.ElementAt(0).SenderLocationID

            if (sessionID.TargetCompID.CompareTo(sessionIDSet.ElementAt(0).TargetCompID) == 0)
            {
                //orderSession = Session.LookupSession(sessionID);

                if (OrderSessionLogonEvent != null)
                {
                    OrderSessionLogonEvent();
                }
            }
            else
            {
                //priceSession = Session.LookupSession(sessionID);


                if (PriceSessionLogonEvent != null)
                {
                    PriceSessionLogonEvent();
                }
            }
        }
Exemple #2
0
        public void OnLogout(SessionID sessionID)
        {
            Console.WriteLine("Logout - " + sessionID.ToString());

            //IsConnected = false;

            HashSet <QuickFix.SessionID> sidset = MySessionSettings.GetSessions();


            if (sessionID.TargetCompID.CompareTo(sidset.ElementAt(0).TargetCompID) == 0)
            {
                //orderSession = Session.LookupSession(sessionID);

                if (OrderSessionLogoutEvent != null)
                {
                    OrderSessionLogoutEvent();
                }
            }
            else
            {
                //priceSession = Session.LookupSession(sessionID);


                if (PriceSessionLogoutEvent != null)
                {
                    PriceSessionLogoutEvent();
                }
            }
        }
Exemple #3
0
        public void OnCreate(SessionID sessionID)
        {
            //Console.WriteLine("Logon - " + sessionID.ToString());


            HashSet <QuickFix.SessionID> sidset = MySessionSettings.GetSessions();


            if (sessionID.TargetCompID.CompareTo(sidset.ElementAt(0).TargetCompID) == 0)
            {
                orderSession = Session.LookupSession(sessionID);
            }
            else
            {
                priceSession = Session.LookupSession(sessionID);
            }

            //_session = Session.LookupSession(sessionID);
        }