I've attempted to make an algorithm that would use a universe for selecting stocks, and then consolidate 1-minute bars into 5-minute bars and add these to a rolling window in a separate SymbolData class. But despite several days of looking for possible solutions on the forum and trying to fix the code, I haven't been able to find a way to successfully add tradebars to the rolling window in the SymbolData class and not receive a "Rolling window is empty" error in the OnData method.

I've attached the algorithm and would appreciate any suggestions to get this algorithm to work. Thanks!

Author