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
Are you ever listening the answers ?
Plot indexed 2 to 6 DOESN'T EXIST.Thanks for the clarification... I actually thought I was reading and studying the answers, trying to make them line up with the MQL5 Reference "Connection between Indicator Properties and Corresponding Functions" topic. I now see where you have illustrated "PlotIndexSet...(1,..." where I had it as 2, and that does line up with the reference's statement:
"numeration of levels and plots in preprocessor terms starts with one, while numeration of the same properties at using functions starts with zero, i.e. the indicated value must be by 1 less than that indicated for #property."
which I recognize as the same as was in MQ4.
I see the assertion that the PlotIndex... argument "plotting style index" is not the same as the SetIndexBuffer argument "buffer index" and I have just been 'lucky' at setting colors and widths, I guess.
This leaves me wondering though, for example if I wanted to set Index Buffer 5's empty value to -1, it appears this will not work:
SetIndexBuffer(5,g_calcOne,INDICATOR_CALCULATIONS);
PlotIndexSetDouble(5,PLOT_EMPTY_VALUE,-0.1); //(Not a direct replacement for MQ4's SetIndexEmptyValue ?)
This will be a relatively easy experiment.
Thanks for the clarification... I actually thought I was reading and studying the answers, trying to make them line up with the MQL5 Reference "Connection between Indicator Properties and Corresponding Functions" topic. I now see where you have illustrated "PlotIndexSet...(1,..." where I had it as 2, and that does line up with the reference's statement:
"numeration of levels and plots in preprocessor terms starts with one, while numeration of the same properties at using functions starts with zero, i.e. the indicated value must be by 1 less than that indicated for #property."
which I recognize as the same as was in MQ4.
I see the assertion that the PlotIndex... argument "plotting style index" is not the same as the SetIndexBuffer argument "buffer index" and I have just been 'lucky' at setting colors and widths, I guess.
This leaves me wondering though, for example if I wanted to set Index Buffer 5's empty value to -1, it appears this will not work:
SetIndexBuffer(5,g_calcOne,INDICATOR_CALCULATIONS);
PlotIndexSetDouble(5,PLOT_EMPTY_VALUE,-0.1); //(Not a direct replacement for MQ4's SetIndexEmptyValue ?)
This will be a relatively easy experiment.
There is no sense to set a plot empty value when there is not plot.
There is no sense to set a plot empty value when there is not plot.
But, I have looked for values not the empty value in MQ4 worlds equivalent of "INDICATOR_CALCULATIONS".
I had referred to:
https://www.mql5.com/en/articles/81
and found this listed as equivalence:
MQL4: void SetIndexEmptyValue(int index, double value)
MQL5: bool PlotIndexSetDouble(index,PLOT_EMPTY_VALUE,value)
Which appears to be not true, as I inserted this which displayed 0.0000 (For Any Value N):