OPEN-SOURCE SCRIPT

Liquidity Sweep Detector Pro

5 948
Liquidity Sweep Detector Pro with Smart Trade Setups

Overview

Liquidity Sweep Detector Pro with Smart Trade Setups is an advanced Pine Script® v6 indicator designed to identify one of the most important institutional price action concepts in modern financial markets: Liquidity Sweeps.

Instead of relying on traditional indicators that simply react to price movement, this indicator focuses on how liquidity is collected around swing highs and swing lows, how false breakouts occur, and where institutions may trigger stop-loss orders before reversing price.

The indicator automatically detects Buy-Side Liquidity, Sell-Side Liquidity, confirmed liquidity sweeps, and then generates a structured trade setup complete with Entry, Stop Loss, and Take Profit zones. Every sweep is evaluated using a proprietary scoring system that combines multiple market factors into a single confidence score.

The purpose of this indicator is not to predict the future, but to organize liquidity-based market behavior into a clear visual framework that helps traders identify high-quality reversal opportunities and potential institutional activity.

---

Why This Indicator Was Created

Most liquidity indicators only highlight swing highs and swing lows or draw simple liquidity lines. They often leave traders with the difficult task of manually deciding whether a sweep is genuine, whether the rejection is strong enough, and where a logical trade setup should be placed.

Liquidity Sweep Detector Pro was created to automate this entire workflow.

Instead of requiring multiple indicators, it combines liquidity detection, sweep confirmation, scoring, trend filtering, session filtering, dynamic trade setup generation, and live market statistics into a single comprehensive tool.

The objective is to simplify institutional liquidity analysis while keeping the chart clean, organized, and easy to interpret.

---

How the Indicator Works

The indicator continuously scans the chart for confirmed swing highs and swing lows.

These swing points become potential liquidity pools where market participants commonly place stop-loss orders.

Once a sufficient number of highs or lows cluster together, the indicator identifies them as:

• Buy-Side Liquidity
• Sell-Side Liquidity

These liquidity areas remain active until price interacts with them.

When price temporarily moves beyond one of these liquidity pools but quickly closes back inside the previous range, the indicator identifies this behavior as a Liquidity Sweep rather than a genuine breakout.

After confirmation, the sweep is analyzed using multiple filters before being displayed on the chart.

---

Buy-Side & Sell-Side Liquidity Detection

The indicator automatically marks important liquidity locations throughout the market.

Buy-Side Liquidity

Buy-Side Liquidity represents areas above previous highs where stop-loss orders from short positions and breakout buy orders commonly accumulate.

When price briefly trades above these highs but immediately returns back below them, the indicator identifies a Bearish Liquidity Sweep.

The chart labels these levels as:

Buy Side Liq

---

Sell-Side Liquidity

Sell-Side Liquidity represents areas below previous lows where stop-loss orders from long positions are typically concentrated.

When price temporarily trades below these lows before rapidly reversing back upward, the indicator identifies a Bullish Liquidity Sweep.

The chart labels these levels as:

Sell Side Liq

---

Liquidity Sweep Confirmation

A sweep is not confirmed simply because price trades beyond a previous high or low.

Several confirmation filters are applied before the signal becomes valid.

These include:

• ATR displacement confirmation
• Relative volume confirmation
• Market structure validation
• Candle rejection strength
• Liquidity cluster quality
• Session filtering
• Trend filtering (optional)

Only when these conditions align does the indicator generate a confirmed liquidity sweep.

This helps reduce false signals while focusing on stronger market reactions.

---

Smart Strength Score

Every detected sweep receives a proprietary Strength Score ranging from 0 to 100.

The score is calculated using multiple components including:

• Liquidity quality
• Number of liquidity touches
• ATR displacement
• Relative volume
• Rejection candle strength
• Market structure
• Age of the liquidity level

Higher scores indicate stronger technical confirmation.

The indicator also displays a star rating to provide an instant visual assessment of signal quality.

Example:

★★★★★ Elite

★★★★ Strong

★★★ Good

★★ Moderate

★ Weak

This allows traders to prioritize higher-confidence setups.

---

Automatic LONG & SHORT Trade Setups

One of the most unique features of this indicator is its ability to automatically generate a complete trade setup immediately after a confirmed liquidity sweep.

After a Bullish Liquidity Sweep

When the indicator detects that Sell-Side Liquidity has been swept, it automatically builds a LONG setup.

The setup includes:

• Entry Zone
• Stop Loss Zone
• Target Zone
• Risk-to-Reward calculation

---

After a Bearish Liquidity Sweep

When the indicator detects that Buy-Side Liquidity has been swept, it automatically builds a SHORT setup.

The setup includes:

• Entry Zone
• Stop Loss Zone
• Target Zone
• Risk-to-Reward calculation

This provides traders with a structured trade framework instead of only highlighting the sweep itself.

---

Automatic Risk Management Visualization

Each generated setup includes clearly displayed trading zones.

The indicator automatically draws:

• Green Target Zone
• Red Stop Loss Zone
• Entry Price
• Stop Loss Price
• Target Price

These zones remain visible on the chart, allowing traders to easily evaluate the trade structure and monitor price progression after the sweep.

---

Liquidity Zones

Following each confirmed sweep, the indicator creates a liquidity reaction zone.

These zones represent the area where institutional rejection occurred.

Users can configure how these zones behave after price revisits them.

Available options include:

• Extend
• Fade
• Delete

This provides flexibility depending on individual trading preferences.

---

Trend Filter

An optional trend filter helps align liquidity sweeps with the broader market direction.

Supported filters include:

• EMA 50
• EMA 200
• EMA 50 + EMA 200

When enabled, the indicator prioritizes sweeps that occur in alignment with the selected trend.

---

Session Filter

The indicator can restrict sweep detection to specific Forex trading sessions.

Supported sessions include:

• Sydney
• Tokyo
• London
• New York

Users can analyze liquidity behavior only during preferred institutional trading hours.

---

Dashboard

A real-time dashboard summarizes important market statistics, including:

• Bullish Sweeps Today
• Bearish Sweeps Today
• Strong Sweeps
• Weak Sweeps
• Average Strength Score
• Highest Score
• Current Market Trend
• Active Trading Session

This allows traders to quickly evaluate current market conditions without manually reviewing the entire chart.

---

Alerts

The indicator includes alert conditions for:

• Bullish Liquidity Sweep
• Bearish Liquidity Sweep
• Strong Sweep
• Elite Sweep
• Liquidity Zone Filled
• LONG Setup Created
• SHORT Setup Created
• Target Hit
• Stop Loss Hit

These alerts allow traders to monitor liquidity events without continuously watching the chart.

---

Works on Any Market

Although designed primarily for institutional Forex trading, the indicator also performs effectively on:

• Forex
• Gold
• Silver
• Indices
• Futures
• Commodities
• Cryptocurrency
• CFDs
• Stocks

Because liquidity exists in every actively traded market, the underlying methodology remains applicable across multiple asset classes.

---

Works on Any Timeframe

The indicator automatically adapts to every TradingView timeframe, including:

• 1 Minute
• 3 Minute
• 5 Minute
• 15 Minute
• 30 Minute
• 1 Hour
• 4 Hour
• Daily
• Weekly

Lower timeframes are generally more suitable for scalping and intraday liquidity analysis, while higher timeframes provide broader institutional market context.

---

Typical Trading Workflow

A common workflow using this indicator is:

1. Allow the indicator to identify Buy-Side and Sell-Side Liquidity.
2. Wait for a confirmed liquidity sweep.
3. Review the Strength Score and star rating.
4. Confirm the setup using your preferred market analysis.
5. Use the automatically generated LONG or SHORT setup as a structured trading framework.
6. Monitor the trade using the predefined Entry, Stop Loss, and Target zones.
7. Manage risk according to your personal trading plan.

---

Key Features

✔ Automatic Buy-Side Liquidity Detection

✔ Automatic Sell-Side Liquidity Detection

✔ Liquidity Sweep Confirmation

✔ Proprietary Strength Score (0–100)

✔ ATR Confirmation

✔ Relative Volume Confirmation

✔ Market Structure Confirmation

✔ Session Filter

✔ Trend Filter

✔ Automatic LONG Setup Generation

✔ Automatic SHORT Setup Generation

✔ Entry, Stop Loss & Target Visualization

✔ Dynamic Liquidity Zones

✔ Real-Time Dashboard

✔ Custom Alerts

✔ Fully Customizable Inputs

✔ Supports All Markets

✔ Compatible with All Timeframes

✔ Clean Institutional Chart Visualization

---

Important Note

This indicator is designed as a liquidity and market structure analysis tool. It does not guarantee profitable trades, predict future market direction, or provide financial advice. All automatically generated trade setups are based on predefined liquidity sweep conditions and should be used alongside your own technical analysis, market context, and disciplined risk management.

---

Originality & Author Verification

Liquidity Sweep Detector Pro with Smart Trade Setups is an original Pine Script® v6 implementation independently researched, designed, and developed by Forex_Market_Insights.

The complete concept, indicator architecture, liquidity workflow, visualization, scoring methodology, trade setup generation, dashboard design, user interface, confirmation logic, and overall implementation were created specifically for this project from first principles.

This script is not a clone, copy, conversion, or modification of any existing TradingView publication. While concepts such as liquidity, swing highs/lows, ATR, volume, market structure, and price action are widely known within technical analysis, the way they are combined, processed, scored, and presented in this indicator represents an original implementation developed by the author.

Author: Forex_Market_Insights
Pine Script® Version: v6
Implementation: Original
Concept & Design: Original
Algorithm: Original
Visualization: Original
Trading Workflow: Original
Developed by: Forex_Market_Insights

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.