OPEN-SOURCE SCRIPT

Liquidity Heatmap [Eˣ]

292
Pine Script®
💧 Liquidity Heatmap - Free Indicator Overview The Liquidity Heatmap reveals where stop losses are clustered in the market - the hidden liquidity zones that smart money targets. This indicator automatically identifies Buy-Side Liquidity (BSL) above price and Sell-Side Liquidity (SSL) below price, showing you exactly where institutional traders are likely to hunt for stops before major moves. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎯 What This Indicator Does Identifies Liquidity Zones: • [color=red]Buy-Side Liquidity (BSL)[/color] - Stop losses from SHORT positions clustered above price • [color=green]Sell-Side Liquidity (SSL)[/color] - Stop losses from LONG positions clustered below price • Automatically clusters nearby levels into high-probability zones • Shows liquidity strength (1-5+) - higher numbers = more stops = bigger target • Removes swept liquidity in real-time as price takes out stops Visual Display: • 🔴 [color=red]Red Zones Above Price[/color] = Buy-Side Liquidity (shorts' stops) • 🟢 [color=green]Green Zones Below Price[/color] = Sell-Side Liquidity (longs' stops) • Thicker/Darker Zones = Higher liquidity concentration • BSL/SSL Labels = Show exact strength count • Triangle Markers = Liquidity sweep alerts (when price takes stops) Smart Features: • Auto-removes old liquidity (customizable lookback period) • Clusters nearby levels to reduce noise • Tracks liquidity strength and age • Updates in real-time as new swing points form • Alerts when major liquidity zones are swept ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📊 How To Use This Indicator Understanding Liquidity Concepts What is Liquidity? Liquidity refers to clusters of stop loss orders sitting in the market. These stops represent: • Long traders' stop losses (below support) = [color=green]Sell-Side Liquidity[/color] • Short traders' stop losses (above resistance) = [color=red]Buy-Side Liquidity[/color] Why Does This Matter? • Institutions NEED liquidity to fill large orders • Price often "sweeps" liquidity zones before reversing • Major liquidity = major target for smart money • Understanding liquidity = understanding market maker behavior The Liquidity Cycle: 1. Retail traders place stops at obvious levels (swing highs/lows) 2. Smart money identifies these clusters 3. Price is pushed to sweep the stops (liquidity grab) 4. Institutions fill their orders with this liquidity 5. Price reverses in the opposite direction ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💡 Trading Strategies Strategy 1: Liquidity Sweep Reversals Best For: Swing trading, catching reversals Timeframes: 15min, 1H, 4H, Daily Entry Setup: 1. Identify strong [color=green]Sell-Side Liquidity (SSL)[/color] zone below price 2. Wait for price to sweep down into the SSL zone 3. Look for rejection/reversal candle pattern (pin bar, engulfing) 4. Enter LONG after sweep and reversal confirmation 5. Stop loss: Below the swept liquidity zone 6. Target: Opposite liquidity zone or key resistance Why It Works: Smart money sweeps stops to fill buy orders, then pushes price higher Example: • SSL zone at $45,000 with strength 3 • Price drops to $44,950, sweeps the SSL • Strong bullish reversal candle forms • Enter long at $45,100 • Target: BSL zone at $47,000 Strategy 2: Liquidity-to-Liquidity Runs Best For: Day trading, scalping Timeframes: 5min, 15min, 1H Entry Setup: 1. Price sweeps [color=green]Sell-Side Liquidity[/color] below and reverses up 2. Identify [color=red]Buy-Side Liquidity[/color] zone above 3. Enter LONG targeting the BSL zone above 4. Exit near/at the BSL zone (don't wait for sweep) 5. Stop loss: Below recent swing low Why It Works: Price moves from liquidity pool to liquidity pool Variation - Reverse for Shorts: • BSL sweep above → Look for SSL zone below • Enter short targeting lower liquidity Strategy 3: Liquidity Avoidance (Stop Placement) Best For: Improving win rate on existing strategies Timeframes: All Rules: 1. NEVER place stops exactly at obvious liquidity zones 2. Place stops beyond the liquidity zone with buffer 3. Or place stops before the liquidity zone (tighter, riskier) 4. Monitor liquidity strength - avoid zones with strength 3+ Why It Works: Market makers hunt obvious stop clusters Example: • Trading long, swing low at $100 (SSL zone, strength 4) • Bad: Stop at $99.50 (will get swept) • Better: Stop at $98.50 (beyond the liquidity) • Alternative: Stop at $100.50 (tighter, before sweep zone) Strategy 4: Confluence Trading Best For: High probability setups Timeframes: 1H, 4H, Daily Entry Setup: 1. Find liquidity zone that aligns with: • Major support/resistance level • Fibonacci retracement (0.618, 0.786) • Trendline • Round psychological number ($50,000, $2,000, etc) 2. Wait for sweep of this high-confluence zone 3. Enter on reversal with multiple confirmations 4. Larger position size justified by confluence Why It Works: Multiple factors = institutional interest = higher probability ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ⚙️ Settings Explained Core Settings Swing Detection Length (Default: 10) • Number of bars left/right to identify swing highs and lows • Lower values (5-8): More sensitive, more liquidity zones, more noise • Higher values (12-20): Less sensitive, only major swings, cleaner chart • Recommended: 8-10 for intraday, 10-15 for swing trading Liquidity Lookback Bars (Default: 100) • How many historical bars to track liquidity zones • Lower values (50-75): Shows only recent liquidity • Higher values (100-200): Shows longer-term liquidity clusters • Zones older than this are automatically removed • Recommended: 100-150 for most timeframes Zone Proximity % (Default: 0.5) • Percentage threshold to group nearby levels into single zone • Lower values (0.2-0.4): Keeps levels separate, more zones • Higher values (0.6-1.0): Aggressive clustering, fewer zones • Recommended: 0.4-0.6 for crypto, 0.3-0.5 for forex, 0.5-0.8 for stocks Visualization Settings Show Buy-Side Liquidity • Toggle ON/OFF red zones above price • Turn OFF if only interested in downside liquidity Show Sell-Side Liquidity • Toggle ON/OFF green zones below price • Turn OFF if only interested in upside liquidity Show Liquidity Labels • Toggle BSL/SSL labels with strength numbers • Turn OFF for cleaner chart appearance • Keep ON to see exact liquidity strength Display Style • Boxes: Filled rectangular zones (best for visualizing strength) • Lines: Horizontal dashed lines (minimal, clean look) • Both: Boxes + Lines (maximum visibility) Color Intensity • Low: 85% transparency (subtle, less distracting) • Medium: 75% transparency (balanced visibility) • High: 65% transparency (bold, maximum visibility) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📱 Info Panel Guide Located in the top-right corner, the info panel provides real-time liquidity statistics: Buy-Side Zones • Count of active BSL zones above current price • Higher number = More upside targets for price Sell-Side Zones • Count of active SSL zones below current price • Higher number = More downside targets for price Total Zones • Combined count of all active liquidity • Useful for gauging overall market structure Nearest BSL • Distance in % to closest Buy-Side Liquidity above • Example: +2.5% means BSL is 2.5% above current price • Quick reference for next upside target Nearest SSL • Distance in % to closest Sell-Side Liquidity below • Example: -1.8% means SSL is 1.8% below current price • Quick reference for next downside target Liquidity Bias • ⬆️ [color=green]Bullish[/color]: More BSL than SSL (upside targets dominate) • ⬇️ [color=red]Bearish[/color]: More SSL than BSL (downside targets dominate) • ↔️ Balanced: Equal liquidity on both sides (range-bound) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 🎓 Understanding Liquidity Strength What Do The Numbers Mean? Strength 1: Single swing point • Light liquidity, minor target • Can be ignored in trending markets • Useful in ranging/choppy conditions Strength 2-3: Moderate liquidity cluster • Multiple nearby swing points merged • Decent target for intraday moves • Watch for potential sweeps Strength 4-5: Strong liquidity cluster • Major cluster of stops • High-probability target for institutions • Expect reactions when swept Strength 6+: Extreme liquidity pool • Massive stop cluster (rare) • Critical zone - high probability of sweep • Often marks major support/resistance • Ideal for confluence setups ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 📱 Alert Setup This indicator includes 2 powerful alert types: 1. Buy-Side Liquidity Sweep • Triggers when price sweeps BSL zone above • Shows potential bullish reversal opportunity • Often precedes upward continuation after sweep 2. Sell-Side Liquidity Sweep • Triggers when price sweeps SSL zone below • Shows potential bearish reversal opportunity • Often precedes downward continuation after sweep To Set Up Alerts: 1. Click the "Alert" button (clock icon) in TradingView 2. Condition: Select "Liquidity Heatmap" 3. Choose alert type: BSL Sweep or SSL Sweep 4. Configure notification method (push, email, webhook) 5. Click "Create" Pro Tip: Set alerts for both BSL and SSL sweeps to catch opportunities in both directions ━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 💎 Pro Tips & Best Practices ✅ DO: • Wait for confirmation - Don't enter immediately on sweep, wait for reversal pattern • Combine with trend - SSL sweeps in uptrends = higher probability longs • Check multiple timeframes - 1H liquidity + 4H liquidity = strongest zones • Monitor strength - Focus on zones with strength 3+ • Use proper risk management - Liquidity sweeps can go further than expected • Watch for re-sweeps - Sometimes liquidity zones get swept multiple times • Consider volume - High volume sweeps = stronger reversal potential ⚠️ DON'T: • Don't fade strong trends - In strong trends, sweeps often continue rather than reverse • Don't overtrade - Not every sweep is a tradeable setup • Don't ignore context - Check broader market conditions and news • Don't use alone - Combine with price action, support/resistance, and other analysis • Don't place stops at liquidity - Your stops will be hunted • Don't expect perfection

Aviso legal

As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.