Pauper31:
I don't see where you are setting value equal to empty when condition is not valid for a buffer
Hello all,
I created an MT5 indicator lately that is drawn in a subwindow. For some reason, a bar is drawn the subwindow that I do not expect. See image below:
I converted this indicator from MQL4. The multi-colored line at the bottom of the subwindow should not be there.
I hope you can help me spot the error in the code below: Thanks in advance.
for(int i=0; i<limit; i++) { Sydney[i]=Tokyo[i]=London[i]=NewYork[i]=EMPTY_VALUE; ⋮
You initialized to zero,
if(prev_calculated==0) { limit=rates_total; ArrayInitialize(Sydney,0.0); ArrayInitialize(Tokyo,0.0); ArrayInitialize(NewYork,0.0); ArrayInitialize(London,0.0); } else limit=rates_total-prev_calculated;
whereas empty plot was regarded as EMPTY_VALUE,
PlotIndexSetDouble(1,PLOT_EMPTY_VALUE,EMPTY_VALUE);
So, zero(0) would be plotted for all regions not in session.
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
Hello all,
I created an MT5 indicator lately that is drawn in a subwindow. For some reason, a bar is drawn the subwindow that I do not expect. See image below:
I converted this indicator from MQL4. The multi-colored line at the bottom of the subwindow should not be there.
I hope you can help me spot the error in the code below: Thanks in advance.