Yes, I am simply calling dataclose.get(0, 288) in next() of my Strategy class. I have 5-minute candlestick data samples, so 288 samples is 24 hours of data. The "first run" is just the first time next() is called.
Using the moving average indicator with 288 period does the trick of delaying the next() until 288th cycle. Thanks.
It seems the right way to do is to get calculation done in an Indicator class, so I can set period to the delay period I want. So I am looking at sma.py which calls Average(self.data, period=self.p.period). This seems to affect how the Strategy class operate. But I couldn't find the Average class anywhere in the backtrader package folder. Where can I find relevant information about it?