I have something like this. It will error when trying to access the 5 minute close price.

Shouldn't there be a piece of code in intialize that is something simple like timeframe = X. Seems like this was made difficult just for the sake of making something difficult.

minutedata = TradeBarConsolidator(timedelta(minutes=5)) minutedata.DataConsolidated += self.minutedata self.SubscriptionManager.AddConsolidator(self.symbol, minutedata) def minutedata(self, sender, bar): close = bar[self.symbol].Close self.Debug(close) pass