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.
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với TradingScriptSolutions.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.
Hướng dẫn của tác giả
Thông báo miễn trừ trách nhiệm
Tập lệnh chỉ hiển thị cho người được mời
Chỉ những người dùng được tác giả đồng ý mới có thể truy cập tập lệnh này. Bạn cần yêu cầu và xin phép sử dụng tập lệnh này. Quyền truy cập thường được cấp sau khi thanh toán. Để biết thêm chi tiết, hãy làm theo hướng dẫn của tác giả bên dưới hoặc liên hệ trực tiếp với TradingScriptSolutions.
TradingView KHÔNG khuyến khích trả tiền hoặc sử dụng tập lệnh trừ khi bạn hoàn toàn tin tưởng tác giả và hiểu cách hoạt động của tập lệnh. Bạn cũng có thể tìm thấy các giải pháp thay thế miễn phí, mã nguồn mở trong mục tập lệnh cộng đồng của chúng tôi.