Liquidity & Structure Toolkit [erdensedat] The Liquidity & Structure Toolkit is a comprehensive, all-in-one indicator designed for Smart Money Concepts (SMC), Volume Profile analysis, and overall market structure tracking. It aims to provide traders with a clear visual representation of liquidity zones, structural breaks, session balances, and high-volume nodes without cluttering the chart.
Below is a detailed breakdown of all the features, the math and logic behind the setups, the signal engine, and the alert systems included in this script.
1. Major Targets (Liquidity Pools - BSL/SSL)
The script identifies major structural high and low points that act as liquidity magnets (Buy Side Liquidity - BSL and Sell Side Liquidity - SSL).
Formula & Logic: It uses the ta.pivothigh() and ta.pivotlow() functions. A "Major Target" is confirmed only when the price forms a peak/valley with a user-defined Pivot Sensitivity (default is 10 bars on the left and right).
Visualization: When a major pivot is formed, a horizontal line and a label ("MAJOR BSL" or "MAJOR SSL") are drawn.
Sweep Mechanics: If the price crosses this level later, the level is considered "swept." The solid line turns into a dashed line with lower opacity, indicating that the liquidity has been taken. Swept levels are automatically removed after 24 hours to keep the chart clean.
2. Market Structure Breaks (BOS / CHoCH)
This module tracks internal and external structural shifts based on fractal highs and lows.
Logic: It calculates short-term pivots using a fractal length (default 5). When the price breaks above a recent pivot high, it's considered an upward break. When it breaks below a pivot low, it's a downward break.
BOS vs. CHoCH: The script intelligently labels the breaks based on the previous trend state. If the trend continues (e.g., up break followed by another up break), it labels it as BOS (Break of Structure). If the direction shifts (e.g., down break followed by an up break), it labels it as CHoCH (Change of Character).
Settings: You can choose whether a break requires a candle close beyond the level (Break = Close Beyond Level) or just a wick.
3. Initial Balance (IB) Box
The Initial Balance represents the price range established during the first specified minutes of a new trading session.
Setup: You define the Session Timeframe (e.g., Daily) and the IB Duration (e.g., the first 60 minutes).
Logic: The script tracks the highest high (IBH) and lowest low (IBL) during that initial window. Once the time window closes, the box extends to the right, serving as a dynamic support/resistance zone for the rest of the session.
Visualization: Highlights the IB High, IB Low, and IB Equilibrium (Midpoint) with clean labels and a customizable background box.
4. Volume Profile & POC Box (Point of Control)
A custom Volume Profile engine that calculates the highest volume node (POC) dynamically using lower timeframe data.
Lower Timeframe (LTF) Data: The script automatically fetches lower timeframe volume data (1m, 5m, 15m, or 60m depending on your chart's timeframe) to build an accurate profile inside a custom array matrix.
Rows/Bins: The session range is divided into horizontal bins (default 60). Volume is distributed among these bins based on where the LTF candles traded.
POC Engine Models:
Model 1 (Active POC): Displays the active, evolving POC of the current session as well as historical POCs from previous sessions. Uses a Hysteresis percentage (default 15%) to prevent the POC line from flickering rapidly; the new volume node must exceed the old POC by X% to shift the level.
Model 2 (Previous POC Focus): Instead of showing the actively changing current POC, it projects the finalized POC from the previous session starting from its original birth point, extending it across the current session as a heavy structural magnet.
Delta Lines: Inside the POC box, it plots the highest volume node and its immediate neighboring nodes (top, mid, bot) to show the thickness of the volume cluster.
5. Price Action & MSB Signal Engine
The script includes an automated signal engine that identifies highly probable reversal setups around the liquidity zones.
Price Action (PA) Signals: Triggered when the price "touches" or sweeps a Major BSL or SSL level, and subsequently prints a valid directional candle (e.g., sweeping SSL and printing a solid green candle that is not a Doji).
MSB (Market Structure Break) Signals: Triggered when the price sweeps a major liquidity level (BSL/SSL) and then creates a confirmed structural break (BOS/CHoCH) in the opposite direction.
Visualization: Triangle shapes are plotted above/below the signal candles (Green for Buy, Red for Sell).
6. Moving Averages & VWAP
For trend filtering and dynamic support/resistance, the toolkit includes optional traditional indicators:
VWAP: Session-based Volume Weighted Average Price.
Customizable MAs: Up to 5 moving averages can be toggled on/off. Supported types include SMA, EMA, WMA, HMA, and VWMA. Each can have its own length and color settings.
7. Alerts System
The indicator features a built-in alert system for the signal engine.
PA Signal Alert: Fires whenever a valid Price Action bounce occurs at a BSL/SSL level.
MSB Signal Alert: Fires whenever a structural reversal is confirmed after a liquidity sweep.
How to use: Create an alert in TradingView, select this indicator, and choose "Any alert() function call".
Disclaimer
This indicator is for educational and analytical purposes only. It does not constitute financial advice or a recommendation to buy or sell any asset. Past performance is not indicative of future results. Trading cryptocurrencies, forex, and stocks carries a high level of risk. Always perform your own backtesting, use proper risk management, and consult with a certified financial advisor before making any trading decisions.
Indicateur






















