EMPTY_VALUE means 'do not display/draw this value'
It is not the same as 0
And it's only doing that on the few initial bars buffer[Bars-1]..buffers[Bars-period]
Those bars can't be used as SMA(x) doesn't work when there's less then x bars on the chart.
Ahhh yes thanks WHR thats what I was missing !! I couldnt see the point of doing that until you mentioned the SMA(x) and the periods, now it makes sense
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
This is part of the bollinger bands source code why is it neccessary to initialize the buffers to zero with EMPTY_VALUE ? Should I be doing this in my own indicators ?