By default buffers are filled with EMPTY_VALUE and no values are displayed into the "data window".
Anyway in some indicators (especially on old indicators and in my opinion also not correctly done) people like to use 0 for EMPTY_VALUE on buffer and then this command is used for displaying no value into "data windows" when buffer value is 0.
PlotIndexSetDouble(0,PLOT_EMPTY_VALUE,0);
Honestly no reasons comes to my mind for choosing a way or another, so better to use the default behavior that is EMPTY_VALUE by default.
So replying to your question: yes!
Don't forgot to do ArrayInitialize when prev_calculated is less than 1 (at the first indicator OnCalculate call).
By default buffers are filled with EMPTY_VALUE and no values are displayed into the "data window".
Anyway in some indicators (especially on old indicators and in my opinion also not correctly done) people like to use 0 for EMPTY_VALUE on buffer and then this command is used for displaying no value into "data windows" when buffer value is 0.
Honestly no reasons comes to my mind for choosing a way or another, so better to use the default behavior that is EMPTY_VALUE by default.
So replying to your question: yes!
Don't forgot to do ArrayInitialize when prev_calculated is less than 1 (at the first indicator OnCalculate call).
Thank you very much!
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi all,
When I initialize a buffer using SetIndexBuffer(), is the buffer contents filled with EMPTY_VALUE? Reason for that is I want to check if there is a value at [1] or if it is empty.
Thanks