21 using System.Collections.Generic;
34 private readonly
bool _liveMode;
35 private Symbol _currentSymbol;
36 private string _mappedSymbol;
48 : base(universeConfig)
66 yield
return _security.Symbol.Canonical;
68 var mapFile = _mapFileProvider.ResolveMapFile(_config);
69 var mappedSymbol = mapFile.GetMappedSymbol(utcTime.ConvertFromUtc(_security.Exchange.TimeZone), dataMappingMode: _config.DataMappingMode);
70 if (!
string.IsNullOrEmpty(mappedSymbol) && mappedSymbol != _mappedSymbol)
72 if (_currentSymbol !=
null)
75 yield
return _currentSymbol;
77 _mappedSymbol = mappedSymbol;
79 _currentSymbol = _security.
Symbol.Canonical
84 if (_currentSymbol !=
null)
88 yield
return _currentSymbol;
101 DateTime currentTimeUtc,
102 DateTime maximumEndTimeUtc,
110 startTimeUtc: currentTimeUtc,
111 endTimeUtc: maximumEndTimeUtc));
120 var startTimeLocal = startTimeUtc.ConvertFromUtc(_security.Exchange.TimeZone);
121 var endTimeLocal = endTimeUtc.ConvertFromUtc(_security.Exchange.TimeZone);
125 .Where(tradeableDay => _liveMode || tradeableDay >= startTimeLocal)
136 foreach (var pair
in universeSettings.SubscriptionDataTypes)
138 configs.AddRange(subscriptionService.Add(symbol,
139 universeSettings.Resolution,
140 universeSettings.FillForward,
141 universeSettings.ExtendedMarketHours,
142 dataNormalizationMode: universeSettings.DataNormalizationMode,
144 subscriptionDataTypes:
new List<Tuple<Type, TickType>> { pair },
145 dataMappingMode: universeSettings.DataMappingMode,
146 contractDepthOffset: (uint)Math.Abs(universeSettings.ContractDepthOffset),
148 isInternalFeed: !symbol.IsCanonical() || pair.Item2 ==
TickType.OpenInterest));
160 var ticker = $
"qc-universe-continuous-{symbol.ID.Market.ToLowerInvariant()}-{symbol.SecurityType}-{symbol.ID.Symbol}";