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.
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!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?