예제 #1
0
파일: DataManager.cs 프로젝트: heber/FreeOQ
		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;
		}
예제 #2
0
		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;
		}
예제 #3
0
        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);
        }
예제 #4
0
        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);
        }
예제 #5
0
파일: Canvas.cs 프로젝트: heber/FreeOQ
		public void Add(TradeSeries tradeSeries)
		{
			tradeSeries.series.Draw();
		}
예제 #6
0
		public static BarSeries CompressBars(TradeSeries trades, BarType barType, long barSize)
		{
			return DataManager.CompressBars(new TradeDataEnumerator(trades), barType, 1L, barSize);
		}
예제 #7
0
 public static BarSeries CompressBars(TradeSeries trades, BarType barType, long barSize)
 {
     return(DataManager.CompressBars(new TradeDataEnumerator(trades), barType, 1L, barSize));
 }
예제 #8
0
 public void Add(TradeSeries tradeSeries)
 {
     tradeSeries.series.Draw();
 }
예제 #9
0
		public TradeDataEnumerator(TradeSeries series)
      : base(series.Count)
		{
			this.series = series;
		}