I am having a hard time figuring out how to use the history function to warm up my SMA indicator. Is there an example that shows how to warm up an indicator with historical consolidated data? I am currently able to call the History function. But I am having trouble consolidating the 1m history data into hour data for my SMA indicator.

I've attached a backtest.

Thx for the help.