Identifying Higher High and Low and Lower High and Low

 

Hi I wanted to programmatically check in MQL4 if I have upward trend or downward trend which is 1 set of higher high and higher low (long) and 1 set of lower high and lower low. 

I tried to use zigzag indicator but cannot dynamically get values of the tips of the lines. Ideally I want to store values of the recent highs and lows as seen in the screenshot

Files:
HHHL1.JPG  46 kb
 
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help 2017.04.21

Or pay someone. Top of every page is the link Freelance.
          Hiring to write script - General - MQL5 programming forum 2018.05.12

Reason: