Beispiel #1
0
        public void UpdatePricing(decimal bidPrice, decimal askPrice, DateTime timestamp)
        {
            // Add price point to history
            PricePoint p = new PricePoint(bidPrice, askPrice, timestamp);

            _history.AddPoint(ref p);

            // and update current values
            CurrentBidPrice = bidPrice;
            CurrentAskPrice = askPrice;

            // Finally, let any interested clients know
            var priceUpdate = new PriceUpdate(Symbol, bidPrice, askPrice, timestamp);

            NotifySubscribers(priceUpdate);
        }