public static QuoteArray GetHistoricalQuotes(IHistoricalDataProvider provider, Instrument instrument, DateTime datetime1, DateTime datetime2) { ArrayList arrayList = DataManager.r6ZT8iFUv(provider, instrument, DataManager.EDataSeries.Quote, datetime1, datetime2, -1L); QuoteArray quoteArray = new QuoteArray(); foreach (Quote quote in arrayList) { quoteArray.Add(quote); } return(quoteArray); }
public QuoteArray GetQuoteArray(string series, DateTime datetime1, DateTime datetime2) { QuoteArray quotes = new QuoteArray(); if (this.file.Series[series] != null) { foreach (Quote quote in this.file.Series[series].GetArray(datetime1, datetime2)) { quotes.Add(quote); } } return(quotes); }
private static void OnNewQuote(object sender, QuoteEventArgs e) { Instrument instrument = e.Instrument as Instrument ?? InstrumentManager.Instruments[e.Instrument.Symbol, e.Provider.Name]; if (instrument == null) { return; } Quote quote = e.Quote; if (DataManager.quoteArrayLength != 0) { QuoteArray quoteArray = DataManager.quoteArrayList[instrument]; quoteArray.Add(quote); if (DataManager.quoteArrayLength != -1 && quoteArray.Count > DataManager.quoteArrayLength) { quoteArray.RemoveAt(0); } } instrument.EmitNewQuote(new QuoteEventArgs(quote, instrument, e.Provider)); }