Overall Statistics
class ModulatedNadionAutosequencers(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2019, 1, 16)  # Set Start Date
        self.SetEndDate(2019, 1, 26)
        self.SetCash(100000)  # Set Strategy Cash
        self.AddEquity("SPY", Resolution.Minute)
        
        consolidator = TradeBarConsolidator(1)
        consolidator.DataConsolidated += self.OnDailyDataConsolidated
        self.SubscriptionManager.AddConsolidator("SPY", consolidator)
        
        # boolean: if Daily Open Price ready to get
        self.isOpen = True
        # current date of backtest
        self.currDate = f"{self.Time.year}-{self.Time.month}-{self.Time.day}"

    def OnData(self, data):
        # is open price ready to get
        if self.isOpen:
            self.Open = data["SPY"].Open
            self.isOpen = False
            self.Log(f"{self.Time} > Daily Open Price: {self.Open}")
            
    def OnDailyDataConsolidated(self, sender, bar):
        if self.currDate != f'{self.Time.year}-{self.Time.month}-{self.Time.day}':
            # next day has come, update current date
            self.currDate = f'{self.Time.year}-{self.Time.month}-{self.Time.day}'
            # since this is the next day, so ready to get market open price
            self.isOpen = True