OPEN-SOURCE SCRIPT
Pivot Support & Resistance Matrix [ChartPrime]

Pivot Support & Resistance Matrix [ChartPrime]
🔶 OVERVIEW
Traders often struggle to identify which support and resistance levels are truly critical and which ones are just temporary market noise. The Pivot Support & Resistance Matrix [ChartPrime] solves this by combining automated, proximity-filtered structural lines with a real-time, volume-cleared Polyline Pivot Profile Engine.
Instead of cluttering your chart with every single minor pivot, this script utilizes an ATR-based buffer system to only track key structural levels. Furthermore, it pools all historical pivot points into a customized histogram matrix displayed right in your margin, pinpointing the absolute **Pivot Point of Control (POC)** where historical order blocks are most heavily clustered.
🔶 HOW IT WORKS
The script processes market structure through a multi-tiered calculation architecture:
🔶 KEY FEATURES
🔶 TRADING APPLICATIONS
🔶 SETTINGS
🔶 CONCLUSION
The Pivot Support & Resistance Matrix [ChartPrime] indicator completely modernizes standard support and resistance trading. By combining price-filtered line tracking with a structural density profile, it allows traders to clearly see where major liquidity walls stand and precisely how much volume was required to break them down.
🔶 OVERVIEW
Traders often struggle to identify which support and resistance levels are truly critical and which ones are just temporary market noise. The Pivot Support & Resistance Matrix [ChartPrime] solves this by combining automated, proximity-filtered structural lines with a real-time, volume-cleared Polyline Pivot Profile Engine.
Instead of cluttering your chart with every single minor pivot, this script utilizes an ATR-based buffer system to only track key structural levels. Furthermore, it pools all historical pivot points into a customized histogram matrix displayed right in your margin, pinpointing the absolute **Pivot Point of Control (POC)** where historical order blocks are most heavily clustered.
🔶 HOW IT WORKS
The script processes market structure through a multi-tiered calculation architecture:
- Proximity-Filtered S/R Generation: The script monitors classic structural highs and lows ($Pivot\ High / Low$). To prevent messy line stacking, it implements an automated proximity filter using an
ATR \times Multiplier$ threshold. A fresh Support or Resistance line will only spawn if there isn't an active, unbroken line already sitting within that price buffer.
- Dynamic Breakout Conversion & Volume Logging: Active lines automatically extend forward in time. The exact moment price closes past a level, the script transforms its state: it turns into a dashed, neutral-colored broken level, and replaces its price label with the exact transaction volume that occurred on the breakout candle (formatted cleanly as K or M).
- Polyline Profile Matrix: At the right edge of your screen, the script divides the high-to-low calculation lookback window into a customized array of price bins. It then scans through all historical pivots, plotting a seamless, shaded polyline histogram based on pivot density.
- Pivot Point of Control (POC): The single price bin that contains the highest concentration of historical pivot touches is highlighted across your entire chart as a solid red **Pivot POC Line**, displaying exactly how many times institutions used that precise level for market reversals.
🔶 KEY FEATURES
- Smart ATR Density Filtering: Prevents redundant lines from overlapping in tightly consolidated ranges, providing clean, high-conviction key levels instead of generic lines on every candle.
- Post-Breakout Volume Memory: Instead of deleting broken lines, they switch to a dashed visual state while logging the breakout volume. This tells you instantly whether a level was smashed with heavy institutional backup or weakly drifted through.
- Adaptive Profile Theme Coloring: The polyline histogram dynamically matches the current market state. If more historical support pivots have been registered than resistance levels inside your lookback window, the profile automatically adopts the Support color theme, signaling a bullish structural baseline (and vice versa).
- Bin Smoothing Radius Configuration: To account for minor market fluctuations, each pivot point distributes its structural weight to adjacent price bins based on a user-defined radius, creating a smooth, professional-grade market profile.
🔶 TRADING APPLICATIONS
- High-Volume Breakout Validation: When an established support or resistance line is broken, check the volume tag left on the line. A break showing high volume (e.g., $4.5M$) indicates a high-probability trend continuation or verified Market Structure Shift.
- Pivot POC Magnet Re-entries: The red Pivot POC line acts as a major institutional fair-value anchor. When price expands far away from it, it serves as an excellent structural target; conversely, during macro retracements, it behaves as the strongest anticipated bounce zone.
- Profile Value Area Exits: Use the outer limits of the polyline histogram to judge market extensions. If price stretches completely beyond the top or bottom boundaries of the pivot profile, it indicates highly overextended conditions, alerting you to tighten stop losses or secure open profits.
🔶 SETTINGS
- Pivot Left/Right Bars: Sets the lookback structural count required to verify a local swing high or swing low. Higher values isolate macro key levels, while lower values target scalping ranges.
- Calculation Lookback Window: Restricts profile tracking and line management to a strict historical window (e.g., last 600 bars), preserving processing speeds and focusing your data on recent market developments.
- ATR Proximity Multiplier: The minimum distance required between horizontal lines. Increase this multiplier to dramatically clean up your chart and leave only the most prominent structural boundaries.
- Number of Bins & Smoothing Radius: Controls the resolution of your polyline profile. Higher bins provide finer price accuracy, while a higher smoothing radius blends adjacent bins for a cleaner visual histogram.
🔶 CONCLUSION
The Pivot Support & Resistance Matrix [ChartPrime] indicator completely modernizes standard support and resistance trading. By combining price-filtered line tracking with a structural density profile, it allows traders to clearly see where major liquidity walls stand and precisely how much volume was required to break them down.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。