Does nothing because prev_calculated is const:
if(prev_calculated>0) prev_calculated--;Try printing prev_calculated each call of OnCalculate(). It will probably show: 0, 999, 0, 999, ... With 999 being your total bars on the chart.
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 trying to create my first indicator, the indicator calculates ICE Dollar index based
the indicator does not seem to constantly draw line (on every tick the indicator tends to disappear totally and re appear)
on changing the periodicity the indicator disappears and indicator window is blank.
Here is the code
Appreciate your help
Thanks
Bashir