Luminous Pivot S&R Matrix [Pineify]Luminous Pivot S&R Matrix — Dynamic Support & Resistance Zones with ATR-Adaptive Width and Breakout Detection
The Luminous Pivot S&R Matrix is a dynamic support and resistance indicator that automatically identifies significant pivot highs and pivot lows, constructs ATR-adaptive zones around them, and monitors each zone in real time for breakout invalidation. Unlike static horizontal line tools that require manual placement, this indicator continuously scans price action for structurally significant turning points using a configurable lookback window, then wraps each pivot in a volatility-scaled zone whose width adapts to current market conditions via the Average True Range (ATR). When price closes beyond a zone's pivot level, the zone is automatically deactivated and visually dimmed, while a breakout signal is plotted — giving traders a fully automated, self-managing support and resistance framework that stays relevant as markets evolve.
Key Features
Automatic pivot detection using a configurable lookback length to identify both major and minor structural turning points in price
ATR-adaptive zone construction that dynamically scales the width of each support and resistance zone based on current market volatility
Real-time zone management with automatic extension of active zones to the current bar and visual invalidation when zones are broken
Breakout detection system that flags bullish breakouts (close above resistance) and bearish breakouts (close below support) with triangle markers and candle coloring
Memory management system that limits the number of displayed zones per side, automatically removing the oldest zones to keep charts clean and readable
Built-in alert conditions for both bullish and bearish breakouts, enabling automated notification workflows
How It Works
The indicator operates through a three-stage pipeline: pivot detection, zone construction, and dynamic zone management.
Stage 1: Pivot Detection
The indicator uses Pine Script's built-in ta.pivothigh() and ta.pivotlow() functions with a user-defined lookback length (default: 15 bars). A pivot high is confirmed when a bar's high is the highest value within the lookback window on both sides. Similarly, a pivot low is confirmed when a bar's low is the lowest value within that same window. Because confirmation requires bars to the right of the pivot, detected pivots are inherently lagged by the lookback length — this is by design, as it ensures only structurally validated turning points are plotted, filtering out noise and false signals.
Stage 2: ATR-Adaptive Zone Construction
Once a pivot is confirmed, the indicator constructs a zone around it. Rather than using a fixed-width band, the zone boundaries are calculated using the 14-period ATR value at the pivot bar, scaled by the user's ATR multiplier (default: 0.8). The zone extends from pivot price + (ATR × multiplier) / 2 to pivot price − (ATR × multiplier) / 2 . This means zones are naturally wider during volatile market conditions and narrower during calm periods, providing contextually appropriate support and resistance bands. A horizontal line is drawn at the exact pivot price, and a semi-transparent box fills the zone area.
Stage 3: Dynamic Zone Management & Breakout Detection
On every bar, the indicator iterates through all active zones. Active zones are extended rightward to the current bar, keeping them visually current. The indicator then checks whether price has closed beyond the zone's pivot level — above for resistance zones, below for support zones. When a breakout occurs, the zone is deactivated (marked inactive), its visual appearance is dimmed to gray with a dashed line style, and a breakout flag is raised. This flag triggers the plotted triangle signal and candle coloring for that bar.
Trading Ideas and Insights
Zone Bounce Entries — When price approaches an active support zone from above, look for bullish reversal candlestick patterns (hammer, engulfing) within the zone for potential long entries. The zone's ATR-based width provides a natural area for price to find buyers, and the wider the zone, the more volatility the market has been experiencing — suggesting a larger potential reaction.
Breakout Continuation Trades — When a bullish breakout signal fires (green triangle), it confirms that price has closed above a resistance pivot. Traders can use this as confirmation to enter long positions, especially when the breakout occurs on above-average volume. The invalidated zone often becomes new support on retests.
Zone Density Analysis — Areas where multiple support or resistance zones cluster together represent stronger structural levels. When several pivots form at similar price levels, the overlapping zones create a high-confluence area that is more likely to hold or produce significant breakouts when finally violated.
Failed Breakout Recognition — If price triggers a breakout signal but quickly reverses back into the zone on the next bar, this suggests a false breakout or stop hunt. Traders can watch for these failed breakouts as potential reversal signals in the opposite direction.
Trend Context — In a strong uptrend, you will observe support zones consistently holding while resistance zones are frequently broken (bullish breakout signals). In a downtrend, the opposite pattern emerges. Tracking the ratio of bullish to bearish breakouts provides a structural view of trend strength.
How Multiple Indicators Work Together
The Luminous Pivot S&R Matrix integrates three complementary analytical techniques into a unified support and resistance system:
Pivot point detection provides the structural price levels, ATR-based zone construction adds volatility context to those levels, and the real-time breakout detection system transforms static levels into dynamic, self-managing trading zones — together forming a complete support and resistance analysis framework.
The pivot detection engine serves as the foundation, identifying bars where price has demonstrably reversed direction. The configurable lookback length allows traders to tune the sensitivity — a shorter lookback (5-10) captures minor swing points suitable for intraday trading, while a longer lookback (15-30) identifies major structural levels appropriate for swing and position trading.
The ATR-adaptive zone construction addresses a fundamental limitation of traditional pivot-based indicators: a single price line rarely captures the full area where supply or demand exists. By expanding each pivot into a zone scaled by the ATR, the indicator acknowledges that support and resistance are areas , not exact prices. The ATR multiplier gives traders control over how much volatility context to incorporate — a lower multiplier (0.3-0.5) creates precision zones for tight stop placement, while a higher multiplier (1.0-1.5) creates wider zones that capture the full range of potential price reaction.
The breakout detection and zone lifecycle management system is what transforms this from a static level-drawing tool into a dynamic analytical framework. By automatically tracking whether each zone remains active or has been invalidated, the indicator eliminates the manual overhead of monitoring multiple levels. The visual differentiation between active zones (solid colored) and broken zones (gray dashed) provides instant context about which levels are still structurally relevant. The memory management system ensures that only the most recent zones remain on the chart, preventing visual clutter that accumulates with traditional pivot indicators.
Unique Aspects
Volatility-adaptive zone width — Unlike fixed-width pivot zones or percentage-based bands, the ATR scaling ensures zones automatically widen during volatile periods and narrow during calm periods, providing contextually appropriate support and resistance areas across all market conditions.
Self-managing zone lifecycle — Zones are not simply drawn and forgotten. Each zone is actively monitored, extended, and eventually invalidated when broken. The visual transition from active (colored, solid) to broken (gray, dashed) creates an intuitive map of which levels remain structurally significant.
Structural pivot validation — By requiring confirmation bars on both sides of a pivot, the indicator only plots levels where price has demonstrably reversed. This eliminates the noise of minor fluctuations and focuses attention on levels where genuine supply or demand has been observed.
Clean chart design with memory management — The configurable zone limit per side prevents the chart from becoming cluttered with historical levels. The oldest zones are automatically removed when new ones form, ensuring the chart always shows only the most relevant current levels.
Dual breakout signaling — Breakouts are communicated through three simultaneous channels: plotted triangle markers, candle color changes, and configurable alert conditions. This multi-channel approach ensures traders never miss a breakout event regardless of how they monitor their charts.
How to Use
Add the Luminous Pivot S&R Matrix to your chart. It overlays directly on the price chart, displaying colored zones at detected pivot levels.
Observe the colored zones — green zones represent support areas (pivot lows), and red zones represent resistance areas (pivot highs). Active zones have solid lines and colored fills; broken zones appear gray with dashed lines.
Watch for breakout signals — a green triangle below a bar indicates price has closed above a resistance zone (bullish breakout), while a red triangle above a bar indicates price has closed below a support zone (bearish breakout). Breakout candles are also colored accordingly.
Use active zones as potential entry areas — look for price reactions (bounces, rejections) when price approaches an active zone. Combine with candlestick patterns or other confirmation tools for higher-probability entries.
Monitor zone invalidation patterns — frequent resistance breakouts suggest bullish momentum, while frequent support breakdowns suggest bearish momentum. This provides a structural view of the prevailing trend.
Set up alerts using the built-in alert conditions ("Bullish Breakout" and "Bearish Breakout") to receive notifications when price breaks through an active zone, even when you are not watching the chart.
Combine with volume indicators, trend filters, or momentum oscillators for additional confirmation before executing trades based on zone reactions or breakout signals.
Customization
Pivot Lookback (default: 15) — Controls how many bars on each side are required to confirm a pivot. Increase for major structural levels suitable for higher timeframes (20-30); decrease for more frequent pivot detection on lower timeframes (5-10).
Zone ATR Multiplier (default: 0.8) — Scales the 14-period ATR to determine zone width. Increase for wider zones that capture more price reaction area (1.0-1.5); decrease for tighter, more precise zones (0.3-0.5).
Max Active Zones per side (default: 5) — Limits how many support and resistance zones are displayed simultaneously. Increase if you want to see more historical context (8-15); decrease for a cleaner chart with only the most recent levels (2-3).
Support / Resistance Colors — Customize the zone and signal colors to match your chart theme or personal preference.
Zone Transparency (default: 85) — Controls the opacity of zone box fills and borders. Lower values make zones more prominent; higher values keep them subtle and non-distracting.
Conclusion
The Luminous Pivot S&R Matrix provides a methodologically rigorous approach to automated support and resistance analysis by combining structural pivot detection with volatility-adaptive zone construction and real-time breakout monitoring. By treating support and resistance as dynamic zones rather than static lines, and by automatically managing the lifecycle of each zone from creation through invalidation, this indicator eliminates the manual overhead of traditional S/R analysis while providing richer contextual information. Whether you are a day trader looking for precise intraday bounce zones, a swing trader identifying key structural levels for position entries, or a position trader monitoring major support and resistance breaks for trend confirmation, the Luminous Pivot S&R Matrix delivers a clean, self-managing, and visually intuitive framework for understanding where the market's key structural boundaries lie — and when they are being broken.
Индикатор Pine Script®






















