Piv X**Title:** Piv X: Confluence-Based Market Structure & Volume Analyzer
**Introduction**
Piv X is a comprehensive market structure analysis tool designed to grade the quality of Pivot Points using a composite "Confluence Score." Unlike standard indicators that simply identify local highs and lows based on price alone, this script evaluates the *strength* of every pivot by cross-referencing it against volume data, momentum divergences, multi-timeframe structure, and institutional key levels.
**Concept & Methodology**
The core functionality of this script builds upon a **Dynamic Pivot Quality Scoring System**. When a pivot point is detected (using an ATR-based dynamic lookback), the script runs a background analysis on 10+ technical factors to assign a "Confluence Score" (0-100).
The score is calculated based on the accumulation of the following factors:
1. **Volume Anomalies**: Detects volume spikes at the pivot, suggesting institutional participation.
2. **Momentum Divergence**: Checks for RSI and Williams %R divergences relative to price action to identify exhaustion.
3. **Liquidity Mechanics**: Identifies "Swing Failure Patterns" (SFP) and "Sweeps" where price pierces a previous structure but closes back inside.
4. **Multi-Timeframe Alignment**: Verifies if the pivot aligns with Higher Timeframe (HTF) trends and structures to filter out counter-trend noise.
5. **Key Level Interaction**: Rewards pivots that form near Daily/Weekly Highs or Lows.
6. **Fair Value Gap (FVG) Fills**: Detects if the pivot is reacting to a market imbalance fill.
**Unique Feature: Williams %R Divergence Anchored VWAP**
This tool introduces a logic-driven Anchored VWAP. Instead of arbitrarily anchoring VWAPs to high/low dates, the script automatically anchors a VWAP from the exact candle where a Williams %R Momentum Divergence is confirmed. This allows traders to visualize the "true cost basis" of participants who entered specifically on the momentum reversal signal.
**How to Use**
1. **Golden Zones (High Confluence)**: Pivots that achieve a high Confluence Score (e.g., >80) are highlighted with a distinct "Golden" border and background. These represent high-probability Support/Resistance levels backed by multiple forms of technical evidence.
2. **Standard Zones (Normal Confluence)**: Pivots with moderate scores are shown in standard Green/Purple. These are valid structure points but may require additional confirmation before trading.
3. **Trend Filtering**: The "Trend System" overlay (using EMA Clouds and RSI filters) provides visual context for the dominant trend direction, helping traders avoid taking structure signals against the main flow.
4. **Market Structure Shifts (MSS)**: The script automatically plots CHoCH (Change of Character) lines to alert traders when the sequence of Higher Highs or Lower Lows has been broken, often signaling a trend reversal.
**Settings**
* **Pivot Detection**: Adjust the ATR Multiplier to control the sensitivity of pivot detection.
* **Filters**: Toggle specific scoring factors (like Session Logic or HTF Confluence) to customize how strict the Scoring System is.
* **Visuals**: Enable/Disable specific VWAP periods (Weekly, Monthly, Yearly) to keep the chart clean.
**Disclaimer**
This tool is intended for market analysis and educational purposes only. Past performance of these setups does not guarantee future results.
Pine Script® indicator






















