Day 1 newb here. I am just playing around with creating my first trading algorithm. I am working in python, and I followed the tutorial about how to set up consolidated trade bars. I have set up a five minute trade bar which works when just using a single stock as argument, like in the tutorial.
I wish to get 5 minute bars for multiple stocks. I was hoping the following would work, but it doesn't.
self.SubscriptionManager.AddConsolidator(["AAPL","SPY"], fiveMinuteConsolidator)
So then I tried this:
self.SubscriptionManager.AddConsolidator("AAPL", fiveMinuteConsolidator)
self.SubscriptionManager.AddConsolidator("SPY", fiveMinuteConsolidator)
Which will backtest without error but only seems to trigger callback for "SPY" data. I would love to get data for both symbols at the same time in the fiveMinuteBarHandler function.
It seems bulky to have to re-define a different callback for each symbol.
ANy help is greatly appreciated