Hi - I'm trying to build an algo that looks at the open and close price of the Monday candle every week. I've tried scheduling an event in but it doesn't work and shows a Runtime error when I try run it. It shows the below error;


Runtime Error: name 'Securities' is not defined
  at MondayPerfCheck

Could anyone guide me in the right direction please?

# region imports
from AlgorithmImports import *
# endregion

# ------------------------------------------------------------
STOCK = "SPY"
# ------------------------------------------------------------

class CreativeFluorescentOrangeHornet(QCAlgorithm):

    def Initialize(self):
        self.SetStartDate(2022, 6, 1)  # Set Start Date
        self.SetCash(100000)  # Set Strategy Cash

        # Add Assets
        self.stock = self.AddEquity(STOCK, Resolution.Daily)

        # Schedule check for Monday's performance
        self.Schedule.On(self.DateRules.Every(DayOfWeek.Monday), self.TimeRules.At(20, 0), self.MondayPerfCheck)

    def MondayPerfCheck(self):
            monPerf = Securities[STOCK].Open - Securities[STOCK].Close
            self.Log(str(Securities[STOCK].Open))
            self.Log(str(Securities[STOCK].Close))
            self.Log(str(monPerf))

    def OnData(self, data):
        pass

Many thanks