You need to map buffer 0 to property 1 and buffer 1 to property 2.
SetIndexBuffer(0,ZigZagBuffer,INDICATOR_DATA); SetIndexBuffer(1 ,LineBuffer,INDICATOR_DATA);
Nagisa Unada:
You need to map buffer 0 to property 1 and buffer 1 to property 2.
Thanks a lot Nagisa! I added the new buffers without change the index buffers for calculations. I was forget completely about this characteristic.
To who made this mistake: the indexes need to have the same order than the indicator declaration. Any index that will not be used to plot a graph need to be indexed after all that will be appear.

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
Hi for all!
I want to create a custom zigzag with a line (like MA). I tought to use a DRAW_SECTION (for zigzag) and a DRAW_LINE (for my line).
All looks fine, but when I try to run, there is no horizontal line and appear several vertical lines. I already developed other indicators using DRAW_SECTION and using DRAW_LINE. But it's my first time using both in the same indicator. What I'm missing?
Tks by advance!
Result:
Code: It is the mql5 zigzag example code with the line indicator structure