Zig-Zag High-Low Indicator

 

How to code to find the zigzag High/Low of the following. It is easy to see from eyes, but is there any simple way to code?

 

It would be nice if the indicator would print HH (Higher High) or LL (Lower Low) or LH (Lower High) or Higher Low( HL) above and below each Peak!

Dave

 
1Dave7:
It would be nice if the indicator would print HH (Higher High) or LL (Lower Low) or LH (Lower High) or Higher Low( HL) above and below each Peak! Dave

This is exactly what I am looking for.

 

How does Elliot Wave software do it? Before they can count each wave, they have to find the high/low, any one have the code?

 

found this thread but I don't understand the program.

https://www.mql5.com/en/forum/174745

 
1Dave7:
It would be nice if the indicator would print HH (Higher High) or LL (Lower Low) or LH (Lower High) or Higher Low( HL) above and below each Peak! Dave

if you can ellaborate it more by pics i think i can have it for you guys by tomorrow

 

It will be ok if we can see an arrow to show the entry signal

 
Reason: