コード例 #1
0
        private bool TryAddLevel2()
        {
            // Update the last Dom total and time
            // so we can log any changes if ticks don't
            // come in timely due to a pause in the market.
            level2Bids.UpdateTotalSize();
            level2Asks.UpdateTotalSize();

            if (level2Bids.LastPrice > 0 && level2Asks.LastPrice > 0)
            {
                tick.SetQuote(level2Bids.LastPrice, level2Asks.LastPrice);
                tick.SetDepth(level2Bids.DepthSizes, level2Asks.DepthSizes);
                if (trace)
                {
                    log.Trace("Level2 SetQuote(), SetDepth()");
                }
                return(true);
            }
            else
            {
                return(false);
            }
        }