Hi!

I've managed to attach custom data to my code using csv from google drive. It works correctly in a simple Buy and Hold strategy. Unfortunately, when I want to add rolling window to my data, I get this error:

Runtime Error: Trying to dynamically access a method that does not exist throws a TypeError exception. To prevent the exception, ensure each parameter type matches those required by the 'converter.Data'>) method. Please checkout the API documentation.
  at OnData
    self.prevPrices[symbol].Add( data[symbol] )
   at Python.Runtime.PythonException.ThrowLastAsClrException()
   at Python.Runtime.PyObject.Invoke(PyTuple args in main.py: line 56

Do you have any idea what could be causing this and how to solve this issue? I found out that this type of error has been mentioned before: https://www.quantconnect.com/forum/discussion/11553/rolling-window-not-working-lean-locally/p1 but without any final solution.
 

# region imports
from AlgorithmImports import *
class MyCustomDataType(PythonData):

    def GetSource(self,
         config: SubscriptionDataConfig,
         date: datetime,
         isLive: bool) -> SubscriptionDataSource:
        return SubscriptionDataSource("http//link=csv", SubscriptionTransportMedium.RemoteFile)

    def Reader(self,
         config: SubscriptionDataConfig,
         line: str,
         date: datetime,
         isLive: bool) -> BaseData:

        if not (line.strip()):
            return None

        index = MyCustomDataType()
        index.Symbol = config.Symbol

        try:
            data = line.split(',')
            index.Time = datetime.strptime(data[0], "%Y%m%d %H:%M")
            print (index.Time)
            index.EndTime = index.Time + timedelta(days=1)
            index.Value = float (data[4])
            index["open"] = float(data[1])
            index["close"] = float(data[6])

        except ValueError as a:
            print (a)
            # Do nothing
            return None

        return index

class CustomIndexStrategy(QCAlgorithm):

    def Initialize(self):

        self.Pair_1 = self.AddData(MyCustomDataType, "EURSEK_DAILY", Resolution.Daily).Symbol
        self.holdingDays = 1
        self.SetStartDate (2020, 1, 1) 
        self.SetEndDate(2022,7,1)
        self.SetCash(10000)  
        self.symbols = [self.Pair_1]
        self.prevPrices = { symbol : RollingWindow[QuoteBar](7) for symbol in self.symbols }
        self.ticketPair1 = None 
        self.ticketPair2 = None

    def OnData(self,data):
        
        for symbol in self.symbols:
            if data.ContainsKey(symbol):
                self.prevPrices[symbol].Add( data[symbol] )

        if not all([ window.IsReady for window in self.prevPrices.values() ]):
            return
            
        Pair1_window = self.prevPrices[self.Pair_1]
        Pair1_1D = Pair1_window[1].Close
        Pair1_0D = Pair1_window[0].Close

        #if self.ticketPair1 is None and self.Securities[self.Pair_1].Exchange.ExchangeOpen is True and Pair1_0D < Pair1_1D < Pair1_2D < Pair1_3D < Pair1_4D < Pair1_5D < Pair1_6D :            

        if not self.Portfolio.Invested and Pair1_0D < Pair1_1D < Pair1_2D < Pair1_3D:
            self.MarketOrder(self.Pair_1, 1)