コード例 #1
0
        private string CreateQuote(string symbol, int interval)
        {
            var quoteId = this.GetQuoteId(symbol, interval);

            if (!Quotes.ContainsKey(quoteId))
            {
                var q = new QuoteBasicBase(symbol, interval);
                Quotes.TryAdd(quoteId, q as QuoteBasicBase);
                Quotes[quoteId].OnDataAddedOrUpdated += QuoteStore_OnDataAddedOrUpdated;   //trigger add to other intervals
            }
            return(quoteId);
        }
コード例 #2
0
        public QuoteBasicBase GetQuoteBasic(string symbol, int interval)
        {
            var quoteId = this.GetQuoteId(symbol, interval);

            return(Quotes.ContainsKey(quoteId)? Quotes[quoteId] : null);
        }