For my algorithm in development, I need the first minute ticker data for my symbols. At least one of them I know has no transactions until 10:05. If the data for 9:31, is missing, then I want to skip it. I was thinking this was a hole in the minutely data, but if there are no trades on the symbol until 10:05, then it's not a hole. Below, _universe is my dictionary of SybmolData objects, keyed on Symbol. if (data[s] != null) should only find slices for symbols with data.

Instead, I'm getting Runtime errors like 'SST V2245V5VOQQT' wasn't found in the Slice object, likely because there was no-data at this moment in time. What's the best way to test for Slice data and skip anything with no trades for that time (9:31)?

 

 

public override void OnData(Slice data) { try { foreach(var s in _universe.Keys) { if (data[s] != null) { Debug($"OnData update {s}"); _universe[s].Update(Time, data[s].Close); } } } catch(Exception e) { Debug($"{e}"); } }

Here's the minutely data for 11/3/14 for SPTS/SST (SPTS was SST before 2017). The missing data is fine as long as I can skip it for that day. 36300000 corresponds to 10:05am. Should there instead be data from 9:30 to 10:05? I'm ok either way as long as I can test for the existence and skip any symbols with missing data for that date.

86706_1574792711.jpg