OPEN-SOURCE SCRIPT
ที่อัปเดต:

ZigZag MT5

1 313
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.
Release Note
- fine tune to match exact algo in mt5

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน