public static BarSeries CompressBars(QuoteSeries quotes, QuoteData input, BarType barType, long barSize) { if (barType == BarType.Range && input == QuoteData.BidAsk) { throw new ArgumentException(string.Format("Cannot make range bars from {0}", input)); } return(DataManager.CompressBars(new QuoteDataEnumerator(quotes, input), barType, 1L, barSize)); }
public static QuoteSeries GetHistoricalQuotes(string provider, Instrument instrument, DateTime begin, DateTime end) { QuoteSeries quoteSeries = new QuoteSeries(); if (FreeQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { foreach (FreeQuant.Data.Quote quote in (DataArray) FreeQuant.Instruments.DataManager.GetHistoricalQuotes(FreeQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end)) quoteSeries.series.Add((IDataObject)quote); } return quoteSeries; }
public static QuoteSeries GetHistoricalQuotes(string provider, Instrument instrument, DateTime begin, DateTime end) { QuoteSeries quoteSeries = new QuoteSeries(); if (SmartQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { QuoteArray historicalQuotes = SmartQuant.Instruments.DataManager.GetHistoricalQuotes(SmartQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end); foreach (SmartQuant.Data.Quote obj in historicalQuotes) { quoteSeries.series.Add(obj); } } return quoteSeries; }
public static QuoteSeries GetHistoricalQuotes(string provider, Instrument instrument, DateTime begin, DateTime end) { QuoteSeries quoteSeries = new QuoteSeries(); if (FreeQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { foreach (FreeQuant.Data.Quote quote in (DataArray)FreeQuant.Instruments.DataManager.GetHistoricalQuotes(FreeQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end)) { quoteSeries.series.Add((IDataObject)quote); } } return(quoteSeries); }
public static QuoteSeries GetHistoricalQuotes(string provider, Instrument instrument, DateTime begin, DateTime end) { QuoteSeries quoteSeries = new QuoteSeries(); if (SmartQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { QuoteArray historicalQuotes = SmartQuant.Instruments.DataManager.GetHistoricalQuotes(SmartQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end); foreach (SmartQuant.Data.Quote obj in historicalQuotes) { quoteSeries.series.Add(obj); } } return(quoteSeries); }
public QuoteDataEnumerator(QuoteSeries series, QuoteData input) : base(series.Count) { this.series = series; this.input = input; }
public void Add(QuoteSeries quoteSeries) { quoteSeries.series.Draw(); }
public static BarSeries CompressBars(QuoteSeries quotes, QuoteData input, BarType barType, long barSize) { if (barType == BarType.Range && input == QuoteData.BidAsk) { throw new ArgumentException(string.Format("Cannot make range bars from {0}", input)); } return DataManager.CompressBars(new QuoteDataEnumerator(quotes, input), barType, 1L, barSize); }