Returning values of ZigZag indicator

 

In my current strategy, I want to use the values of the highs and lows of a ZigZag Indicator. Sadly enough, I can't figure out how to return/store these values.
I figured since the indicator already draws the lines, finding out the high and lows and storing this would be easy enough. Anyone happens to know the function I have to use for this.I already tried out with iCustom, but couldn't figure it out.

Thanks in advance.

 

Did you search the forum before posting ? I has been discussed again and again...

and again...

 

The most curious thing of all is that ZigZag redraws new highs/lows, so at least for the most current price it is useless, only for support/resistance at preferably high TFs.

I guess we all have believed that ZigZag would make us millionaires in our beginnings.   

 
Alain Verleyen #:

Did you search the forum before posting ? I has been discussed again and again...

and again...

Weird, I have been trying to search it. But couldnt find much. Do you maybe have some good forum posts for me. I want to program it my self, but need some guidance at the moment of finding other post about it.

 
Miguel Angel Vico Alba #:

The most curious thing of all is that ZigZag redraws new highs/lows, so at least for the most current price it is useless, only for support/resistance at preferably high TFs.

I guess we all have believed that ZigZag would make us millionaires in our beginnings.   

I am fully aware of that. Been trading for a couple of years and programming a little on the side. Found the zigzag indicator interesting, so I want to play around a bit. Not expecting to become rich at all.

 
Zwarte ijsman:

In my current strategy, I want to use the values of the highs and lows of a ZigZag Indicator. Sadly enough, I can't figure out how to return/store these values.
I figured since the indicator already draws the lines, finding out the high and lows and storing this would be easy enough. Anyone happens to know the function I have to use for this.I already tried out with iCustom, but couldn't figure it out.

Thanks in advance.

Hello ZigZag indicators store this value in buffers

for all the bars it sets it as EMPTY_VALUE and only those values of buffer which are not EMPTY_VALUE it will return the high / low values through buffer

Step 1 -  Use iCustom to load ZigZag Indicator

Step 2- Copy Buffer

Step 3 - Filter Buffer with EMPTY_VALUE to get high / lows

Step 4 - Store in variable array.

Step 5 - Use for loop to access these values.

learn from this ZigZag EA for example of code
ZigZag EA
ZigZag EA
  • www.mql5.com
Expert Advisor based on ZigZag indicator. Working with pending Buy Stop and Sell Stop orders.