public SignalCacheProfile(string signalIdentity, BarItemType barType, Guid cacheId) { this.signalCache = new SignalCache(signalIdentity, barType, cacheId); CacheHeaderInfo headerInfo = this.signalCache.Header; foreach (KeyValuePair <string, string> extendedProperty in headerInfo.ExtendedProperties) { switch (extendedProperty.Key) { case "Indicators": indicators = CacheHelper.LoadIndicatorCacheList(extendedProperty.Value, barType, cacheId); break; case "Alerts": break; } } }
public SignalCacheNavigator(string cacheFolder, BarItemType barType, Guid cacheId, string signalIdentityCode) { this.signalCache = new SignalCache(signalIdentityCode, barType, cacheId); this.pricebarCache = new PricebarCache(barType, cacheId, CacheModeOption.Read); this.barType = barType; this.cacheId = cacheId; CacheHeaderInfo headerInfo = this.signalCache.Header; foreach (KeyValuePair <string, string> extendedProperty in headerInfo.ExtendedProperties) { switch (extendedProperty.Key) { case "Indicators": indicatorCacheList = CacheHelper.LoadIndicatorCacheList(extendedProperty.Value, barType, cacheId); break; } } InitializeSignalDataFrame(); }
protected SignalFrameReader(DateTime startDate, DateTime endDate, int frameSize, SignalCache cache, BarItemType barType, Guid cacheId) { this.startDate = startDate; this.endDate = endDate; this.frameSize = frameSize; dataFrameItems = cache.SelectSignals(startDate, endDate, frameSize); int index = 0; DateTime lastClosingBarDate = DateTime.MinValue; foreach (SignalDataItem item in dataFrameItems) { if (lastClosingBarDate != item.ClosingBarTime) { signalIndex.Add(item.ClosingBarTime, index); lastClosingBarDate = item.ClosingBarTime; } index++; } CacheHeaderInfo headerInfo = cache.Header; foreach (KeyValuePair <string, string> extendedProperty in headerInfo.ExtendedProperties) { switch (extendedProperty.Key) { case "Indicators": indicatorCacheList = CacheHelper.LoadIndicatorCacheList(extendedProperty.Value, barType, cacheId); break; } } }