Shouldn't it be pZZ1==zigzag(shift) pZZ2==zigzag(shift) ?
Luandre Ezra: on the screenshot shows (part with red dot), it shows that the last zigzag is downtrend where as on the chart is uptrend. Can anyone tell me which part of the code that makes it return false result?
It is only uptrend after the bar zero made its new high. Don't look the the forming bar.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi everyone, I tried to get the direction of the last zigzag and I found out sometimes it returns a false result. This is the code that I used:
on the screenshot shows (part with red dot), it shows that the last zigzag is downtrend where as on the chart is uptrend. Can anyone tell me which part of the code that makes it return false result?