static void CQG_var_InstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes, 
                                              CQGInstrumentProperties cqgInstrumentProperties)
        {
            double qtIndicativeOpen = -1;
                double qtSettlement = -1;
                double qtMarker = -1;
                double qtTodayMarker = -1;
                //var dailyValueModel=new DailyValueModel();
              // var prop=cqgInstrument.Properties[ep]
                var quote = cqgInstrument.Quotes[eQuoteType.qtIndicativeOpen];
                if (quote != null && quote.IsValid)
                    qtIndicativeOpen = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtSettlement];
                if (quote != null && quote.IsValid)
                    qtSettlement = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtMarker];
                if (quote != null && quote.IsValid)
                    qtMarker = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtTodayMarker];
                if (quote != null && quote.IsValid)
                    qtTodayMarker = quote.Price;

                ClientDatabaseManager.AddDailyValue(qtIndicativeOpen, qtMarker, qtSettlement, qtTodayMarker, cqgInstrument.FullName, DateTime.Today,cqgInstrument.ExpirationDate);
            _cqgVar.RemoveInstrument(cqgInstrument);
            SubscribedSymbol.Remove(cqgInstrument.FullName);

            //To DB
        }
Exemplo n.º 2
0
        static void CQG_var_InstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes, CQGInstrumentProperties cqgInstrumentProperties)
        {
            double qtIndicativeOpen = -1;
                double qtSettlement = -1;
                double qtMarker = -1;
                double qtTodayMarker = -1;
                //var dailyValueModel=new DailyValueModel();

                var quote = cqgInstrument.Quotes[eQuoteType.qtIndicativeOpen];
                if (quote != null && quote.IsValid) qtIndicativeOpen = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtSettlement];
                if (quote != null && quote.IsValid) qtSettlement = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtMarker];
                if (quote != null && quote.IsValid) qtMarker = quote.Price;
                quote = cqgInstrument.Quotes[eQuoteType.qtTodayMarker];
                if (quote != null && quote.IsValid) qtTodayMarker = quote.Price;

                DatabaseManager.AddDailyValue(qtIndicativeOpen, qtMarker, qtSettlement, qtTodayMarker, _SymbolNow, DateTime.Today);

            //To DB
        }
Exemplo n.º 3
0
        static void CQG_var_InstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes,
                                              CQGInstrumentProperties cqgInstrumentProperties)
        {
            double qtIndicativeOpen = -1;
            double qtSettlement     = -1;
            double qtMarker         = -1;
            double qtTodayMarker    = -1;
            //var dailyValueModel=new DailyValueModel();
            // var prop=cqgInstrument.Properties[ep]
            var quote = cqgInstrument.Quotes[eQuoteType.qtIndicativeOpen];

            if (quote != null && quote.IsValid)
            {
                qtIndicativeOpen = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtSettlement];
            if (quote != null && quote.IsValid)
            {
                qtSettlement = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtMarker];
            if (quote != null && quote.IsValid)
            {
                qtMarker = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtTodayMarker];
            if (quote != null && quote.IsValid)
            {
                qtTodayMarker = quote.Price;
            }


            ClientDatabaseManager.AddDailyValue(qtIndicativeOpen, qtMarker, qtSettlement, qtTodayMarker, cqgInstrument.FullName, DateTime.Today, cqgInstrument.ExpirationDate);
            _cqgVar.RemoveInstrument(cqgInstrument);
            SubscribedSymbol.Remove(cqgInstrument.FullName);


            //To DB
        }
Exemplo n.º 4
0
        static void CQG_var_InstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes, CQGInstrumentProperties cqgInstrumentProperties)
        {
            double qtIndicativeOpen = -1;
            double qtSettlement     = -1;
            double qtMarker         = -1;
            double qtTodayMarker    = -1;
            //var dailyValueModel=new DailyValueModel();

            var quote = cqgInstrument.Quotes[eQuoteType.qtIndicativeOpen];

            if (quote != null && quote.IsValid)
            {
                qtIndicativeOpen = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtSettlement];
            if (quote != null && quote.IsValid)
            {
                qtSettlement = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtMarker];
            if (quote != null && quote.IsValid)
            {
                qtMarker = quote.Price;
            }
            quote = cqgInstrument.Quotes[eQuoteType.qtTodayMarker];
            if (quote != null && quote.IsValid)
            {
                qtTodayMarker = quote.Price;
            }


            DatabaseManager.AddDailyValue(qtIndicativeOpen, qtMarker, qtSettlement, qtTodayMarker, _SymbolNow, DateTime.Today);



            //To DB
        }
		private void SessionOnInstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes, CQGInstrumentProperties cqgInstrumentProperties)
		{
			SendLevel1Message(cqgInstrument);
		}
 private void SessionOnInstrumentChanged(CQGInstrument cqgInstrument, CQGQuotes cqgQuotes, CQGInstrumentProperties cqgInstrumentProperties)
 {
     SendLevel1Message(cqgInstrument);
 }
Exemplo n.º 7
0
        private void CQG_InstrumentChanged(CQGInstrument instrument, CQGQuotes quotes,
                                           CQGInstrumentProperties instrumentProperties)
        {
            if (!_tickTable.ContainsKey(instrument.FullName)) return;

            lock (_waitingLocker)
            {

                if (_subscribedSymbols.Exists(oo => oo == instrument.FullName))
                {
                    _subscribedSymbols.Remove(instrument.FullName);
                    if (SymbolSubscribed != null)
                        SymbolSubscribed(new List<string> { instrument.FullName }, GetDepthForSymbol(instrument.FullName));
                }

                var tickData = _tickTable[instrument.FullName];

                if (!tickData.IsCanceled)
                {
                    tickData.TickCount = 0;
                    foreach (CQGQuote item in quotes)
                    {
                        CQGQuote tick = item;

                        tickData.IsNewTrade = tick.Name == "Trade";
                        switch (tick.Name)
                        {
                            case "Ask":
                                {
                                    tickData.AskPrice = tick.Price;
                                    tickData.AskVolume = tick.Volume;
                                    tickData.TradePrice = 0;
                                    tickData.TradeVolume = 0;
                                    break;
                                }
                            case "Bid":
                                {
                                    tickData.BidPrice = tick.Price;
                                    tickData.BidVolume = tick.Volume;
                                    tickData.TradePrice = 0;
                                    tickData.TradeVolume = 0;
                                    break;
                                }
                            case "Trade":
                                {
                                    tickData.TradePrice = tick.Price;
                                    tickData.TradeVolume = tick.Volume;
                                    break;
                                }

                        }
                        tickData.TickCount++;
                    }

                    if (tickData.TickCount > 0)
                    {
                        var quoteList = (from CQGQuote item in quotes
                                         where item.Name == "Ask" ||
                                               item.Name == "Bid" ||
                                               item.Name == "Trade"
                                         select item).ToList();
                        quoteList.OrderBy(quote => quote.ServerTimestamp);
                        if (quoteList.Any())
                        {
                            tickData.Timestamp = quoteList.Last().ServerTimestamp;
                            tickData.TickType = quoteList.Last().Name;
                        }
                        else
                            tickData.Timestamp = instrument.ServerTimestamp;

                        if (tickData.Timestamp < DateTime.Now.AddDays(-1))
                            return;
                        if (_onSymbolsList.Contains(instrument.FullName))
                        {
                            //DatabaseManager.AddToBuffer(query, false, tickData);
                            if (_allowedSymbols.ContainsKey(tickData.SymbolName) ||
                                !DatabaseManager.CurrentDbIsShared)
                            {
                                if (DatabaseManager.CurrentDbIsShared && tickData.Timestamp < _allowedSymbols[tickData.SymbolName])
                                    return;
                                DatabaseManager.InsertTickts(tickData.TableName, tickData.SymbolName,
                                                            tickData.BidPrice,
                                                            tickData.BidVolume,
                                                            tickData.AskPrice, tickData.AskVolume,
                                                            tickData.TradePrice,
                                                            tickData.TradeVolume,
                                                            tickData.IsNewTrade, tickData.Timestamp,
                                                            ++tickData.GroupID,
                                                            _userName, tickData.TickType);
                            }
                        }

                    }
                }
                else
                {
                    RemoveSymbol(instrument.FullName);
                    return;
                }
                _tickTable[instrument.FullName] = tickData;
            }
        }
        static void Cel_InstrumentChanged(CQGInstrument instrument, CQGQuotes quotes, CQGInstrumentProperties cqg_instrument_properties)
        {
            var symbolData = _symbolsInProgress.Find(oo => oo.Name == instrument.FullName);
            if (symbolData == null) return;

            lock (_waitingLocker)
            {

                var tickData = symbolData.TickData;

                tickData.TickCount = 0;
                foreach (CQGQuote item in quotes)
                {
                    CQGQuote tick = item;

                    tickData.IsNewTrade = tick.Name == "Trade";
                    switch (tick.Name)
                    {
                        case "Ask":
                            {
                                tickData.AskPrice = tick.Price;
                                tickData.AskVolume = tick.Volume;
                                tickData.TradePrice = 0;
                                tickData.TradeVolume = 0;
                                break;
                            }
                        case "Bid":
                            {
                                tickData.BidPrice = tick.Price;
                                tickData.BidVolume = tick.Volume;
                                tickData.TradePrice = 0;
                                tickData.TradeVolume = 0;
                                break;
                            }
                        case "Trade":
                            {
                                tickData.TradePrice = tick.Price;
                                tickData.TradeVolume = tick.Volume;
                                break;
                            }

                    }
                    tickData.TickCount++;
                }

                if (tickData.TickCount > 0)
                {
                    var quoteList = (from CQGQuote item in quotes
                                        where item.Name == "Ask" ||
                                            item.Name == "Bid" ||
                                            item.Name == "Trade"
                                        select item).ToList();
                    quoteList.OrderBy(quote => quote.ServerTimestamp);
                    if (quoteList.Any())
                    {
                        tickData.Timestamp = quoteList.Last().ServerTimestamp;
                        tickData.TickType = quoteList.Last().Name;
                    }
                    else
                        tickData.Timestamp = instrument.ServerTimestamp;
                    var query = QueryBuilder.InsertData(tickData.TableName, tickData.SymbolName,
                                                        tickData.BidPrice,
                                                        tickData.BidVolume,
                                                        tickData.AskPrice, tickData.AskVolume,
                                                        tickData.TradePrice,
                                                        tickData.TradeVolume,
                                                        tickData.IsNewTrade, tickData.Timestamp,
                                                        ++tickData.GroupID,
                                                        _userName, tickData.TickType);
                    if (tickData.Timestamp < DateTime.Now.AddDays(-1))
                        return;

                        ClientDatabaseManager.AddToBuffer(query, false, tickData);
                        if (!ClientDatabaseManager.CurrentDbIsShared || symbolData.CanInsert)
                        {
                            //todo if (DatabaseManager.CurrentDbIsShared && tickData.Timestamp < _allowedSymbols[tickData.SymbolName])return;
                            ClientDatabaseManager.RunSQLLive(query, "InsertData", instrument.FullName);
                        }

                }

                symbolData.TickData = tickData;
            }
        }
Exemplo n.º 9
0
        /// <summary>
        /// This event is fired when any of the instrument quotes or dynamic instrument properties are changed.
        /// </summary>
        /// <param name="instrument">Changed instrument.</param>
        /// <param name="quotes">Collection of changed quotes.</param>
        /// <param name="props">Collection of changed dynamic properties. </param>
        private void cel_InstrumentChanged(CQGInstrument instrument, CQGQuotes quotes, CQGInstrumentProperties props)
        {
            try
            {
                lock (m_InstrToken1)
                {
                    try
                    {
                        if (!_publisherRegister.ContainsKey(instrument.FullName))
                        {
                            return;
                        }
                        if (!_pXContexts.ContainsKey(instrument.FullName))
                        {
                            _pXContexts.Add(instrument.FullName, new DriverBase.PXUpdateContext(instrument.FullName));
                        }
                        L1PriceSupport.PXUpdateBase pxupdate = null;
                        if (quotes.Count > 0)
                        {
                            foreach (CQGQuote quote in quotes)
                            {
                                switch (quote.Type)
                                {
                                    case eQuoteType.qtTrade:
                                        pxupdate = new L1PriceSupport.PXUpdateBase(m_ID);
                                        pxupdate.Mnemonic = instrument.FullName;
                                        pxupdate.UpdateType = KaiTrade.Interfaces.PXUpdateType.trade;
                                        pxupdate.DriverTag = "Q";
                                        if (quote.HasVolume)
                                        {
                                            pxupdate.TradeVolume = quote.Volume;
                                        }
                                        else
                                        {
                                            pxupdate.TradeVolume = 0;
                                        }
                                        pxupdate.TradePrice = (decimal)quote.Price;
                                        pxupdate.ServerTicks = quote.ServerTimestamp.Ticks;
                                        if (_pXContexts[instrument.FullName].IsUpdatedTrade(pxupdate))
                                        {
                                            ApplyPriceUpdate(pxupdate);
                                        }
                                        break;
                                    case eQuoteType.qtAsk:
                                        pxupdate = new L1PriceSupport.PXUpdateBase(m_ID);
                                        pxupdate.Mnemonic = instrument.FullName;
                                        pxupdate.UpdateType = KaiTrade.Interfaces.PXUpdateType.ask;
                                        pxupdate.DriverTag = "Q";
                                        if (quote.HasVolume)
                                        {
                                            pxupdate.OfferSize = quote.Volume;
                                        }
                                        else
                                        {
                                            pxupdate.OfferSize = 0;
                                        }
                                        pxupdate.OfferPrice = (decimal)quote.Price;
                                        pxupdate.ServerTicks = quote.ServerTimestamp.Ticks;
                                        if (_pXContexts[instrument.FullName].IsUpdatedOffer(pxupdate))
                                        {
                                            ApplyPriceUpdate(pxupdate);
                                        }

                                        break;
                                    case eQuoteType.qtBid:
                                        pxupdate = new L1PriceSupport.PXUpdateBase(m_ID);
                                        pxupdate.Mnemonic = instrument.FullName;
                                        pxupdate.UpdateType = KaiTrade.Interfaces.PXUpdateType.bid;
                                        pxupdate.DriverTag = "Q";
                                        if (quote.HasVolume)
                                        {
                                            pxupdate.BidSize = quote.Volume;
                                        }
                                        else
                                        {
                                            pxupdate.BidSize = 0;
                                        }

                                        pxupdate.BidPrice = (decimal)quote.Price;
                                        pxupdate.ServerTicks = quote.ServerTimestamp.Ticks;
                                        if (_pXContexts[instrument.FullName].IsUpdatedBid(pxupdate))
                                        {
                                            ApplyPriceUpdate(pxupdate);
                                        }
                                        break;
                                    default:
                                        pxupdate = new L1PriceSupport.PXUpdateBase(m_ID);
                                        pxupdate.Mnemonic = instrument.FullName;
                                        pxupdate.UpdateType = KaiTrade.Interfaces.PXUpdateType.none;
                                        pxupdate.DriverTag = "Q";

                                        if (instrument.Bid.IsValid)
                                        {
                                            pxupdate.BidSize = instrument.Bid.Volume;
                                            pxupdate.BidPrice = (decimal)instrument.Bid.Price;
                                            pxupdate.Ticks = instrument.Bid.ServerTimestamp.Ticks;
                                        }
                                        if (instrument.Ask.IsValid)
                                        {
                                            pxupdate.OfferSize = instrument.Ask.Volume;
                                            pxupdate.OfferPrice = (decimal)instrument.Ask.Price;
                                            pxupdate.Ticks = instrument.Ask.ServerTimestamp.Ticks;
                                        }

                                        pxupdate.TradePrice = (decimal)instrument.Trade.Price;
                                        pxupdate.ServerTicks = instrument.ServerTimestamp.Ticks;

                                        if (instrument.Trade.HasVolume)
                                        {
                                            pxupdate.TradeVolume = instrument.Trade.Volume;
                                        }

                                        ApplyPriceUpdate(pxupdate);

                                        //publishQuote(instrument);
                                        break;
                                }
                            }
                        }
                        else
                        {
                        }
                        // there were no quotes

                        pxupdate = new L1PriceSupport.PXUpdateBase(m_ID);
                        pxupdate.Mnemonic = instrument.FullName;
                        pxupdate.UpdateType = KaiTrade.Interfaces.PXUpdateType.none;
                        pxupdate.DriverTag = "I";

                        if (instrument.Bid.IsValid)
                        {
                            pxupdate.BidSize = instrument.Bid.Volume;
                            pxupdate.BidPrice = (decimal)instrument.Bid.Price;
                            pxupdate.Ticks = instrument.Bid.ServerTimestamp.Ticks;
                        }
                        if (instrument.Ask.IsValid)
                        {
                            pxupdate.OfferSize = instrument.Ask.Volume;
                            pxupdate.OfferPrice = (decimal)instrument.Ask.Price;
                            pxupdate.Ticks = instrument.Ask.ServerTimestamp.Ticks;
                        }
                        if (instrument.Trade.IsValid)
                        {
                            pxupdate.TradePrice = (decimal)instrument.Trade.Price;
                            pxupdate.ServerTicks = instrument.Ask.ServerTimestamp.Ticks;

                            if (instrument.Trade.HasVolume)
                            {
                                pxupdate.TradeVolume = instrument.Trade.Volume;
                            }
                        }

                        ApplyPriceUpdate(pxupdate);

                        //publishQuote(instrument);
                    }
                    catch (Exception ex)
                    {
                        log.Error("cel_InstrumentChanged", ex);
                    }
                }
            }
            catch
            {
            }
        }
Exemplo n.º 10
0
        private void CQG_InstrumentChanged(CQGInstrument instrument, CQGQuotes quotes,
                                           CQGInstrumentProperties instrumentProperties)
        {
            if (!_tickTable.ContainsKey(instrument.FullName))
            {
                return;
            }

            lock (_waitingLocker)
            {
                if (_subscribedSymbols.Exists(oo => oo == instrument.FullName))
                {
                    _subscribedSymbols.Remove(instrument.FullName);
                    if (SymbolSubscribed != null)
                    {
                        SymbolSubscribed(new List <string> {
                            instrument.FullName
                        }, GetDepthForSymbol(instrument.FullName));
                    }
                }

                var tickData = _tickTable[instrument.FullName];

                if (!tickData.IsCanceled)
                {
                    tickData.TickCount = 0;
                    foreach (CQGQuote item in quotes)
                    {
                        CQGQuote tick = item;

                        tickData.IsNewTrade = tick.Name == "Trade";
                        switch (tick.Name)
                        {
                        case "Ask":
                        {
                            tickData.AskPrice    = tick.Price;
                            tickData.AskVolume   = tick.Volume;
                            tickData.TradePrice  = 0;
                            tickData.TradeVolume = 0;
                            break;
                        }

                        case "Bid":
                        {
                            tickData.BidPrice    = tick.Price;
                            tickData.BidVolume   = tick.Volume;
                            tickData.TradePrice  = 0;
                            tickData.TradeVolume = 0;
                            break;
                        }

                        case "Trade":
                        {
                            tickData.TradePrice  = tick.Price;
                            tickData.TradeVolume = tick.Volume;
                            break;
                        }
                        }
                        tickData.TickCount++;
                    }

                    if (tickData.TickCount > 0)
                    {
                        var quoteList = (from CQGQuote item in quotes
                                         where item.Name == "Ask" ||
                                         item.Name == "Bid" ||
                                         item.Name == "Trade"
                                         select item).ToList();
                        quoteList.OrderBy(quote => quote.ServerTimestamp);
                        if (quoteList.Any())
                        {
                            tickData.Timestamp = quoteList.Last().ServerTimestamp;
                            tickData.TickType  = quoteList.Last().Name;
                        }
                        else
                        {
                            tickData.Timestamp = instrument.ServerTimestamp;
                        }

                        if (tickData.Timestamp < DateTime.Now.AddDays(-1))
                        {
                            return;
                        }
                        if (_onSymbolsList.Contains(instrument.FullName))
                        {
                            //DatabaseManager.AddToBuffer(query, false, tickData);
                            if (_allowedSymbols.ContainsKey(tickData.SymbolName) ||
                                !DatabaseManager.CurrentDbIsShared)
                            {
                                if (DatabaseManager.CurrentDbIsShared && tickData.Timestamp < _allowedSymbols[tickData.SymbolName])
                                {
                                    return;
                                }
                                DatabaseManager.InsertTickts(tickData.TableName, tickData.SymbolName,
                                                             tickData.BidPrice,
                                                             tickData.BidVolume,
                                                             tickData.AskPrice, tickData.AskVolume,
                                                             tickData.TradePrice,
                                                             tickData.TradeVolume,
                                                             tickData.IsNewTrade, tickData.Timestamp,
                                                             ++tickData.GroupID,
                                                             _userName, tickData.TickType);
                            }
                        }
                    }
                }
                else
                {
                    RemoveSymbol(instrument.FullName);
                    return;
                }
                _tickTable[instrument.FullName] = tickData;
            }
        }
Exemplo n.º 11
0
        static void Cel_InstrumentChanged(CQGInstrument instrument, CQGQuotes quotes, CQGInstrumentProperties cqg_instrument_properties)
        {
            var symbolData = _symbolsInProgress.Find(oo => oo.Name == instrument.FullName);

            if (symbolData == null)
            {
                return;
            }


            lock (_waitingLocker)
            {
                var tickData = symbolData.TickData;

                tickData.TickCount = 0;
                foreach (CQGQuote item in quotes)
                {
                    CQGQuote tick = item;

                    tickData.IsNewTrade = tick.Name == "Trade";
                    switch (tick.Name)
                    {
                    case "Ask":
                    {
                        tickData.AskPrice    = tick.Price;
                        tickData.AskVolume   = tick.Volume;
                        tickData.TradePrice  = 0;
                        tickData.TradeVolume = 0;
                        break;
                    }

                    case "Bid":
                    {
                        tickData.BidPrice    = tick.Price;
                        tickData.BidVolume   = tick.Volume;
                        tickData.TradePrice  = 0;
                        tickData.TradeVolume = 0;
                        break;
                    }

                    case "Trade":
                    {
                        tickData.TradePrice  = tick.Price;
                        tickData.TradeVolume = tick.Volume;
                        break;
                    }
                    }
                    tickData.TickCount++;
                }

                if (tickData.TickCount > 0)
                {
                    var quoteList = (from CQGQuote item in quotes
                                     where item.Name == "Ask" ||
                                     item.Name == "Bid" ||
                                     item.Name == "Trade"
                                     select item).ToList();
                    quoteList.OrderBy(quote => quote.ServerTimestamp);
                    if (quoteList.Any())
                    {
                        tickData.Timestamp = quoteList.Last().ServerTimestamp;
                        tickData.TickType  = quoteList.Last().Name;
                    }
                    else
                    {
                        tickData.Timestamp = instrument.ServerTimestamp;
                    }
                    var query = QueryBuilder.InsertData(tickData.TableName, tickData.SymbolName,
                                                        tickData.BidPrice,
                                                        tickData.BidVolume,
                                                        tickData.AskPrice, tickData.AskVolume,
                                                        tickData.TradePrice,
                                                        tickData.TradeVolume,
                                                        tickData.IsNewTrade, tickData.Timestamp,
                                                        ++tickData.GroupID,
                                                        _userName, tickData.TickType);
                    if (tickData.Timestamp < DateTime.Now.AddDays(-1))
                    {
                        return;
                    }

                    ClientDatabaseManager.AddToBuffer(query, false, tickData);
                    if (!ClientDatabaseManager.CurrentDbIsShared || symbolData.CanInsert)
                    {
                        //todo if (DatabaseManager.CurrentDbIsShared && tickData.Timestamp < _allowedSymbols[tickData.SymbolName])return;
                        ClientDatabaseManager.RunSQLLive(query, "InsertData", instrument.FullName);
                    }
                }

                symbolData.TickData = tickData;
            }
        }