OPEN-SOURCE SCRIPT

Liquidity Heatmap & Sweep Radar

1 913
Liquidity Heatmap & Sweep Radar — see where the stops are, and when they get hunted

Price is drawn to liquidity — the pools of stop orders resting above old highs and below old lows. This tool maps those pools as a colour-graded heatmap and, when price wicks through one and closes back, marks the stop-hunt in real time.

── WHAT IT DRAWS ──
• Liquidity pools — clusters of swing highs (buy-side liquidity, above price) and swing lows (sell-side liquidity, below price). Swings that sit close together merge into one pool — that's exactly how equal highs / equal lows stack stops into a bigger, more attractive target.
• Heatmap intensity — the more times a level has been touched, and the higher the volume when it formed, the hotter and more opaque its band. Faint band = minor pool; solid band = a magnet.
• Sweep Radar — when price wicks past a pool and closes back inside (a stop-hunt), an × marks it and the drained pool is cleared. Pools that price simply closes through are removed as consumed (toggle).

── READING THE DASHBOARD ──
• Buy-side above — the price of the nearest liquidity pool above current price (the next upside target/magnet).
• Sell-side below — the price of the nearest pool below current price.
• Strongest pool — the price of the single strongest pool on the chart, with its strength score in parentheses (touches + a volume bonus).
• Active pools — how many buy-side (▲) and sell-side (▼) pools are currently live.
• Distance up — how far the nearest pool above sits, in percent.
• Distance down — how far the nearest pool below sits, in percent.

── HOW TO USE IT ──
• Targets: in a move, the nearest hot band above/below is the natural draw — a logical objective, or a place price reaches before deciding.
• Sweeps: a sweep (×) marks the moment liquidity was taken — price wicked through a pool and closed back. Treat it as CONTEXT, not a standalone trade trigger: on its own a sweep is not a reliable reversal signal (see the note below). It earns its weight only in confluence with structure — e.g. a sweep that coincides with a Change of Character, or one into a higher-timeframe supply/demand zone.
• Context: stack it under a market-structure tool — the heatmap tells you where the fuel sits and when it gets taken; your structure read tells you whether that leads to a reversal or a continuation.

── ON THE SWEEP SIGNAL (tested honestly) ──
Across the top coins on 1H–1D (out-of-sample), a raw sweep — by itself, with no other filter — showed NO reliable reversal edge: after a sweep, forward returns were a coin-flip with a slight tendency to CONTINUE, not reverse. That held at every horizon tested (1–20 bars) and even for exhaustion sweeps at trend extremes and strong multi-touch pools. So this tool deliberately does not sell the sweep as a reversal signal. Its job is to map where liquidity rests and flag when it is taken — powerful CONTEXT for a discretionary or structure-based method, not an automated buy/sell trigger.

── HONEST DISCLOSURE ──
TradingView does not expose an aggregated exchange-liquidation or order-book feed to scripts, so this is a STRUCTURE + VOLUME proxy for resting liquidity — built from swing clusters and formation volume, not real liquidation data. It shows where stops most plausibly sit, not a live order book. Treated that way, it is a powerful map; treated as literal liquidation data, it is not.

── NON-REPAINTING ──
Sweeps are confirmed on bar close (barstate.isconfirmed) — an × does not appear and then vanish. Pools are anchored to confirmed swing pivots; the bands extend to the right and update their intensity on the live edge.

── SETTINGS ──
Swing length, cluster tolerance (how close swings must be to merge), max pools per side, band thickness, sweep marking, remove-on-close-through, dashboard position/size, and the buy-side / sell-side colours — all adjustable.

Free and open-source (Mozilla Public License 2.0) — the full logic is on the Pine tab.

This tool is for research and education. It is not financial advice and does not guarantee profit. Test on your own markets and manage your own risk.

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.