OPEN-SOURCE SCRIPT
已更新 Liquidity Zone Indicator

Liquidity Zone Indicator
This PineScript indicator for TradingView identifies liquidity zones in the market where significant trading activity occurs, based on volume spikes and price levels. It highlights areas where large orders may be filled, useful for day traders and scalpers.
Features:
Detects bullish and bearish liquidity zones using a lookback period (default: 50 bars) and volume threshold (default: 1.5x average volume).
Displays zones as shaded boxes or diamond markers above/below bars, customizable by color.
Option to extend zones until price breaks through, with dynamic transparency for better visualization.
Includes an alert for when a liquidity zone is hit.
Settings:
Liquidity Lookback: Number of bars to analyze for high/low price levels.
Volume Threshold: Multiplier for detecting volume spikes.
Display as Zone: Toggle between zone boxes or markers.
Extend Zone: Keep zones active until price crosses them.
Zone Color: Customize the color of zones or markers.
Ideal for traders looking to spot potential reversal or breakout areas driven by liquidity.
This PineScript indicator for TradingView identifies liquidity zones in the market where significant trading activity occurs, based on volume spikes and price levels. It highlights areas where large orders may be filled, useful for day traders and scalpers.
Features:
Detects bullish and bearish liquidity zones using a lookback period (default: 50 bars) and volume threshold (default: 1.5x average volume).
Displays zones as shaded boxes or diamond markers above/below bars, customizable by color.
Option to extend zones until price breaks through, with dynamic transparency for better visualization.
Includes an alert for when a liquidity zone is hit.
Settings:
Liquidity Lookback: Number of bars to analyze for high/low price levels.
Volume Threshold: Multiplier for detecting volume spikes.
Display as Zone: Toggle between zone boxes or markers.
Extend Zone: Keep zones active until price crosses them.
Zone Color: Customize the color of zones or markers.
Ideal for traders looking to spot potential reversal or breakout areas driven by liquidity.
發行說明
Below is an updated description for the modified Liquidity Zone Indicator, including details about the new dual-color functionality and toggle. I've also added a revision history section at the bottom to document the changes.Liquidity Zone Indicator Description
The Liquidity Zone Indicator identifies and visualizes areas of significant liquidity in the market, defined as zones where price reaches extreme highs or lows within a specified lookback period, accompanied by a volume spike. These zones are drawn as boxes on the chart, with options to extend them until broken by price action. The indicator now supports dual-color mode, allowing topside (bullish) liquidity zones to be displayed in one color (default: green) and bottomside (bearish) zones in another (default: red), with a toggle to switch to a monochromatic mode using a single color. Markers (diamonds) can be plotted instead of zones for non-zone mode, and an alert condition is included to notify when a liquidity zone is breached.
Features:
Liquidity Detection: Identifies topside (bullish) and bottomside (bearish) liquidity zones based on price extremes (highest high or lowest low) within a user-defined lookback period and a volume threshold multiplier.
Zone Visualization: Draws boxes around liquidity zones, with customizable colors for bullish and bearish zones in dual-color mode or a single color in monochromatic mode.
Color Toggle: Allows switching between dual-color mode (separate colors for bullish and bearish zones) and monochromatic mode (single color for all zones).
Zone Extension: Option to extend zones indefinitely until price breaks through them or limit them to a fixed number of bars.
Non-Zone Mode: Plots diamond-shaped markers above or below bars for bullish or bearish liquidity events when zones are disabled, respecting the color mode.
Alert Condition: Triggers an alert when a liquidity zone is hit, useful for trading strategies.
Dynamic Zone Management: Updates zone appearance when price enters them and removes zones when price breaks out (based on close crossing the zone boundaries after a minimum duration).
Inputs:
Liquidity Lookback (default: 50): Number of bars to look back for calculating price extremes and average volume.
Liquidity Volume Threshold (default: 1.5): Volume multiplier to identify significant volume spikes (volume > SMA(volume) * threshold).
Liquidity as Zone (default: true): Toggle to draw zones (true) or plot markers (false).
Extend Zone (default: false): Toggle to extend zones until price breaks them (true) or limit to 50 bars (false).
Use Dual Colors (default: true): Toggle between dual-color mode (bullish/bearish colors) and monochromatic mode (single color).
Monochromatic Liquidity Zone Color (default: black): Color for all zones/markers in monochromatic mode.
Bullish Liquidity Zone Color (default: green): Color for topside (bullish) zones/markers in dual-color mode.
Bearish Liquidity Zone Color (default: red): Color for bottomside (bearish) zones/markers in dual-color mode.
How It Works:
Liquidity Calculation: Computes the average volume over the lookback period and identifies volume spikes. Detects bullish zones when the high exceeds the previous lookback's highest high with a volume spike, and bearish zones when the low falls below the previous lookback's lowest low with a volume spike.
Zone Creation: When a liquidity event occurs, a box is drawn from the bar’s high/low (or open/close for smaller ranges) with a semi-transparent background. The box uses the appropriate color based on the color mode (bullish/bearish or monochromatic).
Zone Updates: If price enters a zone on the next bar, the zone’s opacity increases. Zones are deleted if price closes beyond their boundaries (above for bullish, below for bearish) after at least three bars.
Non-Zone Mode: If zones are disabled, small diamond markers appear above (bullish) or below (bearish) the bar, colored according to the selected mode.
Alerts: An alert condition triggers when a liquidity zone is hit, allowing users to set up notifications in TradingView.
Usage:
Use the indicator to spot potential reversal or continuation zones where large orders may be filled.
Adjust the lookback and volume threshold to match the market and timeframe (e.g., shorter lookback for intraday, longer for daily charts).
Enable dual-color mode for clearer distinction between bullish and bearish liquidity zones, or use monochromatic mode for simplicity.
Set alerts to monitor when price interacts with liquidity zones for trading opportunities.
Revision History
Version 1.0 (Original): Initial release with monochromatic liquidity zones, zone extension, non-zone marker mode, and alert condition.
Version 1.1 (July 3, 2025): Added dual-color mode with separate colors for topside (bullish) and bottomside (bearish) liquidity zones (default: green and red). Introduced a toggle to switch between dual-color and monochromatic modes. Updated zone and marker plotting to respect the color mode. Maintained all existing functionality.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。