21 using System.Collections.Generic;
33 private bool _loggedPreviousTradableDate;
55 IEnumerable<string> entries =
null;
57 foreach (var resolution
in Resolutions)
59 usedResolution = resolution;
60 entries = GetZipEntries(canonicalSymbol, date, usedResolution);
70 if (mhdb.TryGetEntry(canonicalSymbol.ID.Market, canonicalSymbol, canonicalSymbol.SecurityType, out var entry) && !entry.ExchangeHours.IsDateOpen(date))
72 if (!_loggedPreviousTradableDate)
74 _loggedPreviousTradableDate =
true;
75 Log.
Trace($
"BacktestingCacheProvider.GetSymbols(): {date} is not a tradable date for {canonicalSymbol}. When requesting contracts" +
76 $
" for non tradable dates, will return contracts of previous tradable date.");
89 Log.
Debug($
"BacktestingCacheProvider.GetSymbols(): found no source of contracts for {canonicalSymbol} for date {date.ToString(DateFormat.EightCharacter)} for any tick type");
95 foreach (var zipEntryName
in entries)
111 return symbol.
ID.
Date.Date < date.Date;
114 private IEnumerable<string> GetZipEntries(
Symbol canonicalSymbol, DateTime date,
Resolution resolution)
116 foreach (var tickType
in DataTypes)