OPEN-SOURCE SCRIPT
Updated Liquidity Grab & PRL Engine [erdensedat]

Liquidity Grab & PRL Engine [erdensedat]
Overview
The Liquidity Grab & PRL Engine is a highly advanced, institutional-grade market structure indicator designed to identify macro liquidity sweeps, track wick rejections, and pinpoint high-probability trend reversals. Instead of relying on lagging indicators, this engine reads raw price action and liquidity pools to catch the exact moment a trend is exhausted and ready to reverse.
It comes equipped with an automated trade setup generator (Entry, SL, and TP zones) and a built-in backtesting panel to track your daily and all-time win rates in real-time.
Core Concepts & How It Works
1. Macro Liquidity Pools
The algorithm constantly scans the chart for significant structural pivots (Macro Highs and Lows). Once a major pivot is identified, it draws an unmitigated "Macro Liq" (Orange dashed line) representing a structural liquidity pool. Retail traders often place their stop losses at these levels, making them a magnet for institutional price delivery.
2. Liquidity Grab Zone (The Trap)
When the price breaks a Macro Liquidity line, the indicator does not immediately signal a continuation. Instead, it marks the breakout candle as a "Liq Grab Zone". This assumes the breakout might be a fake-out designed to hunt stops (a sweep) before a reversal.
3. PRL (Possible Reversal Line) Tracking
This is where the magic happens. After a Liquidity Grab, the engine activates its dynamic wick-tracking system:
It anchors a tracking line to the absolute high/low of the grab candle.
As long as consecutive candles keep pushing the extreme (higher highs or lower lows), the slope line follows the price tightly.
The Reversal Signal: The moment a confirmed candle fails to break the previous extreme (a shorter wick), the tracking stops. A solid, horizontal PRL (Possible Reversal Line) is instantly born. This flat line indicates that the liquidity sweep is over, momentum has shifted, and a reversal is imminent.
4. Automated Trade Setups & Dynamic Fibo Engine
Once a PRL is confirmed, the engine automatically generates a full trade setup:
Entry Level: The exact price of the PRL formation.
TP 1 Zone: A semi-transparent target box dynamically calculated using hidden Fibonacci logic (0.618 to 0.764) based on the distance between the grab and the previous macro level.
Stop Loss (SL): A dynamic invalidation line calculated using an adjustable multiplier (default: -0.25) beyond the extreme wick.
Smart Display: Only the most recent setup is tracked dynamically across the chart. Past setups are frozen exactly where they hit TP, SL, or were invalidated by a new setup, leaving a clean historical footprint.
5. Pro Winrate & Performance Panel
The indicator acts as its own backtester. A sleek, non-intrusive UI panel tracks every executed setup in the background:
Live Status: Tells you if a trade is "Awaiting Setup", "Active", "TP Hit", or "SL Hit".
Daily Stats: Tracks today's closed trades, Win/Loss ratio, and total R-R flow (Risk-to-Reward accumulation).
All-Time Stats: Calculates the overall Win Rate of the strategy, automatically changing color (Green/Red) based on profitability.
6. MA Trend Filter (Optional)
For traders who prefer trading with the higher timeframe trend, there is an optional Moving Average filter (default: 200 EMA). When enabled, the engine will only validate Long setups if the price is above the MA, and Short setups if the price is below the MA, drastically increasing the quality of the signals.
How to Use It
Wait for the price to sweep a Macro Liq line and print a Liq Grab Zone.
Watch the dashed tracking line follow the wicks.
Wait for the solid PRL line to form (Confirmed Reversal).
Execute the trade at the Entry Level, place your stop at the SL Line, and target the TP Zone.
Disclaimer
This indicator is for educational and informational purposes only. Trading in financial markets involves a high degree of risk and may not be suitable for all investors. The automated setups and win rates displayed by this tool are based on historical price action and mechanical algorithms; they do not guarantee future results. Always perform your own analysis, practice strict risk management, and never trade with money you cannot afford to lose. The author (erdensedat) assumes no responsibility for any trading losses incurred while using this script.
Overview
The Liquidity Grab & PRL Engine is a highly advanced, institutional-grade market structure indicator designed to identify macro liquidity sweeps, track wick rejections, and pinpoint high-probability trend reversals. Instead of relying on lagging indicators, this engine reads raw price action and liquidity pools to catch the exact moment a trend is exhausted and ready to reverse.
It comes equipped with an automated trade setup generator (Entry, SL, and TP zones) and a built-in backtesting panel to track your daily and all-time win rates in real-time.
Core Concepts & How It Works
1. Macro Liquidity Pools
The algorithm constantly scans the chart for significant structural pivots (Macro Highs and Lows). Once a major pivot is identified, it draws an unmitigated "Macro Liq" (Orange dashed line) representing a structural liquidity pool. Retail traders often place their stop losses at these levels, making them a magnet for institutional price delivery.
2. Liquidity Grab Zone (The Trap)
When the price breaks a Macro Liquidity line, the indicator does not immediately signal a continuation. Instead, it marks the breakout candle as a "Liq Grab Zone". This assumes the breakout might be a fake-out designed to hunt stops (a sweep) before a reversal.
3. PRL (Possible Reversal Line) Tracking
This is where the magic happens. After a Liquidity Grab, the engine activates its dynamic wick-tracking system:
It anchors a tracking line to the absolute high/low of the grab candle.
As long as consecutive candles keep pushing the extreme (higher highs or lower lows), the slope line follows the price tightly.
The Reversal Signal: The moment a confirmed candle fails to break the previous extreme (a shorter wick), the tracking stops. A solid, horizontal PRL (Possible Reversal Line) is instantly born. This flat line indicates that the liquidity sweep is over, momentum has shifted, and a reversal is imminent.
4. Automated Trade Setups & Dynamic Fibo Engine
Once a PRL is confirmed, the engine automatically generates a full trade setup:
Entry Level: The exact price of the PRL formation.
TP 1 Zone: A semi-transparent target box dynamically calculated using hidden Fibonacci logic (0.618 to 0.764) based on the distance between the grab and the previous macro level.
Stop Loss (SL): A dynamic invalidation line calculated using an adjustable multiplier (default: -0.25) beyond the extreme wick.
Smart Display: Only the most recent setup is tracked dynamically across the chart. Past setups are frozen exactly where they hit TP, SL, or were invalidated by a new setup, leaving a clean historical footprint.
5. Pro Winrate & Performance Panel
The indicator acts as its own backtester. A sleek, non-intrusive UI panel tracks every executed setup in the background:
Live Status: Tells you if a trade is "Awaiting Setup", "Active", "TP Hit", or "SL Hit".
Daily Stats: Tracks today's closed trades, Win/Loss ratio, and total R-R flow (Risk-to-Reward accumulation).
All-Time Stats: Calculates the overall Win Rate of the strategy, automatically changing color (Green/Red) based on profitability.
6. MA Trend Filter (Optional)
For traders who prefer trading with the higher timeframe trend, there is an optional Moving Average filter (default: 200 EMA). When enabled, the engine will only validate Long setups if the price is above the MA, and Short setups if the price is below the MA, drastically increasing the quality of the signals.
How to Use It
Wait for the price to sweep a Macro Liq line and print a Liq Grab Zone.
Watch the dashed tracking line follow the wicks.
Wait for the solid PRL line to form (Confirmed Reversal).
Execute the trade at the Entry Level, place your stop at the SL Line, and target the TP Zone.
Disclaimer
This indicator is for educational and informational purposes only. Trading in financial markets involves a high degree of risk and may not be suitable for all investors. The automated setups and win rates displayed by this tool are based on historical price action and mechanical algorithms; they do not guarantee future results. Always perform your own analysis, practice strict risk management, and never trade with money you cannot afford to lose. The author (erdensedat) assumes no responsibility for any trading losses incurred while using this script.
Release Notes
Added new alert conditions for Liquidity Grab Zones.Details:
Added alertcondition and dynamic alert() support for both Bullish and Bearish Liquidity Grab Zone formations.
Users can now set up alerts to be notified exactly when a liquidity grab zone is formed, even before the PRL (Possible Reversal Line) is officially confirmed.
Release Notes
Update: HTF Engine, Advanced Panel Stats & Persistent TradesWhat's New:
HTF (Higher Timeframe) Mode: Added a brand new, optional HTF module in the settings. When enabled, the system uses the High/Low of the previous Higher Timeframe bar (e.g., 4H, Daily) as Liquidity Targets instead of standard Macro Pivots.
Persistent Trade Engine: Removed time-based trade expirations. Active setups now persist and remain valid until they hit Take Profit (TP), Stop Loss (SL), or until a completely new setup is formed in the opposite/same direction. This ensures trades that take longer to play out are accurately tracked.
Weekly Panel Statistics: Upgraded the Winrate Panel to include "Weekly Stats". It now tracks This Week's Closed Trades (W/L) and This Week's Net RR Flow (automatically resetting every Monday).
Liquidity Grab Alerts: Added early-warning alertcondition and alert() support for Bullish and Bearish Liquidity Grab Zones. You can now get notified exactly when a liquidity grab occurs, even before the PRL setup is confirmed.
Release Notes
Update: Engine Stabilization, Wick Filter & Optional Advanced FiltersIn this update, we optimized the core engine for maximum stability and introduced a powerful suite of customizable filters for advanced users.
What's New & Improved:
Wick Filter (Default ON): We introduced a strict wick requirement for the Liquidity Grab candle. If a candle breaks a macro/session liquidity level with a full body (lacking a significant wick), the system recognizes it as a true breakout rather than a sweep, and no setup is formed. This significantly reduces false signals.
Stable Core Engine: Reverted experimental trailing mechanics to guarantee that the original, highly stable 0.25 SL / Fibonacci TP target engine works flawlessly without any disruption.
Advanced Filters Suite (Default OFF): Added a massive suite of optional filters for users to fine-tune their strategy. You can now enable: ADX Trend Filter (blocks counter-trend setups in hardcore trends), RSI Momentum Filter, Volume Filter, Choppiness Filter, and Price Action (PA) Filter.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.