コード例 #1
0
 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));
 }
コード例 #2
0
ファイル: DataManager.cs プロジェクト: heber/FreeOQ
		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;
		}
コード例 #3
0
		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;
		}
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
ファイル: QuoteDataEnumerator.cs プロジェクト: heber/FreeOQ
		public QuoteDataEnumerator(QuoteSeries series, QuoteData input) : base(series.Count)
		{
			this.series = series;
			this.input = input;
		}
コード例 #7
0
ファイル: Canvas.cs プロジェクト: heber/FreeOQ
		public void Add(QuoteSeries quoteSeries)
		{
			quoteSeries.series.Draw();
		}
コード例 #8
0
		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);
		}
コード例 #9
0
ファイル: Canvas.cs プロジェクト: zhuzhenping/OpenQuant.API
 public void Add(QuoteSeries quoteSeries)
 {
     quoteSeries.series.Draw();
 }