Single Target After Pivot by Santiago Rebello

2 064
Zig Zag - Single Target After Pivot is an advanced structural charting tool designed to isolate the most recent confirmed market pivot (High or Low) and project a dynamic, time-based structural target directly into the future. By utilizing the native TradingView ZigZag framework (v7), this indicator eliminates lagging market signals and provides real-time projection horizons for swing traders and trend followers.

Unlike standard ZigZag indicators that only look backward, this script introduces a forward-looking predictive modeling vector that anchors to the last confirmed structural breakout.

How It Works (The Core Logic)
Structural Detection: The script uses an optimized multi-point ZigZag calculation matrix to establish structural validation points based on user-defined percentage deviations and depth settings.

Dynamic Target Extrapolation:

When the last confirmed pivot is a High, the script identifies a potential downside continuation or retracement target. It calculates a Target Low by subtracting the deviation percentage from the pivot price.

When the last confirmed pivot is a Low, the script identifies an upside target. It calculates a Target High by adding the deviation percentage to the pivot price.

Time-Based Projections: Instead of basic horizontal lines, this script uses high-precision millisecond-time mapping (xloc.bar_time) to project a trajectory slope into the future right-hand margin of the chart over a designated timeframe horizon (Target Days).

Key Features
Forward-Looking Target Vector: Dashed target projection lines and labels cleanly map out explicit price objectives and time horizons in the future blank space of your chart.

Anchor Historical Prints: Optional historical label triggers map midpoint bar counters directly over confirmed pivots for rapid backtesting validation.

Real-time Metric HUD Dashboard: An elegant UI table pinned to the top right tracks absolute structural statistics, including total validated pivots, target scan horizons, and current active trend objectives.

Input Configurations
Price Deviation (%): Controls the sensitivity of the pivot detection engine. Higher percentages isolate major macroeconomic wings; lower values target micro-scalping structures.

Pivot Legs (Depth): Sets the minimum bar spacing required between consecutive highs/lows to confirm structural integrity.

Target Days: The exact future bar/time horizon used to project the predictive target vector outward.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.