OPEN-SOURCE SCRIPT
Pivot Swings w Table

Pivot Swings w Table — Intraday Structure & Range Analyzer
This indicator identifies key pivot highs and lows on the chart and highlights market structure shifts using a real-time table display. It helps traders visually confirm potential trade setups by tracking unbroken swing points and measuring the range between the most recent pivots.
🔍 Features:
🔹 Automatic Pivot Detection using configurable left/right bar logic.
🔹 Unbroken Pivot Filtering — only pivots that haven't been invalidated by price are displayed.
🔹 Dynamic Range Table with:
Latest valid Pivot High and Pivot Low
Total Range Width
Upper & Lower 25% range thresholds (useful for value/imbalance analysis)
🔹 Trend-Based Color Coding — the table background changes based on which pivot (high or low) occurred more recently:
🟥 Red: Downward bias (last pivot was a lower high)
🟩 Green: Upward bias (last pivot was a higher low)
🔹 Optional extension of pivot levels to the right of the chart for support/resistance confluence.
⚙️ How to Use:
Adjust the Left Bars and Right Bars inputs to fine-tune how swings are defined.
Look for price reacting near the Upper or Lower 25% zones to anticipate mean reversion or breakout setups.
Use the trend color of the table to confirm directional bias, especially useful during consolidation or retracement periods.
💡 Best For:
Intraday or short-term swing traders
Traders who use market structure, support/resistance, or trend-based strategies
Those looking to avoid low-quality trades in tight ranges
✅ Built for overlay use on price charts
📈 Works on all symbols and timeframes
🧠 No repainting — pivots are confirmed with completed bars
This indicator identifies key pivot highs and lows on the chart and highlights market structure shifts using a real-time table display. It helps traders visually confirm potential trade setups by tracking unbroken swing points and measuring the range between the most recent pivots.
🔍 Features:
🔹 Automatic Pivot Detection using configurable left/right bar logic.
🔹 Unbroken Pivot Filtering — only pivots that haven't been invalidated by price are displayed.
🔹 Dynamic Range Table with:
Latest valid Pivot High and Pivot Low
Total Range Width
Upper & Lower 25% range thresholds (useful for value/imbalance analysis)
🔹 Trend-Based Color Coding — the table background changes based on which pivot (high or low) occurred more recently:
🟥 Red: Downward bias (last pivot was a lower high)
🟩 Green: Upward bias (last pivot was a higher low)
🔹 Optional extension of pivot levels to the right of the chart for support/resistance confluence.
⚙️ How to Use:
Adjust the Left Bars and Right Bars inputs to fine-tune how swings are defined.
Look for price reacting near the Upper or Lower 25% zones to anticipate mean reversion or breakout setups.
Use the trend color of the table to confirm directional bias, especially useful during consolidation or retracement periods.
💡 Best For:
Intraday or short-term swing traders
Traders who use market structure, support/resistance, or trend-based strategies
Those looking to avoid low-quality trades in tight ranges
✅ Built for overlay use on price charts
📈 Works on all symbols and timeframes
🧠 No repainting — pivots are confirmed with completed bars
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。