Hi - I'm trying to get the high & low of the first 5 minutes of SPY on 1st June based on the below code. For some reason when I look at the prices shown in Debug, it's showing 412.38 as the ‘low’ of the opening 5 minute range, when I expect it to be around the 415.09 price. 

See image below - I expect the high & low to be around the blue cross area, but for some reason the code is picking up the blue circle as the ‘low’ of the range when it's not on 1st June. 

412.38 seems to be low of final candle on 31 May - why does this issue occur and how do I fix it?

Output from the Logs:

2022-06-01 10:09:00 :Price: 412.37 // High: 416.2 // Low: 412.38 // Width: 3.819999999999993197061_1654515831.jpg
# ------------------------------------------------------------
STOCK = "SPY"; PERIOD = 5; WAIT = 0; MULTIPLIER = 1
# ------------------------------------------------------------

class Test(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022, 6, 1)  
        self.SetEndDate(2022, 6, 1)  
        self.SetCash(100000) 
        self.stock = self.AddEquity(STOCK, Resolution.Minute).Symbol
        self.hh = self.MAX(self.stock, PERIOD, Resolution.Minute, Field.High)
        self.ll = self.MIN(self.stock, PERIOD, Resolution.Minute, Field.Low)
        self.SetWarmUp(PERIOD, Resolution.Minute)
        self.openingrange_HH = 0
        self.openingrange_LL = 0
        self.tradeLimit = True
        self.Schedule.On(self.DateRules.EveryDay(self.stock), self.TimeRules.AfterMarketOpen(self.stock, PERIOD), self.DailyCheck)

        self.Schedule.On(self.DateRules.EveryDay(self.stock), self.TimeRules.BeforeMarketClose(self.stock, 5), self.Liquidate)

    def DailyCheck(self):
        if self.IsWarmingUp: return
    
        self.openingrange_HH = self.hh.Current.Value
        self.openingrange_LL = self.ll.Current.Value
        self.tradeLimit = True
        
    
def OnData(self, data):
        if self.IsWarmingUp: return
        if (self.openingrange_HH == 0 or self.openingrange_LL == 0): return
    
        price = self.Securities[self.stock].Price
        risk = self.Portfolio.TotalPortfolioValue / 10000
        rangewidth = self.openingrange_HH - self.openingrange_LL
        shareqty = Math.Round(risk / rangewidth)

        if not self.Portfolio[self.stock].Invested and self.tradeLimit == True:
            if price > self.openingrange_HH:
                self.SetHoldings("SPY", 1.0)
                self.Debug("Price: " + str(price) + " // High: " + str(self.openingrange_HH) + " // Low: " + str(self.openingrange_LL) + " // Width: " + str(rangewidth))