finding new high and low using zigzag

 

Hi I want to detect a zigzag 5 bars before. To find that I used this,

if(zigzag(shift+5)>0 && zigzag(shift+5)>Open[shift+5]) Alert ("new high");

if(zigzag(shift+5)>0 && zigzag(shift+5)<Open[shift+5]) Alert ("new low");

when using this code, it only detects new low. The code is almost identical but the code to detect the new high isn't working. Anyone can tell me why the new high code isn't working but the new low is working even though the code is almost the same?

 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the file.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code. zigzag()