I am Trying to Obtain Highs and Lows and save them on a DataBase. But I want to Go Back on Historical Data certain amount of Bars. According to my Logic, If I do it on Bar Update, Every time there is a new Bar, it will do the same cycle over and over again. I don't Want the system to do that.
I would like it to review historical data when the strategy opens. then start adding values from real time data. Can I do a cycle from 0 to current Bar Under the Initialize(), then continue to add on Bar Update. or Would it be better to do a cycle for Instances of Zig Zag indicator.

Comment