INVITE-ONLY SCRIPT

Dynamic S/R Zones (Verified Pivots)

45
Dynamic S/R Zones V1.2

Overview

Dynamic S/R Zones V1.2 is a Pine v6 structure visualizer that highlights nearby Support/Resistance zones from confirmed swing pivots on the current chart and an optional higher timeframe (HTF). It can also plot simple Fibonacci guide levels (33% / 50% / 66%) between the most recent swing points. All HTF requests use lookahead_off to avoid forward-looking data, and S/R anchors are derived from verified pivots to minimize repainting. Optional “touch-verified” coloring flips a level’s display once price trades through it.

This tool is an illustrative S/R map for chart review and education.

How it works

Verified Pivots (Non-Repainting):

• Minor S/R uses ta.pivothigh/ta.pivotlow with a symmetric lookback (“Pivot Strength”).
• Lines anchor only on confirmed pivots, so once drawn they remain stable.
• A de-dup buffer filters out levels that are too close together.

HTF Major Zones:

• HTF OHLC is requested via request.security(..., lookahead=barmerge.lookahead_off).
• The same pivot logic runs on the HTF series; lines appear after the HTF bar closes.
• Major lines can be shown alongside (or instead of) minor lines.

Touch-Verified Coloring (optional):

• When a level is touched (high ≥ level ≥ low), it flips from neutral to a side color:
– Support (price above) ≈ green; Resistance (price below) ≈ red.
• The verification state is persistent for that line.

Fibonacci Guides (optional):

• Draws 33% / 50% / 66% between the last opposing swing high/low.
• Verification/coloring modes:
  1. Pivot-Based: uses the most recent swing direction.
  2. HTF Trend-Based: uses a fast/slow EMA comparison on a user-selected HTF.
  3. Bounce/Reject Mode: color on touch regardless of trend interpretation.

• One arrow per bar (optional) indicates a newly verified fib touch.

What it displays

• Minor S/R lines from current-TF verified pivots (non-repainting anchors).
• Major S/R lines from HTF pivots (confirmed on HTF close).
• Optional labels that state level type, price, HTF tag, and Verified/Unverified status.
• Optional Fibonacci guide lines with labels, plus single-arrow confirmations.
• Coloring that reflects touch verification and current side (support/resistance).

Why it’s original

• Focuses on confirmed structure (minor + HTF) with de-duplication for clarity.
• Offers hybrid fib verification (pivot-based, HTF-trend-based, or bounce/reject) to let users study structure from multiple perspectives without asserting signals.
• Maintains persistent verification per level and avoids lookahead on HTF for stable, review-friendly visuals.
• Provides a compact workflow for scanning: minor structure, HTF context, then fib context.

Configuration & usage notes

• Pivot Strength: Higher values = stricter confirmation (fewer lines, more stable).
• Lookback Range: Prunes older lines; increase for broader context.
• HTF for Major S/R: Daily/4H/Weekly etc.; lines confirm on that timeframe’s close.
• Min Distance Between Levels: Helps reduce clutter from nearby duplicates.
• Touch-Verified Coloring: Enable for quick support/resistance side cues.
• Fibs: Choose coloring mode (Pivot-Based, HTF Trend-Based, or Bounce/Reject).
• HTF Trend TF / EMAs: Only affect coloring when using HTF trend mode for fibs.
• Performance: Labels and line counts can be tuned down on very long histories.

Limitations & assumptions

• Pivot detection depends on chart timeframe, liquidity, and chosen pivot length.
• HTF lines update after the HTF bar closes (by design, to avoid lookahead).
• Optional Realtime pivots for fibs (if enabled) are provisional and can shift until a swing verifies.
• Coloring and arrows are descriptive—they do not imply entries, exits, or probabilities.

Legal Disclaimer

These tools visualize calculations on historical data for charting and educational use only. They are not signals, recommendations, or promises of future results. Markets involve risk, and past results do not guarantee future outcomes. Provided “as is,” without warranties. Consider consulting a qualified professional before making decisions.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.