예제 #1
0
		/// <summary>
		///   建構子
		/// </summary>
		/// <param name="seriesSymbolDataRand">SeriesSymbolDataRand 類別</param>
		public Instrument(SeriesSymbolDataRand seriesSymbolDataRand) {
			__cFullSymbolData = seriesSymbolDataRand;
		}
예제 #2
0
		/// <summary>
		///   建構子
		/// </summary>
		/// <param name="source">SeriesSymbolData 類別</param>
		/// <param name="maxBarsReferance">最大 Bars count 參考值(如果不需要很多歷史資訊計算則可以設定小一點, 設定數量不可以超過歷史資料載入總數量)</param>
		public Instrument(SeriesSymbolData source, int maxBarsReferance) {
			__cSource = source;
			__cFullSymbolData = new SeriesSymbolDataRand(source, maxBarsReferance);

			this.CurrentBar = 1;  //預設值
			string sDataSource = __cSource.DataRequest.DataFeed;
			
			AbstractQuoteService cService = QuoteManager.Manager.GetQuoteService(sDataSource);
			if (cService != null) {
				__cQuoteStorage = cService.Storage;
			}
		}