Hi Community!

I'm new to Quant Connect and struggling with some custom features on my own. Would really appreciate some help if anyone has time.

I am trying to create a Rolling Daily High price for the S&P500 future, which resets at 2100 London each day, for the continous futures contract series. Eg I want to observe all available price points in the last 24h each day at 9pm London and store that as a daily value.

I have been attempting to do this using a mixture of code from other forum Qs but am failing. Any help would be great!

from datetime import timedelta

from AlgorithmImports import *

class DCAlgorithm(QCAlgorithm):

    def Initialize(self):

        self.SetStartDate(2018,10, 10)

        self.SetEndDate(2018,10,25)

        self.SetCash(100000)

        self.symbol = "ES"

        self.SetBenchmark(self.symbol)

        self.continuous_future_symbol = Symbol.Create(Futures.Indices.SP500EMini, SecurityType.Future, Market.CME)

        self.contract_symbols = self.FutureChainProvider.GetFutureContractList(self.continuous_future_symbol, self.Time)

        self.contract_symbol = sorted(self.contract_symbols, key=lambda symbol: symbol.ID.Date)[0]

        self.AddFutureContract(self.contract_symbol, Resolution.Minute, extendedMarketHours=True)

        self.consolidator = QuoteBarConsolidator(timedelta(1))

        self.Schedule.On(self.DateRules.EveryDay(self.contract_symbol), self.TimeRules.At(21, 0, TimeZones.London), self.OnDailyData);

        self.window = RollingWindow[float](2)

    def OnDailyData(self):

        self.window.Add(self.consolidator.WorkingData)

        self.consolidator = QuoteBarConsolidator(timedelta(1))

    def OnData(self, data):

        self.consolidator.Update(data[self.contract_symbol].High)

        currBar = self.window

        self.Plot("Custom", "CurrB", currBar)