How can I check if the terminal was just started and the indicator runs the first time?

To add comments, please log in or register
mar5
182
mar5  

As an example, I scan for fractals. As soon as a new fractal is formed an alert pops up. I do this on different timeframes.

But when I open the terminal I would like to know where the last fractal is. So I have to loop back. But I need this loop just once. Then the indicator scans for real time fractals.

How do I know that the terminal just started so I can execute the loop?

William Roeder
20208
William Roeder  

Terminal just started, indicator just added to a chart, or new history downloaded, is the same. OnCalculate's prev_calculated is zero.

You don't need to care. Just code your main loop properly
          How to do your lookbacks correctly.

mar5
182
mar5  
whroeder1:

Terminal just started, indicator just added to a chart, or new history downloaded, is the same. OnCalculate's prev_calculated is zero.

You don't need to care. Just code your main loop properly
          How to do your lookbacks correctly.

Thank you!

To add comments, please log in or register