OPEN-SOURCE SCRIPT
Updated MTF Zig Zag

MTF ZigZag Pivot & Structure Tracker
A multi-timeframe market structure indicator that identifies, tracks, and visualizes significant pivot highs and lows using higher timeframe data, while projecting them onto the current chart for precise execution context.
Pine Script®
A multi-timeframe market structure indicator that identifies, tracks, and visualizes significant pivot highs and lows using higher timeframe data, while projecting them onto the current chart for precise execution context.
- Detects pivot highs and lows using a configurable higher timeframe (MTF) ZigZag logic to map true structural swings.
- Tracks real-time formation of HTF candles to accurately anchor pivots to the exact bar where structure forms.
- Draws dynamic ZigZag lines to visualize market direction and structural transitions between highs and lows.
- Generates percentage-based move labels between pivots to quantify momentum and expansion.
- Plots optional price labels at each pivot for precise level identification.
- Extends horizontal lines from historical pivots to highlight key support and resistance zones.
- Includes optional Bollinger Bands and EMA overlays for additional context on volatility and trend.
- Uses array-based state management to efficiently store, update, and limit historical pivot data.
- Provides alerts for newly formed higher timeframe pivot highs and lows.
Release Notes
minor updateRelease Notes
MTF updateOpen-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.