OPEN-SOURCE SCRIPT

Liquidity Zones [ActiveQuants]

587
The Liquidity Zones indicator detects price areas where high trading volume coincides with below-average volatility, critical zones where large players often accumulate or distribute positions. Ideal for spotting potential reversal points and strategic liquidity pools.

Core Detection Formula
Liquidity Zone = (Volume > SMA(Volume, Length) × Multiplier) AND (Short-Term Volatility < 0.5 × Average Volatility)


Volume Surge Detection
  • Compares current volume to its SMA (user-defined length).
  • Multiplies threshold with "Volume Threshold Multiplier" parameter.


Volatility Contraction Filter
  • Calculates 5-bar volatility (standard deviation of closes).
  • Compares to average volatility over "Price Std. Dev. Length" period.
  • Requires short-term volatility < 50% of average.


KEY FEATURES

Merging Consecutive Zones
If the "Merge Consecutive Zones" option is enabled, the indicator will:
  • Calculate the number of consecutive bars that meet the liquidity zone criteria.
  • Sum the volume of these consecutive bars.
  • Display only the most recent label for the merged zone (previous labels in the sequence are removed).

Displays volume in either
  • Raw units ("Units").
  • Dollar-equivalent ("Currency Value") using closing price.

Alerts
  • An alert condition is built into the script. Traders can selectively enable alerts via TradingView’s alert system. Whenever a liquidity zone is detected, an alert is triggered with the message: "High-volume and low-volatility zone detected!".


USER INPUTS

- Liquidity Zones Color
  • Sets the background color for liquidity zones.
  • Default: Orange (with 70 transparency).

- Volume SMA Length
  • Determines the number of bars over which the volume simple moving average is calculated.
  • Default: 20 bars.

- Volume Threshold Multiplier
  • Multiplies the volume SMA to establish a threshold. A bar’s volume must exceed this product to be considered high volume.
  • Default: 2.0.

- Price Std. Dev. Length
  • The period used to calculate the standard deviation of the closing prices. This is the basis for measuring average volatility.
  • Default: 14 bars.

- Zone Volume
  • A toggle to display a label with the volume value on liquidity zones.
  • Allows you to choose how the volume is displayed: Units (shows raw volume) or Currency Value (multiplies volume by the current closing price).
  • Allows you to choose the font size of the volume label.

- Merge Consecutive Zones
  • When enabled, volumes from consecutive liquidity zones are summed into a single total, and only the most recent label is displayed (previous labels in the sequence are removed).
  • Default: Enabled.

- Show Last
  • Specifies the number of bars back that the indicator will evaluate and plot liquidity zones.
  • Default: 500 bars.

- Timeframe
  • Analysis period.
  • Default: Chart.


CONCLUSION

The Liquidity Zones indicator is a powerful tool for traders seeking to identify key areas on the chart where liquidity is concentrated, characterized by high volume and low volatility. With customizable settings for volume analysis and volatility measurement, this indicator can be integrated into a wide range of trading strategies. It not only highlights these zones visually but also provides volume data labels and alerts for timely decision-making.


IMPORTANT NOTES

Volume and Volatility Settings: Adjust the Volume SMA Length, Volume Threshold Multiplier, and Price Std. Dev. Length to suit the typical trading volume and volatility of the asset you are analyzing.

Confirmed Bars Only: Signals are generated only on confirmed bars. This minimizes false signals due to intra-bar noise and also prevents indicator repainting.

Risk Management: Liquidity zones may signal areas of potential accumulation or distribution, but they should be used in conjunction with other technical analysis tools (e.g., support/resistance levels, trendlines, or momentum indicators). Trading involves risk, and it is recommended to combine this indicator with proper risk management techniques.


RISK DISCLAIMER

Trading involves substantial risk of loss. Liquidity zones indicate potential interest areas but don't guarantee price reactions. Always confirm with additional analysis and proper risk management. Past performance is not indicative of future results.

📈 Happy trading! 🚀

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.