PROTECTED SOURCE SCRIPT
MTF ZigZag with Customizable Rays

MTF ZigZag with Live Tracking (v6) Documentation
This indicator is a sophisticated market structure tool designed for TradingView (Pine Script v6). It combines traditional ZigZag logic with Multi-Timeframe (MTF) analysis, Horizontal Support/Resistance Rays, and a Real-time Tracking Line.
1. Three Core Features
① Multi-Timeframe (MTF) Analysis
Displays ZigZag patterns from higher timeframes (e.g., 1-hour ZigZag on a 5-minute chart).
Advantage: Allows you to see the "Big Picture" without the noise of lower timeframe price action, helping you stay aligned with the primary trend.
② Horizontal Rays (Support & Resistance)
Automatically draws horizontal lines extending to the right from confirmed ZigZag peaks (Highs) and troughs (Lows).
Advantage: Identifies key price levels that act as Support or Resistance. These are excellent for spotting potential breakout zones or reversal areas.
③ Live Tracking Line
Solves the "lag" issue inherent in standard ZigZag indicators. It draws a line from the last confirmed pivot point directly to the current real-time price.
Advantage: Visualizes the current "unconfirmed" wave. You can see exactly how the current momentum compares to previous market structure in real-time.
2. How the Logic Works
Detection Criteria
The script identifies market pivots based on two primary settings:
Depth: The minimum number of bars required where the price is the highest/lowest in that range.
Deviation (%): The minimum percentage price change required to validate a new wave.
Confirmed vs. Temporary
Solid Lines: Confirmed ZigZag waves that have met the Depth and Deviation criteria.
Dashed Lines (Live): The "Live Tracking" line. This moves with the current price and represents a wave that has not yet been locked in.
3. Parameter Settings
Parameter
Description
Timeframe
Specify the timeframe to pull data from (leave empty for current chart).
Deviation (%)
The sensitivity of the wave. Smaller values catch minor swings; larger values catch major trends.
Depth
The lookback period for pivot detection. Larger values result in smoother, larger waves.
Horizontal Rays
Customize colors, width, and styles (Solid, Dotted, Dashed) for High/Low levels.
Live Tracking Style
Adjust the appearance of the real-time line follow the current price.
This indicator is a sophisticated market structure tool designed for TradingView (Pine Script v6). It combines traditional ZigZag logic with Multi-Timeframe (MTF) analysis, Horizontal Support/Resistance Rays, and a Real-time Tracking Line.
1. Three Core Features
① Multi-Timeframe (MTF) Analysis
Displays ZigZag patterns from higher timeframes (e.g., 1-hour ZigZag on a 5-minute chart).
Advantage: Allows you to see the "Big Picture" without the noise of lower timeframe price action, helping you stay aligned with the primary trend.
② Horizontal Rays (Support & Resistance)
Automatically draws horizontal lines extending to the right from confirmed ZigZag peaks (Highs) and troughs (Lows).
Advantage: Identifies key price levels that act as Support or Resistance. These are excellent for spotting potential breakout zones or reversal areas.
③ Live Tracking Line
Solves the "lag" issue inherent in standard ZigZag indicators. It draws a line from the last confirmed pivot point directly to the current real-time price.
Advantage: Visualizes the current "unconfirmed" wave. You can see exactly how the current momentum compares to previous market structure in real-time.
2. How the Logic Works
Detection Criteria
The script identifies market pivots based on two primary settings:
Depth: The minimum number of bars required where the price is the highest/lowest in that range.
Deviation (%): The minimum percentage price change required to validate a new wave.
Confirmed vs. Temporary
Solid Lines: Confirmed ZigZag waves that have met the Depth and Deviation criteria.
Dashed Lines (Live): The "Live Tracking" line. This moves with the current price and represents a wave that has not yet been locked in.
3. Parameter Settings
Parameter
Description
Timeframe
Specify the timeframe to pull data from (leave empty for current chart).
Deviation (%)
The sensitivity of the wave. Smaller values catch minor swings; larger values catch major trends.
Depth
The lookback period for pivot detection. Larger values result in smoother, larger waves.
Horizontal Rays
Customize colors, width, and styles (Solid, Dotted, Dashed) for High/Low levels.
Live Tracking Style
Adjust the appearance of the real-time line follow the current price.
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script protégé
Ce script est publié en source fermée. Cependant, vous pouvez l'utiliser librement et sans aucune restriction – pour en savoir plus, cliquez ici.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.