Indicator vs EA

 
Hi all,
I downloaded an indicator and try to convert it to EA since some features i would like to use. However the result is not the same as i expected. As you can see in the picture above, the High and Low position with EA are 0. I basically copy the entire code (indicator) to a new EA but it doesn't work as i expected. I aslo attached the code for your reference. Can anyone help me?
Many thanks..
Amir
Files:
occ.mq4  8 kb
zigzag.mq4  8 kb
Reason: