Hypothetical (Swing Explorer)

Overview
The Hypothetical (Swing Explorer) V1 is a Pine Script v6 indicator for TradingView, designed to analyze market structure and illustrate price movements. It combines a verified-pivot ZigZag (non-repainting), EMA-based trend context, pivot-anchored trail lines (with optional gradient fading and EMA/price color sync), an optional Zero-Lag guide from the last confirmed extreme, and illustrative “Hypothetical” marks (Next, Swing, Reversal, Forward Echo) with rough time estimates. A compact status table summarizes trend direction, trail state, and each hypothetical mark’s Pending/Verified status—useful when reviewing commonly watched swing scenarios.
How It Works
The indicator confirms swing highs/lows using ta.pivothigh/ta.pivotlow with a user-set lookback, then draws the ZigZag only from verified pivots to avoid repainting. Trend direction is derived from a fast (default: 8) versus slow (default: 21) EMA comparison. Hypothetical targets (Next, Swing, Reversal, Echo) are illustrated from recent swing distances, price velocity, and ATR context, with lightweight ETA labels. A pivot-anchored trail line follows price; you can sync its color to EMA trend or price change, and optionally fade opacity by relative ATR. A Zero-Lag reference line extends from the last verified extreme to the current bar. Optional custom candles mirror the current leg direction (illustrative or verified).
Key Features
• Verified-Pivot ZigZag: Visualizes swing highs/lows with configurable bull/bear colors and widths.
• Four Hypothetical Marks: Next, Swing, Reversal, and Forward Echo levels with simple ETAs.
• Trail Lines: Pivot-anchored, toggle between Hypothetical vs Verified-only, dashed/solid styles, width, opacity, and gradient fade by ATR.
• EMA/Price Color Sync: Choose whether trail color follows EMA trend or immediate price direction.
• Zero-Lag Line: Dashed guide projected from the last confirmed extreme.
• Custom Plot Candles (optional): Candle overlay colored by leg direction (illustrative or verified).
• Status Table: Trend, trail driver, gradient state, and each hypothetical’s Pending/Verified.
• Per-Feature Toggles: Show/hide labels vs lines independently for Next/Pred/Rev/Echo, with per-type line caps.
What It Displays
This indicator integrates verified-pivot structure, illustrative hypothetical targets, and a readable trail/Zero-Lag scaffold into a cohesive view of swing development. Lightweight velocity/ATR cues help illustrate where a next move or reversal could land—handy for day trading, scalping, or swing review across stocks, forex, futures, or crypto.
Originality
Implemented in Pine v6 using TradingView’s built-ins: ta.ema, ta.atr, ta.pivothigh, ta.pivotlow, and standard plotting APIs (lines, labels, table).
Configuration Notes
Set Pivot Lookback (default 10) and EMAs (default 8/21). Toggle Hypothetical vs Verified-only trail behavior, gradient fade, and Zero-Lag. For hypotheticals, choose labels and/or lines per feature (Next/Pred/Rev/Echo) and set max line history. Customize ZigZag colors, trail colors, opacity, and widths. Enable Custom Candles if you want bar coloring tied to leg direction.
Legal Disclaimer
This indicator is for informational and educational purposes only—not investment, financial, or trading advice. Past performance does not guarantee future results; trading involves risk of loss. Provided “as is” with no warranties. Consult a qualified professional before decisions. By using it, you assume all risk and agree to this disclaimer.
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ TradingScriptSolutions โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา
คำแนะนำของผู้เขียน
คำจำกัดสิทธิ์ความรับผิดชอบ
สคริปต์แบบเฉพาะผู้ได้รับเชิญเท่านั้น
เฉพาะผู้ใช้ที่ได้รับการอนุมัติจากผู้เขียนเท่านั้นที่สามารถเข้าถึงสคริปต์นี้ได้ คุณจะต้องร้องขอและได้รับอนุญาตก่อนจึงจะสามารถใช้งานได้ โดยปกติจะได้รับอนุญาตหลังจากชำระเงินแล้ว สำหรับรายละเอียดเพิ่มเติม ทำตามคำแนะนำของผู้เขียนด้านล่างหรือติดต่อ TradingScriptSolutions โดยตรง
TradingView ไม่แนะนำให้ชำระเงินหรือใช้สคริปต์ เว้นแต่ว่าคุณจะเชื่อถือผู้เขียนสคริปต์และเข้าใจวิธีการทำงานของมัน คุณยังอาจพบทางเลือกของโอเพนซอร์ส แบบฟรีในสคริปต์ชุมชนของเรา