Then you would only calculate for the former period if time[i-1] has changed.
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
Hi,
I am developing an indicator and I don't understand the OnCalculate event at all.
From what I can see, this indicator runs every time there is a new tick on the chart. So, I calculate for all candles the indicator (I limit it to 1000 candles)
Those candles are finished and therefore the indicator is calculated with every candle closed on the history.
But when the indicator has been calculated for history candles , I want it to only be calculated every time a candle is complete, not every time there is a tick.
How can I do it?
Thank you very much