Indicator · Pine Script v6 · On the chart

Liquidity Spectrum Visualizer [BigBeluga]

by theonetrade· code credited to BigBeluga

Liquidity Spectrum Visualizer overlays volume analytics and profile structures directly onto the price chart over a user-defined lookback window.

View on GitHub

GitHub stars34on the repository
Pine versionv6current
Lines of code124
Settings6inputs
LicenceMIT
Last update2 weeks ago8 Nov 2026

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

124 lines of Pine Script v6 from assets/indicator/bit-exact/liquidity_spectrum_visualizer_bigbeluga_tizR9Gzw.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

liquidity_spectrum_visualizer_bigbeluga_tizR9Gzw.pine
// This work is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International  
// https://creativecommons.org/licenses/by-nc-sa/4.0/
// © BigBeluga

//@version=6
indicator("Liquidity Spectrum Visualizer [BigBeluga]", overlay = true, max_boxes_count = 500, max_labels_count = 500)

// INPUTS ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
lookback = input.int(200, "LookBack")
vol_bubles = input.bool(true, "Display Volume Bubles")
volume_pr = input.bool(true, "Volume Profile")
liq_levels = input.bool(true, "Liquidity Levels")

col_up = input.color(#22b16c, "", inline = "colors")
col_dn = input.color(#dd7e2a, "", inline = "colors")

// }


// CALCULATIONS――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{
allow = last_bar_index - bar_index < lookback

display = allow ? display.all : display.none

n_vol = volume / ta.stdev(volume, 200)

size = n_vol >= 1 and n_vol < 2 ? size.small : n_vol >= 2 and n_vol < 3 ? size.normal : n_vol >= 3 and n_vol < 4 ? size.large : n_vol >= 4 ? size.huge : size.tiny

cond0 = n_vol < 1
cond1 = n_vol >= 1 and n_vol < 2
cond2 = n_vol >= 2 and n_vol < 3 
cond3 = n_vol >= 3 and n_vol < 4
cond4 = n_vol >= 4

offset = -lookback-(volume_pr ? 50 : 0)

if barstate.islast
    h_l = array.new<float>()

    for j = 0 to lookback - 1
        h_l.push(high[j])
        h_l.push(low[j])


    bins = array.new<float>(100)

    step = (h_l.max()-h_l.min()) / 100
    var boxes_bins = array.new<box>()
    var poc_lvls   = array.new<line>()

    for b in boxes_bins
        b.delete()

    for l in poc_lvls
        l.delete()

    boxes_bins.clear()
    poc_lvls.clear()

    for i = 0 to 100-1
        bins.set(i, 0)

    for i = 0 to bins.size()-1

        lower = h_l.min() + step * i 
        upper = lower + step 

        for j = 0 to lookback - 1

            if high[j] == h_l.max()
                label.new(bar_index-j, high[j], style = label.style_label_down, text = str.tostring(high[j]), color = col_dn)

            if low[j] == h_l.min()
                label.new(bar_index-j, low[j], style = label.style_label_up,  text = str.tostring(low[j]), color = col_up)

            c = close[j]

            if c >= lower-step and c <= upper+step
                bins.set(i, bins.get(i) + volume[j])

    for i = 0 to bins.size()-1

        lower = h_l.min() + step * i 
        upper = lower + step 
        val = int(bins.get(i)/bins.max() * 50)

   
        col_res_sup = close > math.avg(upper, lower) ? col_up : col_dn

        if volume_pr
        
            vp_col = color.from_gradient(val, 0, 50, color.new(col_res_sup, 90), col_res_sup)

            boxes_bins.push(box.new(bar_index+offset, upper, bar_index+val+offset, lower, bgcolor = vp_col, border_color = color(na)))

        if val > 25 and liq_levels
            
            color_pocs = color.from_gradient(val, 25, 50, color.new(col_res_sup, 90), col_res_sup)
            width = val < 35 ? 1 : val > 35 ? 2 : val > 45 ? 3 : 1
            poc_lvls.push(line.new(bar_index+offset, math.avg(upper, lower), bar_index+5, math.avg(upper, lower), color = color_pocs, width = width))


    box.delete(box.new(bar_index+offset, h_l.max(), bar_index+5, h_l.min(), color.new(chart.fg_color, 50), 1, bgcolor = na)[1])

// }


// PLOT ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――{

colorr = close > open ? col_up: col_dn
gradient_col = color.from_gradient(n_vol , 0, 5, color.new(colorr, 50), colorr)

display_vol = vol_bubles ? display.all : display.none
plotshape(allow and cond0 ? hlc3 : na, "", shape.circle, location.absolute, gradient_col, 0, "", na, size = size.tiny, show_last = lookback, force_overlay = true, editable = false, display = display_vol)
plotshape(allow and cond1 ? hlc3 : na, "", shape.circle, location.absolute, gradient_col, 0, "", na, size = size.small, show_last = lookback, force_overlay = true, editable = false, display = display_vol)
plotshape(allow and cond2 ? hlc3 : na, "", shape.circle, location.absolute, gradient_col, 0, "", na, size = size.normal, show_last = lookback, force_overlay = true, editable = false, display = display_vol)
plotshape(allow and cond3 ? hlc3 : na, "", shape.circle, location.absolute, gradient_col, 0, "", na, size = size.large, show_last = lookback, force_overlay = true, editable = false, display = display_vol)
plotshape(allow and cond4 ? hlc3 : na, "", shape.circle, location.absolute, gradient_col, 0, "", na, size = size.huge, show_last = lookback, force_overlay = true, editable = false, display = display_vol)

// Plot labels for significant volume levels
if cond4 and allow and vol_bubles
    label.new(bar_index , hlc3, str.tostring(volume, format.volume), xloc.bar_index, yloc.price ,
                 #00000000, label.style_label_center, chart.fg_color, force_overlay = true)
// }

Overview

Liquidity Spectrum Visualizer [BigBeluga] normalizes volume using standard deviation to scale display elements and constructs a 100-bin volume profile on the most recent bar. The indicator identifies significant high and low price pivots, highlights high-density volume profile nodes, and visualizes price-volume distribution using dynamic gradient color schemes.

Details

Published by

theonetrade on GitHub

Code credit

BigBeluga, as written in the script's header

Draws

On the price chart

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.

Topics

algorithmic-tradingbacktestingbitcoinccxtcrypto-tradingllm-agentoffline-backtestingopen-source-tradingpine-scriptpine-to-pythonpinescriptpynecorepythonquantquantitative-financestrategy-backtestingtechnical-analysistrading-indicatorstrading-strategiestradingview

Settings

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

SettingTypeDefaultVariable
LookBackint200lookback
Display Volume Bublesbooltruevol_bubles
Volume Profilebooltruevolume_pr
Liquidity Levelsbooltrueliq_levels
col_upcolor#22b16ccol_up
col_dncolor#dd7e2acol_dn
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

This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur

Indicator v5 VolumeSupport & resistance
Updated 8 days ago · MIT GitHub repository of Volume Profile and Indicator by DGT

MGIC-tracker

by Allen1212
302 stars

The MGIC-tracker is a TradingView indicator that overlays ARK Invest trade records onto stock price charts. It plots buy and sell labels at the exact timestamp of each transaction, showing share volume and ETF weight. Users select a specific ETF type via setti

Indicator v4 Support & resistanceVolume
Updated 3 years ago · None stated GitHub repository of MGIC-tracker
228 stars

Comprehensive Volume Profile is an overlay indicator that calculates and plots volume distribution across specified time ranges such as daily sessions, weekly, monthly, or custom bar lengths. It identifies key structural price levels including the Point of Con

Indicator v6 VolumeSupport & resistance
Updated 4 months ago · None stated GitHub repository of Comprehensive Volume Profile

Moon Dev GEX Arrows

by moondevonyt
98 stars

This overlay indicator plots option strike walls and an optional session VWAP on the price chart for SPY or ES. It spaces major strikes by the selected instrument, draws a set number of strikes on each side, and marks wall-trap and sweep events after a cooldow

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Arrows

More Volume scripts

Related on ForexR

Trade Your Charts With a Regulated Broker

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

Compare brokers