I noticed all of the examples of consolidators include subscribing to an asset, creating a consolidator, an event handler and then adding it to the subscription manager. 

What if I wanted to create weekly consolidated bars for each one of the assets returned by my coarse and fine filters for universe selection, create moving averages for them and then check if conditions are met on a weekly basis?

Can you initialize consolidators in the OnData method, or do they always have to be part of the Initialize method?

 

Author