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 }