OPEN-SOURCE SCRIPT
Diupdate

ZigZag MT5

1 317
ZigZag MT5 — 1:1 Port
A faithful port of the MetaTrader 5 standard ZigZag indicator to Pine Script v6. Same algorithm, same parameters, same output — just on TradingView.
Parameters (MT5 defaults):

Depth (12) — minimum bars between extrema; the lookback window for the Lowest/Highest scan
Deviation (5) — minimum price deviation in points (uses syminfo.mintick) before a new extremum is accepted
Backstep (3) — minimum bars between adjacent pivots; cleans up clustered extrema

How it works:
Mirrors MT5's two-buffer approach (ExtHighBuffer / ExtLowBuffer). For each bar it runs the Lowest/Highest scan, applies the deviation filter, removes weaker neighboring pivots within the backstep window, and finally alternates highs and lows in a second pass — including outside-bar handling.
Note: Like every ZigZag, the last segment repaints until a new opposing pivot is confirmed. By design.
Useful as a drop-in replacement if you're migrating strategies from MT5 to TradingView and need pivot points that match exactly.
Catatan Rilis
- fine tune to match exact algo in mt5

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.