public static TradeSeries GetHistoricalTrades(string provider, Instrument instrument, DateTime begin, DateTime end) { TradeSeries tradeSeries = new TradeSeries(); if (FreeQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { foreach (FreeQuant.Data.Trade trade in (DataArray) FreeQuant.Instruments.DataManager.GetHistoricalTrades(FreeQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end)) tradeSeries.series.Add((IDataObject)trade); } return tradeSeries; }
public static TradeSeries GetHistoricalTrades(string provider, Instrument instrument, DateTime begin, DateTime end) { TradeSeries tradeSeries = new TradeSeries(); if (SmartQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { TradeArray historicalTrades = SmartQuant.Instruments.DataManager.GetHistoricalTrades(SmartQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end); foreach (SmartQuant.Data.Trade obj in historicalTrades) { tradeSeries.series.Add(obj); } } return tradeSeries; }
public static TradeSeries GetHistoricalTrades(string provider, Instrument instrument, DateTime begin, DateTime end) { TradeSeries tradeSeries = new TradeSeries(); if (FreeQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { foreach (FreeQuant.Data.Trade trade in (DataArray)FreeQuant.Instruments.DataManager.GetHistoricalTrades(FreeQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end)) { tradeSeries.series.Add((IDataObject)trade); } } return(tradeSeries); }
public static TradeSeries GetHistoricalTrades(string provider, Instrument instrument, DateTime begin, DateTime end) { TradeSeries tradeSeries = new TradeSeries(); if (SmartQuant.Providers.ProviderManager.HistoricalDataProviders.Contains(provider)) { TradeArray historicalTrades = SmartQuant.Instruments.DataManager.GetHistoricalTrades(SmartQuant.Providers.ProviderManager.HistoricalDataProviders[provider], instrument.instrument, begin, end); foreach (SmartQuant.Data.Trade obj in historicalTrades) { tradeSeries.series.Add(obj); } } return(tradeSeries); }
public void Add(TradeSeries tradeSeries) { tradeSeries.series.Draw(); }
public static BarSeries CompressBars(TradeSeries trades, BarType barType, long barSize) { return DataManager.CompressBars(new TradeDataEnumerator(trades), barType, 1L, barSize); }
public static BarSeries CompressBars(TradeSeries trades, BarType barType, long barSize) { return(DataManager.CompressBars(new TradeDataEnumerator(trades), barType, 1L, barSize)); }
public TradeDataEnumerator(TradeSeries series) : base(series.Count) { this.series = series; }