Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ protected virtual bool TryGenerateAndWriteUnderlyingLine(Symbol underlyingSymbol
PriceHistoryResolutions[0],
marketHoursEntry.ExchangeHours,
marketHoursEntry.DataTimeZone,
PriceHistoryResolutions[0],
null,
includeExtendedMarketHours: false,
isCustomData: false,
DataNormalizationMode.ScaledRaw,
Expand Down Expand Up @@ -325,7 +325,6 @@ private List<Slice> GetHistory(HistoryRequest[] historyRequests,
{
var request = new HistoryRequest(x, x.Symbol, historyStartUtc, historyEndUtc);
request.Resolution = resolution;
request.FillForwardResolution = resolution;
return request;
}).ToArray();

Expand Down Expand Up @@ -397,7 +396,7 @@ protected virtual HistoryRequest[] GetDerivativeHistoryRequests(Symbol symbol, D
PriceHistoryResolutions[0],
marketHoursEntry.ExchangeHours,
marketHoursEntry.DataTimeZone,
PriceHistoryResolutions[0],
null,
includeExtendedMarketHours: false,
isCustomData: false,
DataNormalizationMode.ScaledRaw,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,12 @@ private IEnumerable<BaseData> ParseHistory(Symbol symbol, YahooFinanceIndexPrice
var close = indexPrices.ClosePrices[i];
var volume = indexPrices.Volumes[i];

if (open == 0 || high == 0 || low == 0 || close == 0)
{
throw new Exception($"IndexHistoryProvider.ParseHistory(): Invalid data for {symbol} at {time}. " +
$"Open: {open}, High: {high}, Low: {low}, Close: {close}, Volume: {volume}.");
}

yield return new TradeBar(time, symbol, open, high, low, close, volume) { EndTime = endTime };
}
}
Expand Down
Loading