too many failure.....at the end of the day, I got two things:
1, do not add new buffers/plots after the no-drawing buffers, always before them.
2, do not asign EMPTY_VALUE to indicator buffer when needed, use 0.0 instead.
joshatt # :
too many failure.....at the end of the day, I got two things:
1, do not add new buffers/plots after the no-drawing buffers, always before them.
2, do not asign EMPTY_VALUE to indicator buffer when needed, use 0.0 instead.
You will avoid many mistakes if you create a template using the 'MQL Wizard'.

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
There's a given MACD indicator, which has 4 buffers and 2 plots ( ExtFastMaHandle and ExtSlowMaHandle don't draw). Now I'm adding another 2 lines (actually 1 histogram and 1 line) and 2 arrows, making it 8 buffers and 6 plots.
The following is my try. In OnCalculate(), with debugging, I found the 2 arrows (only draws when golden cross or death cross of MACD happen) got correct data, it just does not draw. The 2 lines I added work fine, I don't know why arrows stuck.
Could anybody please give me a hand? (please just keep an eye on 7 and 8, which is uparrow[] and downarrow[])