Liquidity Fracture [JOAT]Liquidity Fracture
Introduction
Liquidity Fracture is an open-source stop-hunt and liquidity sweep detection engine that identifies, classifies, and visualizes four distinct types of liquidity events in real time. The four types are: Swing Cluster Zones where retail stop orders accumulate, Wick Rejection Traps where engineered wick candles are designed to trigger stops, Sweep Events where price spikes through a level and recovers inside, and Volume Reversal Zones where institutional footprints appear as high-volume directional rejections.
The problem liquidity analysis solves is that the most reliable entry locations are not at obvious support and resistance levels — they are just beyond them, at the price points where the greatest concentration of stop-loss orders sit. When institutional order flow needs to fill large positions, it engineers moves into those stop clusters to provide the liquidity required. Liquidity Fracture maps those clusters, labels the sweep events when they occur, and records volume-backed reversal zones where the institutional absorption is visible in the data.
Core Concepts
1. Four Zone Types and Their Rationale
Each zone type targets a different category of liquidity event:
Swing Cluster Zones mark recent pivot highs and lows — the locations where the majority of retail stop-loss orders are placed. Price regularly engineers moves into these clusters to trigger stops before reversing. These zones are drawn as boxes above pivot highs (sell-side liquidity above) and below pivot lows (buy-side liquidity below).
Wick Rejection Traps identify candles where the wick-to-body ratio exceeds a configurable threshold. A candle with a dominant upper wick closing near its lows is an engineered candle designed to trigger buy stops above the high before rejecting. The wick ratio determines whether a candle qualifies as a trap:
wickUp = high - math.max(open, close)
bodySize = math.abs(close - open)
isWickTrap = wickUp / (high - low) > wickThreshold
Sweep Events capture the core liquidity hunt pattern: price wicks through a tracked zone level and closes back inside. The sweep label fires at the closing bar of the event with a styled label indicating the direction (SWEEP up or down).
Volume Reversal Zones identify bars where volume exceeds a configurable multiple of the 20-bar average volume, price reversal is confirmed by a close in the opposite half of the candle, and the move represents a statistically significant displacement. These are the bars where institutional absorption of the sweep is most likely visible.
2. Zone Distance and Deduplication
To prevent the chart from becoming cluttered with overlapping zones at the same price level, a minimum zone distance filter measured in ATR multiples prevents new zones from being drawn within that distance of an existing zone of the same type:
minDist = atr * minZoneDist
// New zone only drawn if > minDist from any existing zone
The maximum zones per type setting caps how many of each zone type can exist simultaneously. When the cap is reached, the oldest zone is automatically removed as new ones are added.
3. Heatmap Intensity
Each zone carries a heat intensity value based on how many times price has revisited it without sweeping through. Zones that price has respected multiple times increase in visual intensity — a darker, more opaque zone represents a higher-tested liquidity cluster that has proved significant. This provides immediate visual ranking of zone importance without requiring the trader to manually assess each zone.
4. Sweep Event Detection and Labeling
A sweep is detected when price penetrates a zone's boundary and closes back inside during the same bar. The sweep label appears directly at the sweep bar using styled labels (SWEEP) with directional styling — label pointing up for bullish sweep (price wicked below a low zone and closed above it), label pointing down for bearish sweep (price wicked above a high zone and closed below it):
bullSweep = low < zoneBottom and close > zoneBottom
bearSweep = high > zoneTop and close < zoneTop
5. Zone Type Labels
Each box drawn on the chart receives a text label in its upper corner identifying its zone type: SWING HI, SWING LO, WICK TRAP, or VOL REV. This allows traders to immediately understand what category of liquidity event they are looking at without needing to remember color assignments.
Features
Four liquidity zone types: Swing Cluster Zones, Wick Rejection Traps, Sweep Events, and Volume Reversal Zones — each independently togglable
Styled sweep labels: SWEEP labels with directional pointing arrows at the exact bar where the wick-and-close confirmation occurs
Zone type text labels: Every box labeled with its zone type (SWING HI, SWING LO, WICK TRAP, VOL REV) in the upper corner
Heatmap intensity: Zone color opacity increases with each price revisit, visually ranking zone significance
ATR-based zone distance filter: Minimum ATR distance between zones of the same type prevents overlapping or duplicate zones
Volume spike detection: Configurable volume multiplier threshold for Volume Reversal Zone qualification
Wick ratio threshold: Configurable wick-to-candle-range fraction for Wick Rejection Trap qualification
Maximum zones per type: Cap on simultaneous zones per category with automatic oldest-zone removal
Zone base transparency: Configurable transparency for all zone fills simultaneously
Institutional dashboard (top right): Sweep count, active zone counts by type, ATR, and volume ratio
Fully configurable colors: Each zone type has its own independent color input
Sweep alerts: Separate alertconditions for bullish and bearish sweep events
Input Parameters
Detection:
Swing Lookback: Left/right pivot bars for swing zone detection (default: 20)
Swing Threshold %: Minimum price move % for swing qualification (default: 2.0)
Volume Spike Multiplier: Multiple of average volume required for Volume Reversal Zone (default: 2.0)
Wick Ratio Threshold: Wick-to-range fraction for Wick Trap qualification (default: 0.6)
ATR Length: ATR period for buffer and distance calculations (default: 14)
ATR Buffer Multiplier: Zone size extension as ATR multiple (default: 0.5)
Max Zones Per Type: Maximum simultaneous zones of each type (default: 5)
Min Zone Distance (ATR): Minimum ATR distance between same-type zones (default: 2.0)
Display:
Individual zone type toggles: Swing Cluster Zones, Wick Rejection Traps, Sweep Events, Volume Reversal Zones
Heatmap Intensity toggle
Show Zone Labels toggle
Show Dashboard toggle
Zone Base Transparency: 30-92 (default: 75)
How to Use This Indicator
Step 1: Identify Active Liquidity Clusters
Swing Cluster Zones (red above, green below) mark where the nearest stop clusters sit. The most saturated (darkest) zones have been tested most frequently and represent the highest-concentration liquidity pools. These are the primary targets for engineered price moves.
Step 2: Watch for Wick Trap Formations
Wick Rejection Trap zones appear when a candle forms with a disproportionately large wick. These candles are the mechanism by which stops are triggered — the wick penetrates the stop cluster while the close retreats. A Wick Trap zone followed by a Sweep event on the same level is a high-probability combination.
Step 3: React to Sweep Labels
When a SWEEP label appears, a stop cluster has been penetrated and price has recovered inside in a single bar. This is the liquidity hunt completion pattern. A bullish sweep (below a low zone, close above) suggests buy-side liquidity was provided and a reversal is possible. Confirm with volume.
Step 4: Use Volume Reversal Zones as Confirmation
Volume Reversal Zones mark where institutional absorption is most likely visible. A sweep into a cluster followed by a Volume Reversal Zone on the recovery bar provides the highest-confidence combination this indicator can produce.
Step 5: Assess Zone Freshness
Freshly created zones (lighter color) have not been tested. Heavily revisited zones (darker) have withstood multiple price touches. Focus attention on the darkest zones — they represent the most significant concentration of resting orders.
Indicator Limitations
Swing zone detection uses pivot logic with a right-bar offset. Zones are confirmed several bars after the actual pivot, creating a slight lag in zone creation
The volume spike filter relies on exchange-reported volume. On synthetic instruments, indices, or assets with thin or unreliable volume reporting, Volume Reversal Zones will not be accurate
Zone distance filtering prevents duplicate zones, but in volatile, fast-moving markets, zones can form rapidly and crowd the chart before the maximum zone cap removes old ones
Sweep detection requires the close to recover inside the zone on the same bar as the wick penetration. Multi-bar sweeps (where recovery takes multiple bars) are not detected as sweep events — the level simply becomes the new zone boundary
This indicator identifies liquidity events. It does not provide directional entry signals or determine the probability that a reversal after a sweep will be sustained
Originality Statement
Liquidity Fracture is original in its simultaneous, unified detection and visualization of four distinct liquidity event types within a single indicator with a unified heatmap intensity system. This indicator is published because:
The classification of four independent liquidity event types (swing cluster, wick trap, sweep, volume reversal) — each with its own detection logic, independent toggle, and color — into a single, unified zone management system is uncommon in published open-source Pine Script
The heatmap intensity system that increases zone visual weight with each price revisit provides automatic, data-driven zone importance ranking without any manual assessment
The zone deduplication system using ATR-based minimum distance prevents the false signal accumulation that occurs in naive pivot-based zone indicators that draw every pivot regardless of proximity
The zone type labeling system (SWING HI, SWING LO, WICK TRAP, VOL REV) inside each box allows instant identification of event type without relying solely on color memory
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Liquidity zone detection and sweep signals are based on historical price and volume patterns. The identification of a sweep event does not guarantee a reversal, and zone levels can be violated without producing the expected reaction. Always use proper risk management. The author is not responsible for any trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Pine Script® indicator






















