OPEN-SOURCE SCRIPT
Liquidity Clusters Magnitude [LuxAlgo]

The Liquidity Clusters Magnitude indicator quantifies the intensity of dynamic support and resistance zones by counting the number of candle wick "touches" at the most inclusive liquidity levels within a rolling window. This enhanced version includes smoothing, a trend-following metric, and a real-time dashboard to provide a comprehensive view of historical rejection density.
🔶 USAGE
The indicator plots three primary metrics on a centered oscillator to represent liquidity dynamics:
Traders can identify significant liquidity events when the magnitude metrics spike beyond the Magnitude Threshold. These events are highlighted by Signal Dots on the oscillator lines. A real-time Dashboard provides a summary of current magnitudes and the overall "Trend State."
The vertical gradient fills provide a clear "heat map" effect, where the intensity of the color represents the density of the liquidity cluster, fading out as values approach the zero line.
🔶 DETAILS
The script uses mathematical constraints to ensure the identified levels represent true historical "clusters":
🔹 Body-Crossing Constraint
Liquidity levels are strictly constrained to remain outside the highest and lowest candle bodies within the window. This ensures they represent price points reached but not sustained by a close, focusing purely on wick-based rejection.
🔹 Smoothing & Thresholds
To filter out noise, the magnitude metrics are smoothed using a moving average. Threshold lines are included to define what constitutes a "significant" cluster, preventing false signals from minor wick touches and providing clear breakout points for liquidity expansion.
🔹 Trend Analysis
By calculating the difference between bullish and bearish magnitudes, the Trend Metric captures the shift in liquidity focus. This helps traders spot reversals or continuations before they manifest as large price moves by showing which side of the range is seeing more frequent rejection.
🔶 SETTINGS
🔶 USAGE
The indicator plots three primary metrics on a centered oscillator to represent liquidity dynamics:
- Bullish Magnitude (Green): Represents the concentration of lower wicks touching the support cluster level. A higher value indicates strong buying pressure or rejection at that level.
- Bearish Magnitude (Red): Represents the concentration of upper wicks touching the resistance cluster level. A higher negative value indicates strong selling pressure or rejection.
- Trend Metric (Blue): A composite line moving between the two areas, representing the net bias between bullish and bearish liquidity. It helps traders identify the prevailing "side" of the market's liquidity interest.
Traders can identify significant liquidity events when the magnitude metrics spike beyond the Magnitude Threshold. These events are highlighted by Signal Dots on the oscillator lines. A real-time Dashboard provides a summary of current magnitudes and the overall "Trend State."
The vertical gradient fills provide a clear "heat map" effect, where the intensity of the color represents the density of the liquidity cluster, fading out as values approach the zero line.
🔶 DETAILS
The script uses mathematical constraints to ensure the identified levels represent true historical "clusters":
🔹 Body-Crossing Constraint
Liquidity levels are strictly constrained to remain outside the highest and lowest candle bodies within the window. This ensures they represent price points reached but not sustained by a close, focusing purely on wick-based rejection.
🔹 Smoothing & Thresholds
To filter out noise, the magnitude metrics are smoothed using a moving average. Threshold lines are included to define what constitutes a "significant" cluster, preventing false signals from minor wick touches and providing clear breakout points for liquidity expansion.
🔹 Trend Analysis
By calculating the difference between bullish and bearish magnitudes, the Trend Metric captures the shift in liquidity focus. This helps traders spot reversals or continuations before they manifest as large price moves by showing which side of the range is seeing more frequent rejection.
🔶 SETTINGS
- Window Size: The lookback period for identifying clusters. Larger values identify major historical levels; smaller values focus on local liquidity.
- Smoothing: Controls the responsiveness of the oscillator lines.
- Magnitude Threshold: Sets the bar for identifying significant liquidity events and triggering signal dots.
- Visuals: Customize the colors for bullish, bearish, and trend metrics, as well as the visibility of signal dots.
- Dashboard: Enable/disable the status table and adjust its position and size.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
All content & scripts provided by LuxAlgo are for educational purposes only and are not financial advice.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
All content & scripts provided by LuxAlgo are for educational purposes only and are not financial advice.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。