PROTECTED SOURCE SCRIPT
Aggiornato

Pivot-Anchored Liquidity Heatmap

458


**PLEASE READ: After adding indicator to chart, right click on indicator or click on "more"(3 dots to right of indicator name), hover over "pin to scale", and select "Pinned to right scale**

The indicator tries to show you where price has repeatedly reacted (pivoted) and treats those prices like liquidity shelves (places where lots of orders tend to sit).

It scans the last Calculated Bars and builds a price range it cares about, then splits that range into Bins (price slices). Every time price makes a local swing high or swing low, it drops that event into the nearest bin and adds weighted volume to that bin (bigger/more convincing rejections count more). Bins with enough activity become significant levels using one rule: % above the average bin (30% = more levels, 50% = default balance, 75% = only the biggest shelves). That same rule also controls alerts.

What you see on the chart:

* Profile bars (the little horizontal blocks) = strength at that price bin.
* Heatmap lines (horizontal lines extending left) = those same levels projected across time.
* Color: green-ish = support side (below price), red-ish = resistance side (above price). Stronger = more intense.
* Opacity + thickness: stronger levels look more solid and thicker; weaker levels are faint.
* POC (if on) = the single strongest bin (most activity) highlighted in white. Acts as a magnet. Especially important when it shifts above or below price.
* Bin text can show raw volume or notional ($ value approx = volume × price), or nothing.

Two “smart” behaviors (learning):

* Pressure Context: watches candle behavior (body size, volume vs average, CMF-like flow, volatility regime) to guess whether buying or selling pressure is dominant, then boosts levels that align with that pressure and dampens levels that fight it.
* Pulled Orders Simulation: if price gets close to a level and pressure suggests it won’t hold, the indicator temporarily shrinks that level (as if orders were pulled). If price backs off or pressure aligns again, it rebuilds.

Alerts:

* Fires when price touches a significant level (based on the same significance threshold), optionally only on bar close.

Simple Rules:

* Monitor the "POC". It is especially important to pay attention when it shifts above or below price as the level tends to act as a magnet.
* Treat bright/thick levels as decision zones, not exact lines: price often wicks through then reacts.
* If price is below a strong red level → expect resistance (pullbacks/rejections).
* If price is above a strong green level → expect support (bounces/holds).
* Best beginner play: wait for reaction + confirmation (bounce candle at support / rejection candle at resistance), not just a touch.
* If a level fades/shrinks as price approaches, that’s the tool hinting: this shelf may be getting “pulled” and could break; be cautious about blindly buying/selling the first touch.
Note di rilascio
1) One “significance” knob now controls everything important
-Before: “Significant levels” (what gets drawn) and “alert-worthy levels” (what triggers alerts) weren’t clearly tied together.
-Now: Significance: % above mean is the single source of truth for both:
--which levels get drawn as meaningful
--which levels can trigger the “touched a significant level” alert

2) Added a real profile engine (bins + bars + optional text)
-Before: You had window and layout inputs but not a complete bin/profile draw system.
-Now: It builds bins, accumulates volume into them, and draws:
--profile bars with size scaling (short → long) based on strength
--optional text per bin: Volume, Notional (Vol×Price), or None

3) Added heatmap bands that “grow” logically and stay consistent
-Before: No finished heatmap system.
-Now: Bands render with thickness based on:
--how strong the level is and
--ATR at the level’s “origin” (where the pivot first appeared), so it adapts to regime changes.

4) “Pressure context” (bull/bear) now influences color + opacity
-New feature: The script estimates market “pressure” using a mix of:
--candle move vs range, body ratio, relative volume, CMF-like flow, spread/vol regime, etc.
-That pressure then:
--tints levels more “bullish” or “bearish”
--boosts or dampens opacity/thickness when pressure aligns or fights the level

5) Added pulled-orders simulation (adaptive + learned)
-New feature: Levels can temporarily weaken when price gets close and pressure is against them, simulating liquidity getting pulled.
-It also rebuilds when price moves away or pressure aligns again.
-The “learning” part continuously adjusts:
--how close price must be to start pulling (ATR distance)
--how fast it pulls
--how fast it rebuilds
--the maximum pull cap
--all based on volatility/confidence/mitigation activity.

6) Added multi-symbol aggregation (A/B/C) with duplicate protection
-Before: Only chart volume existed.
-Now: Optional aggregation adds volume from up to 3 symbols and weights pressure context by their volume share.
-It prevents dumb double-counts (e.g., Symbol B = Symbol A, or same as chart).

7) Added “taken liquidity” markers (circles) that persist + fade
-New feature: When a level is mitigated (price breaks through it), it drops a circular marker:
--above price for taken resistance
--below price for taken support
-Markers:
--use a score threshold to reduce clutter
--scale visually with “remapped” scoring (so everything above threshold still looks meaningfully different)
--fade out over a set bar duration
--are capped so you don’t blow the label limit.

8) Pivot detection got smarter (quality weighting + merging)
-New behavior: Pivot “weight” isn’t just raw volume — it’s adjusted by:
--rejection size vs ATR
--true range characteristics
--candle direction bias
--Nearby duplicate pivots are merged into one level instead of stacking noise.

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.