OPEN-SOURCE SCRIPT
Fractal Liquidity Map [JOAT]

Fractal Liquidity Map [JOAT]
Introduction
The Fractal Liquidity Map renders the complete institutional liquidity landscape through six non-overlapping visual systems that each occupy their own visual lane: Williams Fractal markers, cluster support/resistance zones, equal highs/lows liquidity pool lines, sweep detection signals, multi-length pivot levels, and a Hann FIR trend ribbon. Every element is designed to coexist without visual clutter — cluster zones are thin dual-line bands, liquidity pools are dashed lines, sweeps are plotshape arrows that require no screen space accumulation.
The core problem this solves: most liquidity tools accumulate dozens of overlapping boxes that become unreadable over time. This indicator uses a clean-redraw architecture for zones — all drawing objects are deleted and recreated on each bar using only current price-level arrays, preventing any stacking, overlap, or ghost boxes from persisting.

Core Concepts
1. Williams Fractal Detection
A fractal high is a bar whose high is the highest in a configurable N-bar window on both sides; a fractal low is the lowest in the same window. Fractals are confirmed on bar close — the center bar's status is only registered after the right-side confirmation bars have closed:
Pine Script®
Fractal marks are rendered as small diamond shapes above and below the relevant bars, providing the foundational structural pivot map from which all other elements derive.
2. Cluster S/R Zones
When N or more fractals converge within a price band of 1x ATR, they are classified as a cluster zone — an area where price has pivoted multiple times, indicating persistent institutional interest. These are rendered as thin dual-line bands (solid top edge + dotted bottom edge) rather than filled boxes:
Pine Script®
Only the price levels are stored between bars (as float arrays). The drawing objects are fully recreated on last bar, guaranteeing zero accumulation or overlap regardless of how many bars the zone has existed.
3. Equal Highs/Lows Liquidity Pools
When two or more swing highs (or lows) within a lookback window fall within a tolerance band of each other (default 0.15x ATR), they form an Equal Highs (EQH) or Equal Lows (EQL) liquidity pool. These levels are targets for stop-hunt sweeps by institutional participants because retail stop orders cluster above EQH and below EQL:
Pine Script®
Pools render as thin dashed lines with compact EQH/EQL labels. Like cluster zones, they use the clean-redraw architecture — no boxes, no accumulation, no stacking.
4. Sweep Detection
A sweep occurs when price breaks through a known liquidity pool level (above EQH or below EQL) and then closes back inside the prior range — confirming a stop-hunt without follow-through:
Pine Script®
Sweeps are displayed as plotshape arrows (upward triangle below bar for bullish sweep, downward triangle above bar for bearish sweep). Because plotshape markers occupy zero screen real estate compared to boxes, sweeps cannot overlap or accumulate. An optional single-bar background flash draws attention to sweep bars.
5. Multi-Length Pivot Levels
Three configurable pivot lengths (default: 10, 30, 75 bars) generate independent sets of support and resistance levels. Each set uses its own resolution and color gradient encoding distance from current price — nearby levels are opaque, distant levels are transparent. Deduplication logic prevents levels from multiple pivot lengths from overlapping if they fall within ATR proximity.
6. Hann FIR Trend Ribbon
A three-layer Hann Window FIR filter ribbon provides directional bias in the background. The ribbon is fully described in the Adaptive Spectral Bands indicator. Here it serves as a trend filter — when the ribbon is bullish (fast layer above slow), resistance zones are more likely to hold; when bearish, support zones are the focus. Ribbon crossover events flash the background briefly.
Features
Input Parameters
Fractal Detection:
Cluster Zones:
Liquidity Pools:
Sweep Detection:
Multi-Length Pivots:
Trend Ribbon:
Colors:
How to Use This Indicator
Step 1: Build the Liquidity Map
Zoom out to a 1-4 hour timeframe and let the cluster zones and pool lines populate. These are your primary reference levels. The cluster zones (multiple fractal convergences) are the highest-confidence levels. Pool lines (equal highs/lows) are the stop-hunt targets.
Step 2: Watch for Sweeps
A sweep arrow above a pool line indicates a stop-hunt of sellers above EQH. A bullish sweep (price broke above EQH but closed back inside) is frequently a reversal signal — institutions cleared the sell-side liquidity and may now push price higher. The background flash marks exactly which bar this occurred on.
Step 3: Use the Ribbon for Direction
Trade cluster zone bounces only in the direction of the Hann ribbon. If the ribbon is bullish (green), focus on support cluster zones for long entries. Resistance zones in a bullish ribbon context are areas to manage position, not reverse.
Step 4: Stack with Multi-Pivot Levels
Where a multi-length pivot level aligns with a cluster zone, the confluence is significant. A 75-bar pivot and a cluster zone at the same price level is a major institutional reference that warrants tighter risk and larger position sizing consideration.
Originality Statement
This indicator is original in its integration of fractals, volume-derived cluster zones, equal highs/lows pools, sweep detection, and Hann FIR ribbon into a single zero-overlap visual system. Its publication is justified because:
Limitations
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Liquidity zones and sweep signals do not guarantee price direction. Always use proper risk management.
-Made with passion by jackofalltrades
Introduction
The Fractal Liquidity Map renders the complete institutional liquidity landscape through six non-overlapping visual systems that each occupy their own visual lane: Williams Fractal markers, cluster support/resistance zones, equal highs/lows liquidity pool lines, sweep detection signals, multi-length pivot levels, and a Hann FIR trend ribbon. Every element is designed to coexist without visual clutter — cluster zones are thin dual-line bands, liquidity pools are dashed lines, sweeps are plotshape arrows that require no screen space accumulation.
The core problem this solves: most liquidity tools accumulate dozens of overlapping boxes that become unreadable over time. This indicator uses a clean-redraw architecture for zones — all drawing objects are deleted and recreated on each bar using only current price-level arrays, preventing any stacking, overlap, or ghost boxes from persisting.
Core Concepts
1. Williams Fractal Detection
A fractal high is a bar whose high is the highest in a configurable N-bar window on both sides; a fractal low is the lowest in the same window. Fractals are confirmed on bar close — the center bar's status is only registered after the right-side confirmation bars have closed:
Fractal marks are rendered as small diamond shapes above and below the relevant bars, providing the foundational structural pivot map from which all other elements derive.
2. Cluster S/R Zones
When N or more fractals converge within a price band of 1x ATR, they are classified as a cluster zone — an area where price has pivoted multiple times, indicating persistent institutional interest. These are rendered as thin dual-line bands (solid top edge + dotted bottom edge) rather than filled boxes:
Only the price levels are stored between bars (as float arrays). The drawing objects are fully recreated on last bar, guaranteeing zero accumulation or overlap regardless of how many bars the zone has existed.
3. Equal Highs/Lows Liquidity Pools
When two or more swing highs (or lows) within a lookback window fall within a tolerance band of each other (default 0.15x ATR), they form an Equal Highs (EQH) or Equal Lows (EQL) liquidity pool. These levels are targets for stop-hunt sweeps by institutional participants because retail stop orders cluster above EQH and below EQL:
Pools render as thin dashed lines with compact EQH/EQL labels. Like cluster zones, they use the clean-redraw architecture — no boxes, no accumulation, no stacking.
4. Sweep Detection
A sweep occurs when price breaks through a known liquidity pool level (above EQH or below EQL) and then closes back inside the prior range — confirming a stop-hunt without follow-through:
Sweeps are displayed as plotshape arrows (upward triangle below bar for bullish sweep, downward triangle above bar for bearish sweep). Because plotshape markers occupy zero screen real estate compared to boxes, sweeps cannot overlap or accumulate. An optional single-bar background flash draws attention to sweep bars.
5. Multi-Length Pivot Levels
Three configurable pivot lengths (default: 10, 30, 75 bars) generate independent sets of support and resistance levels. Each set uses its own resolution and color gradient encoding distance from current price — nearby levels are opaque, distant levels are transparent. Deduplication logic prevents levels from multiple pivot lengths from overlapping if they fall within ATR proximity.
6. Hann FIR Trend Ribbon
A three-layer Hann Window FIR filter ribbon provides directional bias in the background. The ribbon is fully described in the Adaptive Spectral Bands indicator. Here it serves as a trend filter — when the ribbon is bullish (fast layer above slow), resistance zones are more likely to hold; when bearish, support zones are the focus. Ribbon crossover events flash the background briefly.
Features
- Williams Fractal Marks: Configurable lookback diamond markers at confirmed fractal highs and lows
- Cluster S/R Zones: Dual-line thin bands at price areas where multiple fractals converge, with full deduplication
- Liquidity Pool Lines: Dashed lines at equal highs/lows with EQH/EQL labels — no boxes, no stacking
- Sweep Detection: plotshape arrows at confirmed liquidity sweep bars plus optional background flash
- Multi-Length Pivots: Three independent pivot resolutions with distance-opacity gradient
- Hann FIR Ribbon: Three-layer trend ribbon with crossover signals and background flash
- Zero-Overlap Architecture: Clean-redraw system for all zone elements eliminates accumulated drawing object clutter
- Dashboard: Active cluster zones, active pool lines, sweep count, ribbon direction, and ATR value
- Alerts: Bullish sweep, bearish sweep, ribbon crossover bullish, ribbon crossover bearish
Input Parameters
Fractal Detection:
- Fractal Length: Lookback bars on each side for fractal confirmation (default: 5). Larger = fewer, more significant fractals.
- Show Fractal Marks: Toggle diamond marker rendering (default: on)
Cluster Zones:
- Min Fractals for Cluster: Minimum fractal count within ATR band to qualify as a cluster (default: 3)
- Max Cluster Zones: Maximum simultaneous cluster zones rendered (default: 6)
- Show Cluster Zones: Toggle cluster zone rendering (default: on)
Liquidity Pools:
- Pool Tolerance (x ATR): Price proximity for equal high/low classification (default: 0.15)
- Pool Lookback (bars): Window for equal high/low detection (default: 50)
- Max Pool Lines: Maximum pool lines displayed (default: 8)
- Show Liquidity Pools: Toggle pool line rendering (default: on)
Sweep Detection:
- Show Sweep Signals: Toggle sweep arrows (default: on)
- Flash Background on Sweep: Single-bar background highlight on sweep bar (default: on)
Multi-Length Pivots:
- Pivot 1 / Length: First pivot resolution (default: enabled, 10 bars)
- Pivot 2 / Length: Second pivot resolution (default: enabled, 30 bars)
- Pivot 3 / Length: Third pivot resolution (default: enabled, 75 bars)
Trend Ribbon:
- Show Hann Ribbon: Toggle ribbon visibility (default: on)
- Ribbon Length: Base FIR filter length (default: 20)
- Ribbon Spacing: Gap between ribbon layers (default: 8)
Colors:
- Resistance / Support / Pool / Sweep: Independent color selection for each element type
How to Use This Indicator
Step 1: Build the Liquidity Map
Zoom out to a 1-4 hour timeframe and let the cluster zones and pool lines populate. These are your primary reference levels. The cluster zones (multiple fractal convergences) are the highest-confidence levels. Pool lines (equal highs/lows) are the stop-hunt targets.
Step 2: Watch for Sweeps
A sweep arrow above a pool line indicates a stop-hunt of sellers above EQH. A bullish sweep (price broke above EQH but closed back inside) is frequently a reversal signal — institutions cleared the sell-side liquidity and may now push price higher. The background flash marks exactly which bar this occurred on.
Step 3: Use the Ribbon for Direction
Trade cluster zone bounces only in the direction of the Hann ribbon. If the ribbon is bullish (green), focus on support cluster zones for long entries. Resistance zones in a bullish ribbon context are areas to manage position, not reverse.
Step 4: Stack with Multi-Pivot Levels
Where a multi-length pivot level aligns with a cluster zone, the confluence is significant. A 75-bar pivot and a cluster zone at the same price level is a major institutional reference that warrants tighter risk and larger position sizing consideration.
Originality Statement
This indicator is original in its integration of fractals, volume-derived cluster zones, equal highs/lows pools, sweep detection, and Hann FIR ribbon into a single zero-overlap visual system. Its publication is justified because:
- The clean-redraw architecture (storing only price levels in arrays, recreating all drawing objects on last bar) is a fundamental departure from the standard approach of accumulating box arrays — it solves the overlap and clutter problem at the architectural level, not with cosmetic band-aids
- Cluster zones derived from fractal convergence within ATR tolerance provide an objective, quantitative method for identifying price areas with multiple structural pivots — avoiding the subjectivity of manual zone drawing
- Sweep detection using pool levels as reference (not arbitrary lookback highs/lows) creates a directional signal directly tied to the liquidity context in which the sweep occurred
- All six visual layers are designed for simultaneous display without interference — fractal marks at bar tops/bottoms, cluster zones as thin lines, pool lines as dashed lines, sweeps as arrows, ribbon below price, pivots as semi-transparent overlays
Limitations
- The clean-redraw system recreates all line objects on every bar close (barstate.islast). On charts with very long history, this processes large arrays. Performance degrades gracefully but is slower than static object creation.
- Fractal confirmation requires N bars on each side, meaning fractals always lag behind current price by the fractal length. Fresh structural pivots will not appear until confirmed.
- Equal highs/lows detection uses ATR-relative tolerance. On instruments with irregular volatility (news events, halts), temporary ATR spikes may cause pools to merge or split unexpectedly.
- Ribbon direction is a trend approximation, not a prediction. Sweep signals against the ribbon trend should be weighted less than those in the ribbon direction.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Liquidity zones and sweep signals do not guarantee price direction. Always use proper risk management.
-Made with passion by jackofalltrades
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
The Institutional Grade Trading Ecosystem, Built to win trades 📈
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
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.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
The Institutional Grade Trading Ecosystem, Built to win trades 📈
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
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.