Indicator · Pine Script v6 · On the chart

Dynamic Liquidity HeatMap Profile [BigBeluga]

by christonomous· code credited to BigBeluga

This indicator maps estimated dynamic liquidity levels across the chart by combining normalized volume and an ATR multiplier.

View on GitHub

GitHub stars1on the repository
Pine versionv6current
Lines of code190
Settings7inputs
LicenceNone statedfile: MPL-2.0
Last update11 months ago1 Dec 2025

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

190 lines of Pine Script v6 from scripts/Dynamic Liquidity HeatMap Profile [BigBeluga].pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

Dynamic Liquidity HeatMap Profile [BigBeluga].pine
// This Pine Script® code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © BigBeluga

//@version=6
indicator("Dynamic Liquidity HeatMap Profile [BigBeluga]", overlay = true, max_lines_count = 500, max_bars_back = 2000, max_boxes_count = 500)

// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
lookBack = input.int(300, "Calculated Bars")
displPf  = input.bool(true, "Profile", group = "Profile")
bins     = input.int(50, "Resolution", group = "Profile")
resolution = 100

color sellColor = input.color(color.blue, "Sell Liquidity")
color buyColor  = input.color(color.lime, "Buy  Liquidity")
bool  poc       = input.bool(true, "", inline = "maxp")
color maxColor  = input.color(color.orange, "Max Point Liquidity", inline = "maxp")


var boxes       = array.new<box>()
var labels      = array.new<label>()
var lines       = array.new<line>()

var volume_bins = array.new<float>(bins, 0.)
h_l         = array.new<float>()


type pivot 
    float value 
    int   index
    float volume_
    float vol
    bool isLower
    
var pivots = array.new<pivot>()


// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
h = ta.highest(2)
l = ta.lowest(2)

volumeArr = array.new_float(lookBack)

vol  = math.sum(volume, 10)

for i = 0 to lookBack-1
    volumeArr.set(i, vol[i])

nVol   = vol / volumeArr.max() * 100
atr    = ta.atr(5) / 50
offset = ta.highest(atr * nVol, lookBack)

for i = 0 to lookBack-1

    h_l.push(high[i]+offset[i])
    h_l.push(low[i]-offset[i])


if last_bar_index - bar_index < lookBack

    top = h_l.max()
    bot = h_l.min()


    step = (top-bot)/resolution

    level1 = high + atr * nVol
    level2 = low  - atr * nVol


    if h == high 
        for i = 0 to resolution - 1
            lower = bot + step * i
            mid   = lower + step/2

            if math.abs(level1 - mid) <= step
                pivots.push(pivot.new(mid, bar_index, nVol, vol, false))

    if l == low 
        for i = 0 to resolution - 1
            lower = bot + step * i
            mid   = lower + step/2

            if math.abs(level2 - mid) <= step
                pivots.push(pivot.new(mid  - atr * nVol, bar_index, nVol, vol, true))


    if pivots.size() > 0
        for p in pivots 

            y = p.value
            x = p.index
            isLow = p.isLower

            if isLow and low < y 
                pivots.remove(pivots.indexof(p))

            if not isLow and high > y 
                pivots.remove(pivots.indexof(p))
// }


// PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
if barstate.islast

    if lines.size() > 0
        for ln in lines 
            ln.delete()


    for b in boxes
        b.delete()
    boxes.clear()
    
    for lbl in labels
        lbl.delete()
    labels.clear()

    step = (h_l.max() - h_l.min()) / bins 
    

    for j = 0 to bins-1
        volume_bins.set(j, 0)
   
    if pivots.size() > 0
        for i = 0 to pivots.size() - 1
            lvl     = pivots.get(i)
            vol_    = lvl.vol
            line_y  = lvl.value
            
            for j = 0 to bins-1
                lower = h_l.min() + step * j
                mid   = lower + step/2
                upper = lower + step

                if math.abs(line_y-mid) < step
                    volume_bins.set(j, volume_bins.get(j) + vol_)

        for j = 0 to bins-1
            lower    = h_l.min() + step * j
            upper    = lower + step
            mid      = lower + step/2
            voll     = volume_bins.get(j)
            valueVol = voll / volume_bins.max() * 50
            col      = close > mid ? buyColor : sellColor
            m_col    = color.from_gradient(voll, volume_bins.min(), volume_bins.max(), color.new(col, 80), color.new(col, 0))
            m_col1   = color.from_gradient(voll, volume_bins.min(), volume_bins.max(), color.new(col, 50), color.new(col, 0))
            if not (close < upper and close > lower)

                if displPf and (valueVol != 0)

                    boxes.push(
                                     box.new(bar_index+20, upper, bar_index+20+int(valueVol), lower
                                     , bgcolor      = voll == volume_bins.max() and poc ? maxColor : m_col
                                     , border_color = chart.bg_color
                                     , text         = voll > volume_bins.avg() ? str.tostring(voll, format.volume) : ""
                                     , text_halign  = text.align_left)
                                     )
                    
                    boxes.push(
                                     box.new(bar_index+20, upper, bar_index+5, lower
                                     , text = str.tostring(valueVol*2, format.percent)
                                     , bgcolor = color(na)
                                     , border_color = color(na)
                                     , text_color = voll == volume_bins.max() ? maxColor : m_col1)
                                     )


                var start = 0
                isLower = close > mid

                for i = 0 to lookBack - 1
                    if isLower 
                        if low[i] < mid 
                            start := bar_index - i
                            break
                        if i == lookBack - 1
                            start := bar_index - i
                            break
                    else
                        if high[i] > mid 
                            start := bar_index - i
                            break
                        if i == lookBack - 1
                            start := bar_index - i
                            break

                color = voll == volume_bins.max() and poc ? maxColor : color.from_gradient(valueVol, 0, 50, color(na), isLower ? color.new(buyColor, 30) : color.new(sellColor, 30))

                lines.push(line.new(start+3, mid, bar_index+5, mid, width = int(valueVol/5), color = color))
// }

Overview

Dynamic Liquidity HeatMap Profile [BigBeluga] tracks highs and lows within a designated lookback window, projecting buy and sell liquidity bins and highlighting maximum liquidity levels akin to a point of control. Drawing directly on the main price chart, it generates a profile of unmitigated liquidity zones on the latest bar. Main settings allow customization of the lookback length, bin resolution, and color palettes for buy, sell, and peak liquidity.

Details

Published by

christonomous on GitHub

Code credit

BigBeluga, as written in the script's header

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Support & resistance, SMC / ICT / price action, Volume

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Calculated Barsint300lookBack
ProfilebooltruedisplPf
Resolutionint50bins
Sell Liquiditycolorcolor.bluesellColor
Buy Liquiditycolorcolor.limebuyColor
pocbooltruepoc
Max Point Liquiditycolorcolor.orangemaxColor
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

Moon Dev GEX Sweep & CVD

by moondevonyt
92 stars

The indicator detects liquidity sweeps across key price levels and calculates a cumulative volume delta proxy. It uses pivot high and low lookbacks to identify swing points, marking sweeps when price breaks beyond a level and quickly closes back inside. Featur

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 8 weeks ago · Custom licence GitHub repository of Moon Dev GEX Sweep & CVD

Calculates higher-timeframe volume profiles to identify Value Area High (VAH), Value Area Low (VAL), and Point of Control (POC) levels directly on the price chart. It flags potential reversal setups and Change in State of Delivery (CISD) patterns relative to v

Indicator v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of CandelaCharts - Value Area Reversals

Copilot

by milocaetano
48 stars

Copilot is an order flow range-reversal indicator designed to overlay trading setups directly on the price chart. It evaluates four criteria: market context (sideways vs trending regime based on ATR height), structure (double top or double bottom retests), abs

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated yesterday · MIT GitHub repository of Copilot

Supply and Demand Visible Range identifies supply, demand, and equilibrium zones across the visible chart range. It accumulates high, low, and volume data starting from the leftmost visible bar, optionally requesting lower timeframe intrabar data for finer res

Indicator v5 Support & resistanceVolume Repaints
Updated 2 months ago · AGPL-3.0 GitHub repository of Supply and Demand Visible Range [LuxAlgo]
13 stars

This script identifies and visualizes bullish and bearish order blocks on the price chart. It detects low-volatility consolidation ranges followed by breakout moves accompanied by high trading volume. Users can select between Simple, Relative, or Weighted volu

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of Advanced Order Blocks with Volume

This indicator identifies and visualizes key support and resistance heatmap zones directly on the price chart. Using closed one-hour price data, it evaluates multi-scale pivots, liquidity clusters, relative volume, and round-number resonances to score structur

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 7 weeks ago · MIT GitHub repository of 加密货币1小时关键价位热力图 V2

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers