OPEN-SOURCE SCRIPT

Multi-Pool Liquidity Confluence Scorer [MarkitTick]

8 798
💡 Multi-dimensional analytical tool designed to track, evaluate, and trade liquidity sweeps across various temporal market structures. Rather than relying on a single structural anomaly, this indicator aggregates data from macro levels, micro swing pivots, volume dynamics, and momentum shifts to generate high-probability market context. By evaluating price action against algorithmic thresholds and institutional reference points, it removes the subjectivity from liquidity-based trading methodologies.

✨ Originality and Utility

● A Paradigm Shift in Liquidity Analysis
Standard liquidity indicators merely draw static lines at historical highs and lows. The Multi-Pool Liquidity Confluence Scorer introduces a dynamic grading system that quantifies the quality of a sweep. This utility is entirely original in its approach to synthesizing structural components—such as Fair Value Gaps (FVGs), Relative Volume (RVOL), and time-of-day sessions—into a singular actionable metric.

● The Confluence Scoring Engine
What sets this tool apart is its objective scoring architecture. It does not just alert when a Previous Day High is breached; it evaluates how it was breached. Did the sweep occur during the high-liquidity London or New York sessions? Was it accompanied by a surge in relative volume? Did the subsequent price action leave behind institutional footprints like a Fair Value Gap? By assigning weighted points to these phenomena, the indicator filters out low-probability noise and isolates premium market reversals.

🔬 Methodology and Concepts

● Multi-Timeframe Liquidity Aggregation
The core methodology relies on establishing a matrix of vulnerability. The indicator maps out the Previous Daily Highs/Lows (PDH/PDL) and Previous Weekly Highs/Lows (PWH/PWL), alongside dynamic swing pivots. These act as magnetic pools of resting orders (stops and breakout entries).

● Sweep Detection and Tolerance
A true sweep is defined mechanically: price must pierce the liquidity level (wicking above/below) but fail to sustain that momentum, ultimately closing back inside the range. To account for market noise, the script utilizes an Average True Range (ATR) multiplier to create a "Cluster Range," allowing it to detect sweeps that marginally miss or slightly overshoot exact historical levels.

● Change in State of Delivery (CISD)
A sweep alone is insufficient. The indicator mandates a CISD confirmation within a user-defined window of bars. For a bullish setup, after a sell-side sweep, the price must break above a recent swing high, ideally with significant displacement (large body size or the creation of a bullish FVG). This confirms that the market-makers have actively repriced the asset after absorbing the liquidity pool.

🎨 Visual Guide

● Reference Lines and Levels
  • Orange Dashed Line: Represents the Previous Day High (PDH).
  • Blue Dashed Line: Represents the Previous Day Low (PDL).
  • Solid Orange/Red Line: Represents the Previous Week High (PWH).
  • Solid Cyan Line: Represents the Previous Week Low (PWL).
  • Gray Dotted Lines: Track the recent internal Swing Highs and Swing Lows based on the lookback memory.


● Sweep and Risk Visualization
  • Dashed Highlight Boxes: Appear immediately when a sweep is detected. The color dynamically shifts based on the preliminary score (Yellow for Basic, Orange for Good, Pink/Red for Premium).
  • Yellow Background Zones: Highlight the exact Fair Value Gaps (FVG) that validate the momentum shift during the CISD phase.
  • Solid Risk Boxes: Drawn upon signal confirmation, mapping the exact risk parameter from the entry price down to the stop loss.


● Interactive Data and Dashboards
  • Signal Labels: Print "BUY" or "SELL" along with the qualitative rating (BASIC, GOOD, PREMIUM) directly on the chart.
  • Data Block Text: A monospace text block prints next to the entry, detailing the exact Entry Price, Stop Loss, and all three Take Profit (TP) targets.
  • On-Screen Dashboard: A table anchored to the corner of the chart tracks the real-time status of all macro levels (Intact vs. Swept), active sweep statuses, current live score, session data, and the macro EMA trend alignment.


📖 How to Use

● Identifying High-Probability Reversals
Wait for the indicator to identify a sweep of a major level. Do not enter immediately. Observe the chart as the indicator waits for the CISD confirmation. A signal is only generated when the market structures break in the opposite direction of the sweep and the aggregated score meets your minimum threshold.

● Executing and Managing the Trade
Once a valid signal (Buy/Sell Label) prints, the indicator projects the exact entry parameters. You can choose to enter at the market close of the signal bar, or utilize the FVG Limit Entry feature to wait for a retracement into the newly formed imbalance. The drawn lines provide strict Risk-to-Reward targets (TP1, TP2, TP3) scaled against your Stop Loss.

● Predictive Zone Targeting
If the market is trending, use the "Predictive Target Zones" feature. The indicator looks ahead to un-swept liquidity pools above or below current price action, scores them based on their confluence, and draws projected boxes on the right side of the chart. These act as ideal locations for taking final profits or anticipating the next major market reaction.

⚙️ Inputs and Settings

● Liquidity Levels & Sweep Detection
  • Show Previous Day/Week H/L: Toggles the visibility of macro time-frame reference points.
  • Swing Detection Length: Adjusts the sensitivity of the pivot highs and lows. Lower numbers find more micro-structure, while higher numbers find major structural swings.
  • Cluster Range (ATR multiplier): Defines the spatial tolerance around a line. Price does not need to hit it to the exact tick; it must simply enter this ATR-defined boundary.
  • CISD Window: The maximum number of bars allowed after a sweep for the market to prove a reversal by breaking structure.


● Confluence Scoring Engine
  • Minimum Score to Generate Signal: The gatekeeper setting. Increase this number (e.g., to 7+) to only receive "Premium" setups, drastically filtering out noise at the expense of trade frequency.
  • Volume Bonus: Awards extra points if the sweep occurs on a volume spike exceeding the RVOL threshold.
  • Session Bonus: Awards points if the sweep aligns with the high-volume London or New York macroeconomic windows.


● Signal & Trade Mechanics
  • Target (R:R) Multipliers: Defines the exact risk-to-reward ratios for TP1, TP2, and TP3 based on the distance between the entry and the stop loss.
  • Enable Trend Filter (EMA): When activated, Buy signals are strictly ignored if price is below the macro EMA, and Sell signals are ignored if above, aligning setups with the broader directional bias.


🔍 Deconstruction of the Underlying Scientific and Academic Framework

● Market Microstructure and Liquidity Theory
The foundational logic of this script is anchored in the continuous double auction mechanism of modern financial markets. Large participants (institutional entities) cannot execute significant block orders without heavily impacting the price (slippage). To mitigate this, they must seek areas of high counter-party liquidity. In market microstructure theory, local extrema (such as previous day highs or visible swing lows) act as aggregation nodes for stop-loss orders. A stop-market order on a short position becomes a buy-market order when triggered. The indicator detects when these nodes are breached (the sweep) and identifies the immediate absorption of those orders.

● Volatility-Adjusted Spatial Grouping
Rather than utilizing fixed percentage bands or static tick offsets, the script employs the Average True Range (ATR) to establish dynamic clustering around reference points. The ATR is a measure of the decomposed variance of an asset's price over time. By multiplying the ATR by a fractional coefficient (inClusterPct), the script creates a mathematically sound confidence interval around historical levels. This adapts to heteroskedastic market conditions, ensuring that "near misses" in highly volatile environments are correctly categorized as liquidity tests.

● Mean-Reverting Volume Dynamics
The scoring engine utilizes a simple but effective statistical anomaly detection method for trading volume: Relative Volume (RVOL). By comparing the current bar's volume against a Simple Moving Average (SMA) of historical volume, it normalizes the data. When the volume deviates significantly from the mean during a sweep event (exceeding the inRvolThresh), it mathematically confirms anomalous participation. In academic finance, abnormal volume at price extremes is highly correlated with institutional capitulation or aggressive liquidity absorption, reinforcing the mean-reverting premise of the generated signals.

⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.