Ejemplo n.º 1
0
        public double MinimumPriceTick = 1.0;                                          // smallest price between two adjacent tick prices for orders.



        #endregion// members


        #region Constructors
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        public OrderBook(OrderHub parentOrderHub, InstrumentName instrumentName)
        {
            this.m_InstrumentName = instrumentName;                             // store required vars
            this.m_ParentHub      = parentOrderHub;

            // Create Order tag format
            DateTime dt = DateTime.Now;
            string   s1 = string.Format("{0:yy}{1}{2}{3}{4}{5}_", dt, QTMath.GetMonthCode(dt), QTMath.GetBaseSixtyCode(dt.Day),
                                        QTMath.GetBaseSixtyCode(dt.Hour), QTMath.GetBaseSixtyCode(dt.Minute), QTMath.GetBaseSixtyCode(dt.Second));

            m_TagFormat = s1 + "{0}";                                           // Make certain this is unique.

            // Create books.
            m_ByPrice = new SortedDictionary <int, List <string> > [2];             // TODO: I think, for speed, use List<Order>?
            for (int side = 0; side < m_ByPrice.Length; ++side)
            {
                m_ByPrice[side] = new SortedDictionary <int, List <string> >();
            }
        }//constructor
Ejemplo n.º 2
0
        //
        //
        //
        #endregion// members


        #region Constructors
        // *****************************************************************
        // ****                     Constructors                        ****
        // *****************************************************************
        public OrderBookEventArgs(OrderHub parentOrderHub, InstrumentName instrumentName, EventTypes orderBookEventType)
        {
            ParentOrderHub = parentOrderHub;
            Instrument     = instrumentName;
            this.EventType = orderBookEventType;
        }