18 using System.Collections.Generic;
71 _algorithm = algorithm;
72 _resultHandler = resultHandler;
73 _mapFileProvider = mapFileProvider;
74 _factorFileProvider = factorFileProvider;
75 _dataProvider = dataProvider;
85 enablePriceScaling:
false);
106 $
"No data loaded for {request.Security.Symbol} because there were no tradeable dates for this security."
112 var enumerator = _subscriptionFactory.
CreateEnumerator(request, _dataProvider);
125 IEnumerator<BaseData> enumerator;
132 IEnumerator<BaseData> warmupEnumerator =
null;
133 if (warmupRequest.TradableDaysInDataTimeZone.Any()
135 &&
LeanData.
IsValidConfiguration(warmupRequest.Configuration.SecurityType, warmupRequest.Configuration.Resolution, warmupRequest.Configuration.TickType))
143 warmupRequest.Configuration.DataTimeZone,
146 if (pivotTimeUtc < warmupRequest.StartTimeUtc)
148 pivotTimeUtc = warmupRequest.StartTimeUtc;
153 warmupEnumerator =
new FilterEnumerator<BaseData>(warmupEnumerator, data => data ==
null || data.EndTime <= warmupRequest.EndTimeLocal);
159 normalEnumerator =
new FilterEnumerator<BaseData>(normalEnumerator, data => data ==
null || data.EndTime >= warmupRequest.EndTimeLocal);
162 enumerator =
new ConcatEnumerator(
true, warmupEnumerator, normalEnumerator);
197 _marketHoursDatabase,
239 if (schedule !=
null)
254 var underlyingMarketHours = _marketHoursDatabase.
GetEntry(underlyingSymbol.ID.Market, underlyingSymbol, underlyingSymbol.SecurityType);
258 isUniverseSubscription:
false,
262 exchangeTimeZone: underlyingMarketHours.ExchangeHours.TimeZone));
264 var underlying = createEnumerator(underlyingRequests, fillForwardResolution);
286 Log.
Trace(
"FileSystemDataFeed.Exit(): Start. Setting cancellation token...");
287 _subscriptionFactory?.DisposeSafely();
288 _cacheProvider.DisposeSafely();
289 Log.
Trace(
"FileSystemDataFeed.Exit(): Exit Finished.");
330 if (fillForwardResolution !=
null && fillForwardResolution !=
Resolution.Tick)
333 fillForwardSpan =
Ref.Create(fillForwardResolution.Value.ToTimeSpan());