Liquidity Sweep Map [GBB]

Everybody knows where the stops are. Above the old high, under the equal lows, around yesterday's range. The problem is that a real chart has thirty of those levels, they don't all matter the same, and by the time you've drawn them by hand the session is half over.
So this script does the drawing and the ranking for you. It tracks where resting orders plausibly sit, paints those levels as a heat map (more liquidity = hotter), and marks the exact bar where one of them gets taken and price closes back inside.
WHERE THE LIQUIDITY IS ASSUMED TO BE
Pools come from:
- swing highs and lows (pivot 5 left / 3 right by default)
- equal highs and lows. Two swings within 0.1 ATR of each other and within 100 bars get merged into one pool, and every further swing at the same price adds to it. "EQH x3" means three swings stacked there.
- previous day and previous week high/low
- Asia and London session high/low (New York and an opening range are in there too, off by default)
Not every level is worth the same. Each type has a base weight (week 2.0, day 1.8, equal 1.6, session 1.4, OR 1.2, swing 1.0, all adjustable). Every extra touch that doesn't go through adds 0.25, capped at double. Swing and equal levels fade with a 200 bar half-life, because a swing high from three weeks ago that nobody has looked at since isn't a magnet anymore. Day, week and session levels keep full heat until the next period replaces them.
WHAT COUNTS AS A SWEEP
Evaluated on bar close only:
- the wick has to go through the level by at least 2 ticks or 0.02 ATR, whichever is bigger. Less than that is a touch, and touches add heat.
- close back on the original side = sweep
- close beyond the level = break
- a wick deeper than 1.5 ATR counts as a break even if it closes back. That's not a stop run anymore, that's a move.
- optional: allow a delayed reclaim within 3 bars
When several levels go on the same bar, the heaviest one gets the name and the rest are listed in the tooltip.
WHAT YOU SEE
- Heat bands. Levels closer than 0.15 ATR are merged into one band. Only the 6 strongest bands per side within 6 ATR of price get drawn, so the chart doesn't turn into a barcode. The label shows the strongest level in the band, how many others are merged into it (+2) and the price. Hover it and you get the full list with heat and touch counts.
- Depth ladder at the right edge. Bar length = heat. You can read the whole book at a glance without looking at a single number.
- The latest sweep gets the spotlight: a box on the wick and a callout like "Swept PDH". When the next one prints, the old one fades to a small ✕. Dashed ghost lines show where taken levels were. Last 12 sweeps are kept.
- Heat scale: Relative (the hottest band on screen is always full heat, like a liquidation heatmap) or Fixed (a colour means the same weight on every chart).
- Six palettes. Ember is the default. Light chart users, I didn't forget you, the colours adjust.
SWEEP → INVERSE FVG → TARGET
This part came from a community request. After a sweep and reclaim, the script looks for a fair value gap in the leg that ran into the level (formed within 5 bars before the sweep). If price closes back through that gap within 10 bars, the inversion is confirmed and the target becomes the nearest untouched pool on the other side.
The chain dies if price trades beyond the sweep extreme plus 0.1 ATR, if there was no gap to begin with, if the inversion doesn't come in time, or after 100 bars without reaching the target. By default it runs in the background for alerts only. Tick "draw on chart" if you want to see it.
ALERTS
All on bar close. Sweep & reclaim, break of a previous day/week level, inverse FVG confirmed, target reached. They're available as regular alert conditions, and if you set an alert on "Any alert() function call" you get messages with the level name and price in them.
SETTINGS YOU ACTUALLY NEED TO CHECK
The calendar. Default is New York time with the trading day starting at 18:00, which is right for CME futures. FX: 17. Crypto: UTC and 0. Get this wrong and your PDH/PDL are wrong, and then everything built on them is wrong too. Same for the session times.
REPAINTING
The engine only runs on confirmed bars, so sweep marks don't pop in and out intrabar. A swing only becomes a pool 3 bars after it prints (pivot right = 3), that's confirmation and there's no way around it. The heat map is redrawn on the last bar from what's active right now. Scroll back and you see today's map, not what it looked like last Tuesday. Taken levels stay visible as ghost lines.
So this script does the drawing and the ranking for you. It tracks where resting orders plausibly sit, paints those levels as a heat map (more liquidity = hotter), and marks the exact bar where one of them gets taken and price closes back inside.
WHERE THE LIQUIDITY IS ASSUMED TO BE
Pools come from:
- swing highs and lows (pivot 5 left / 3 right by default)
- equal highs and lows. Two swings within 0.1 ATR of each other and within 100 bars get merged into one pool, and every further swing at the same price adds to it. "EQH x3" means three swings stacked there.
- previous day and previous week high/low
- Asia and London session high/low (New York and an opening range are in there too, off by default)
Not every level is worth the same. Each type has a base weight (week 2.0, day 1.8, equal 1.6, session 1.4, OR 1.2, swing 1.0, all adjustable). Every extra touch that doesn't go through adds 0.25, capped at double. Swing and equal levels fade with a 200 bar half-life, because a swing high from three weeks ago that nobody has looked at since isn't a magnet anymore. Day, week and session levels keep full heat until the next period replaces them.
WHAT COUNTS AS A SWEEP
Evaluated on bar close only:
- the wick has to go through the level by at least 2 ticks or 0.02 ATR, whichever is bigger. Less than that is a touch, and touches add heat.
- close back on the original side = sweep
- close beyond the level = break
- a wick deeper than 1.5 ATR counts as a break even if it closes back. That's not a stop run anymore, that's a move.
- optional: allow a delayed reclaim within 3 bars
When several levels go on the same bar, the heaviest one gets the name and the rest are listed in the tooltip.
WHAT YOU SEE
- Heat bands. Levels closer than 0.15 ATR are merged into one band. Only the 6 strongest bands per side within 6 ATR of price get drawn, so the chart doesn't turn into a barcode. The label shows the strongest level in the band, how many others are merged into it (+2) and the price. Hover it and you get the full list with heat and touch counts.
- Depth ladder at the right edge. Bar length = heat. You can read the whole book at a glance without looking at a single number.
- The latest sweep gets the spotlight: a box on the wick and a callout like "Swept PDH". When the next one prints, the old one fades to a small ✕. Dashed ghost lines show where taken levels were. Last 12 sweeps are kept.
- Heat scale: Relative (the hottest band on screen is always full heat, like a liquidation heatmap) or Fixed (a colour means the same weight on every chart).
- Six palettes. Ember is the default. Light chart users, I didn't forget you, the colours adjust.
SWEEP → INVERSE FVG → TARGET
This part came from a community request. After a sweep and reclaim, the script looks for a fair value gap in the leg that ran into the level (formed within 5 bars before the sweep). If price closes back through that gap within 10 bars, the inversion is confirmed and the target becomes the nearest untouched pool on the other side.
The chain dies if price trades beyond the sweep extreme plus 0.1 ATR, if there was no gap to begin with, if the inversion doesn't come in time, or after 100 bars without reaching the target. By default it runs in the background for alerts only. Tick "draw on chart" if you want to see it.
ALERTS
All on bar close. Sweep & reclaim, break of a previous day/week level, inverse FVG confirmed, target reached. They're available as regular alert conditions, and if you set an alert on "Any alert() function call" you get messages with the level name and price in them.
SETTINGS YOU ACTUALLY NEED TO CHECK
The calendar. Default is New York time with the trading day starting at 18:00, which is right for CME futures. FX: 17. Crypto: UTC and 0. Get this wrong and your PDH/PDL are wrong, and then everything built on them is wrong too. Same for the session times.
REPAINTING
The engine only runs on confirmed bars, so sweep marks don't pop in and out intrabar. A swing only becomes a pool 3 bars after it prints (pivot right = 3), that's confirmation and there's no way around it. The heat map is redrawn on the last bar from what's active right now. Scroll back and you see today's map, not what it looked like last Tuesday. Taken levels stay visible as ghost lines.
The Good, the Bad and the Bitcoin — No hype, just data.
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
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.
The Good, the Bad and the Bitcoin — No hype, just data.
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
Free indicators & honest backtests: youtube.com/@TheGoodTheBadAndTheBitcoin
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.