The standard zigzag is legacy code. You're talking about a zigzag that caches values and self-corrects legs. The longer the depth, the longer it will lag to self correct itself. It's a blind hunter extreme search algorithm.
Metaquotes will not update any of the default terminal indicators. If they would do so, it would cause serious dependency problems as many users could be using these indicators as is inside expert advisors.
Forum on trading, automated trading systems and testing trading strategies
weird behaviour of zigzag indicator
Sac D, 2025.03.01 10:09
Hey does anyone know why this zigzag indicator is behaving like this. Not marking proper swings?
shown by red arrows.
zigzag values are - 7,5,3
timeframe 5 minute
is there any solution to avoid this fake swings or weird swings?
Forum on trading, automated trading systems and testing trading strategies
weird behaviour of zigzag indicator
Vladislav Boyko, 2025.03.01 12:13
Between those two swing lows there was a swing high that was cancelled. The swing high was canceled because that's how it works, the logic of the zigzag means that a new high can cancel the previous high if it is too close. Nobody can fix that because that's not a bug.

I miss the old forum, where people made an effort to formulate both questions and answers, instead of trying to post AI slop in place of both.
It feels like some people are trying to turn this place into an Moltbook branch. But they won't succeed😁.
Sorry for the off-topic.
I miss the old forum, where people made an effort to formulate both questions and answers, instead of trying to post AI slop in place of both.
It feels like some people are trying to turn this place into an Moltbook branch. But they won't succeed😁.
Sorry for the off-topic.
If it might serve you... this was my attempt to modernize the depth based zigzag. It excludes a backstep and only uses Depth and Deviation in the input (though I argue that the Deviation does not really need to be an input parameter at all).
It should never need to self correct any legs, and as such it doesn't do any price caching.
Read my blogs about the original zigzag indicator if you're interested in its shortcomings in technical depth- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use


Hello MQL Team, or anyone around,
I would like to report what appears to be an issue with the standard ZigZag indicator.
I loaded a ZigZag (Depth = 480, Deviation = 5, Backstep = 3) on the EURUSD H1 chart. A depth of 480 corresponds to approximately 20 trading days (24 hours × 5 trading days per week).
The indicator correctly plotted a downward segment between:
(All times are MetaQuotes-Demo server time.)
From that point onward, however, the indicator unexpectedly draws a new segment directly from that low (1.13240) to the next low formed on 28 July, 13:00 — 1.13533.
This behaviour seems incorrect for two reasons:
Could you please confirm whether this is the expected behaviour of the standard ZigZag algorithm, or whether it is a bug?
Thank you in advance for your assistance.
Kind regards,