Drawing on the Chart (Indicator)

 

Hi guys


Im realy new to MQL4 and I got a problem with an Indicator which im writing at the moment. I was trying for LOTS of hours but i didnt manage to solve it... So I realy hope that a pro could give me a good advice. Its a very basic ZigZag indicator (for learning purposes only) and i have some conditions for a high / Low. If all conditions are true, i write the High / Low Pip value (High[] / Low[]) to the correct place to the buffer. if the conditions for the bar are not true, i just write 0 or 0.0. But if i look at it on the chart, i have on every high / Low just a vertical line which comes from the bottom of the chart to the high / low, and no zigzag! if I use an arrow (DRAW_ARROW) it works fine, and i have an arrow below every low and above every high, but i want zigzag!! please give me a hand!

regards simplex

 
simplex:

Hi guys


Im realy new to MQL4 and I got a problem with an Indicator which im writing at the moment. I was trying for LOTS of hours but i didnt manage to solve it... So I realy hope that a pro could give me a good advice. Its a very basic ZigZag indicator (for learning purposes only) and i have some conditions for a high / Low. If all conditions are true, i write the High / Low Pip value (High[] / Low[]) to the correct place to the buffer. if the conditions for the bar are not true, i just write 0 or 0.0. But if i look at it on the chart, i have on every high / Low just a vertical line which comes from the bottom of the chart to the high / low, and no zigzag! if I use an arrow (DRAW_ARROW) it works fine, and i have an arrow below every low and above every high, but i want zigzag!! please give me a hand!

regards simplex

Post your code then maybe one of us can help you.

 

try DRAW_SECTION

use EMPTY_VALUE for the "value" between the zig highs and lows

 
phy:

try DRAW_SECTION

use EMPTY_VALUE for the "value" between the zig highs and lows

thank you a lot phy!!!!! it worked :))) You're the best!


cheers simplex

Reason: