Hi Enzo Ferrari ,
When the algorithm subscribes to Daily data and schedules an event, this event can be triggered as a "past event". For example, when data from 20181219 00:00 is streams through the algorithm, the event is triggered at 20191218 09:31. It is a resolution particularity that can be solved by subscribing to minute-resolution data.
At 20191218 09:31, the algorithm makes a historical data request for daily resolution. The last data available closes at 20191218 00:00. The variable that the algorithm is (opening) Time while it should be closing time (EndTime).
for slice in history:
bar = slice[self.syl]
self.open.append(bar.Open)
self.close.append(bar.Close)
self.high.append(bar.High)
self.low.append(bar.Low)
self.volume.append(bar.Volume)
self.time.append(bar.Time)
self.Debug(f"{self.Time} -> {self.open[-1]}: {self.close[-1]}: {self.high[-1]}: {self.low[-1]}: {self.volume[-1]} {self.time[-1]}")