public string DeltaColorTest(string name, double previouslast, double last)
        {
            // Base line
            var tick = new SymbolTick(name, previouslast);
            tick.Last = last;

            var color = tick.DeltaColor.ToString();
            return color;
        }
        private void SimulateThirdPartyProcessingDelay(SymbolTick data)
        {
            if (!IsThirdpartyProcessingDelayEnabled)
                return;

            // See FR5 for more details
            Thread.Sleep(ThirdpartyProcessingDelayInMilliseconds);
        }
        //Incoming Data Event Handler
        public void OnNewDataReceivedHandler(SymbolTick data)
        {
            // See FR12 for more info
            if (null == data || IsPaused)
                return;

            if (data.Symbol.ToUpper() == Miscellaneous.END_OF_FEED ||
                data.Symbol.ToUpper() == Miscellaneous.INACTIVITY_TIMEOUT)
            {
                if (data.Symbol.ToUpper() == Miscellaneous.END_OF_FEED)
                    RecordsUpdateText = string.Format("Market Closed! Updates: {0}", RecordsUpdateCount++);
                else
                    RecordsUpdateText = string.Format("Market Inactivity! Updates: {0}", RecordsUpdateCount++);

                OnEndSessionEvent();
                return;
            }

            RecordsUpdateText = string.Format("Record updates: {0}", RecordsUpdateCount++);
            // See FR18 for more info
            dictSecurities.AddOrUpdate(data.Symbol, data,
                                        (key, existingVal) =>
                                        {
                                            existingVal.Last = data.Last;
                                            return existingVal;
                                        });
            try
            {
                MarketData = new ObservableCollection<SymbolTick>(dictSecurities.Values);
            }
            catch (Exception)
            {
            }
        }
 private void SymbolProcessorTaskWorkCancellationTest(SymbolTick dataItem)
 {
     _dataReceived = true;
 }
 private void Handler(SymbolTick dataItem)
 {
     _dataReceived = true;
 }
 private void DataReceivedHandler(SymbolTick data)
 {
     _data.Add(data);
 }