OPEN-SOURCE SCRIPT
Güncellendi 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
Sürüm Notları
This script is an update of the Pivot Swings w Table. There is also a second table based upon the last two candle and is a Real-Time Momentum Gauge.DESCRIPTION AND USER GUIDE
Indicator Description: Candle Pattern Strength & Pivots (P Range V1.3) P Range V1.3 is a multi-dimensional analysis tool designed to quantify the "quality" of price reversals. While most indicators simply mark a pivot high or low, this script evaluates the conviction behind those levels by analyzing the bars surrounding the pivot. It utilizes a proprietary Bar Strength Rating (BSR) to help traders identify high-probability supply and demand zones.
Core Features Dynamic Pivot Tracking: Automatically identifies and extends unbroken pivot levels. If a pivot is breached, the script switches to "Run" mode to track the new local high/low.
High/Low Strength Scoring: A retrospective analysis of the volume, momentum (ADX), and candle patterns (Engulfing, Shaved Bars, etc.) that formed the pivot.
Real-Time Momentum Gauge: A horizontal sentiment dashboard that calculates the last 2 bar momentum of the market based on range expansion and volume weighting.
Range Analysis: Automatically calculates the Pivot Range and highlights the Upper and Lower 25% "Strike Zones" for mean reversion setups.
How to Read the Strength Metrics
1. High/Low Strength (The "Quality" Check)Displayed in the bottom-right table, these scores represent the historical conviction of the pivot.
High Strength (>15): Indicates institutional presence. The pivot was formed with aggressive price action (e.g., Bearish Engulfing) on rising volume and strong ADX momentum. These are "Hard Walls."
Low Strength (<5): Suggests a "drift" or exhaustion. Price turned because the opposing side stopped participating, not because a new side took control. These levels are more likely to be broken.
2. The Momentum Gauge (The "Right Now" Check)
Located at the bottom center, this gauge measures the current candle's momentum.
Strong Long/Short: Current price is expanding outside the prior range on high volume.
Neutral: The market is consolidating or lacks a clear volume driver.
Trading Strategies & Possible Strategy Logic
Mean Reversion:
Look for price to enter the Upper 25% Zone when the High Strength score is significantly higher than the Low Strength score. This indicates a strong resistance wall.
Breakout Confirmation:
If you are looking for a Long breakout, you want to see a Low Strength High Pivot. This suggests the resistance is weak and "ripe" for a breach.
Trend Defense In a bullish trend, watch for new Pivot Lows. If they maintain High Strength, it confirms that buyers are aggressively defending the trend on pullbacks.
Volatile Open (NY Session)Use the NY Open Window filter to identify if the initial morning volatility is creating "Strong" pivots or just noise. Key Inputs Pattern Analysis Window: Determines how many bars before/after the pivot are analyzed to calculate the Strength Score. (Default: 5). ADX Momentum: Sets the slope threshold for momentum. Higher values (0.7+) require a very sharp trend to add to the score; lower values (0.3) are better for catching early moves. Pivot Left/Right Bars: Standard pivot detection settings. Increase these for more "Macro" levels or decrease them for "Scalping" levels.
A Note for Traders: This indicator is most effective when the Momentum Gauge aligns with a High Strength Pivot Zone. For example: If price hits a "High Strength" Low Pivot and the Momentum Gauge shifts to "Long," you have a high-confluence entry signal.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.