First time creating an algorithm from practically scratch using the QCAlgo framework so please, be gentle! I am wanting to consolidate to 5-minute bars and then use rolling windows to identify price action and emit an insight when identified. As of now, I cannot determine where to place self.window.Add(data[) in the algorithm. Attached is the code; the error received is: 

143616_1645043991.jpg

No matter where I place this code, the error seems to persist, albeit relative to the new location. Suggestions?