Indicator · Pine Script v5 · On the chart

Session Dominance Profile [Pointalgo]

by eddiebelaval

Session Dominance Profile [Pointalgo] is an overlay indicator that calculates a volume profile broken down by global trading sessions over a specified lookback period.

View on GitHub

GitHub stars7on the repository
Pine versionv5runs as is
Lines of code103
Settings5inputs
LicenceNone statedfile: MPL-2.0
Last update3 months ago24 Jul 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

103 lines of Pine Script v5 from pinescript/volume/session-dominance-profile-pointalgo.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

session-dominance-profile-pointalgo.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
//@version=5
indicator("Session Dominance Profile [Pointalgo]", "Session Profile (pointalgo)", overlay=true, max_lines_count=500)

// ═══════════════════════════════════════════════════════════════
// 1. SETTINGS
// ═══════════════════════════════════════════════════════════════
i_len       = input.int(300, "Lookback", minval=50)
i_bins      = input.int(60, "Resolution", minval=10)
i_fixed_wid = input.int(200, "Fixed Width (Bars)", minval=10) 
i_offset    = input.int(150, "Offset (Bars)", minval=0)
i_direction = input.string("Right to Left", "Profile Direction", options=["Left to Right", "Right to Left"])

// Session Hours (UTC) - Simplified defaults
i_asia_start = 0, i_asia_end = 8
i_lon_start  = 8, i_lon_end  = 13
// NY starts at 13 UTC (approx)

// ═══════════════════════════════════════════════════════════════
// 2. LOGIC
// ═══════════════════════════════════════════════════════════════
float highest_p = ta.highest(high, i_len)
float lowest_p  = ta.lowest(low, i_len)
float range_p   = highest_p - lowest_p

var line[] lines = array.new_line()
var label info   = label.new(na, na, "", style=label.style_label_left, textcolor=color.white)

if barstate.islast
    int sz = array.size(lines)
    if sz > 0
        for i = 0 to sz - 1
            line.delete(array.get(lines, i))
        array.clear(lines)
    label.delete(info)

    float step = range_p / i_bins
    
    // We need 3 buckets per level
    float[] asia_bins  = array.new_float(i_bins, 0.0) 
    float[] lon_bins   = array.new_float(i_bins, 0.0) 
    float[] ny_bins    = array.new_float(i_bins, 0.0) 
    float[] total_bins = array.new_float(i_bins, 0.0)
    
    float max_total = 0.0

    // ─── BINNING BY TIME ───
    for i = 0 to i_len - 1
        float p = close[i]
        float v = volume[i]
        int h   = hour(time[i], "UTC") // Get hour in UTC
        
        if not na(p) and not na(v)
            int bin_idx = math.floor((p - lowest_p) / step)
            bin_idx := bin_idx >= i_bins ? i_bins - 1 : bin_idx < 0 ? 0 : bin_idx
            
            // Add to Total
            float cur_tot = array.get(total_bins, bin_idx) + v
            array.set(total_bins, bin_idx, cur_tot)
            if cur_tot > max_total 
                max_total := cur_tot
            
            // Add to Session Bucket
            if h >= i_asia_start and h < i_asia_end
                array.set(asia_bins, bin_idx, array.get(asia_bins, bin_idx) + v)
            else if h >= i_lon_start and h < i_lon_end
                array.set(lon_bins, bin_idx, array.get(lon_bins, bin_idx) + v)
            else
                array.set(ny_bins, bin_idx, array.get(ny_bins, bin_idx) + v)

    // ─── PLOTTING ───
    if max_total > 0
        int base_x = bar_index + i_offset
        
        for b = 0 to i_bins - 1
            float tot = array.get(total_bins, b)
            float a   = array.get(asia_bins, b)
            float l   = array.get(lon_bins, b)
            float n   = array.get(ny_bins, b)
            
            int w = math.round((tot / max_total) * i_fixed_wid)
            w := w < 1 and tot > 0 ? 1 : w
            
            float p_lvl = lowest_p + (step * b) + (step/2)
            
            // WINNER TAKES ALL COLORING
            color c = color.gray
            if a > l and a > n
                c := #ffeb3b // Asia = Yellow
            else if l > a and l > n
                c := #2962ff // London = Blue
            else
                c := #f50057 // NY = Red/Pink
                
            if w > 0
                // Handle direction based on input
                int x1 = base_x
                int x2 = i_direction == "Left to Right" ? base_x + w : base_x - w
                line.new(x1, p_lvl, x2, p_lvl, color=c, width=2)

        // Legend Label
        string txt = "DOMINANCE\nAggressive Session:\nYellow: Asia\nBlue: London\nRed: NY"
        label.new(base_x, highest_p, txt, color=color.black, style=label.style_label_down, textcolor=color.white, size=size.small)

Overview

Session Dominance Profile [Pointalgo] divides the historical high-low range into price bins and categorizes volume into Asian, London, and New York session buckets based on UTC hours. The indicator renders segmented horizontal profile bars on the main price chart to display session-specific volume dominance across price levels. Settings allow traders to customize the lookback bar length, bin resolution, profile offset, fixed width, and profile direction.

Details

Published by

eddiebelaval on GitHub

Type

Indicator, Pine Script v5

Draws

On the price chart

Category

Volume, Sessions & time, Support & resistance

Markets

Forex, Crypto

Timeframes

M15-H1

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
Lookbackint300i_len
Resolutionint60i_bins
Fixed Width (Bars)int200i_fixed_wid
Offset (Bars)int150i_offset
Profile DirectionstringRight to Lefti_direction
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

VP

by dearvn
257 stars

This indicator calculates and plots a session-based volume profile directly on the price chart. It maps volume distribution across price levels, highlighting key structural reference points including the Point of Control, Value Area High, and Value Area Low. C

Indicator v5 VolumeSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of VP

Midnight VWAP

by TradersPost
218 stars

The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal

Indicator v6 Moving averagesSessions & time
Updated 3 months ago · None stated GitHub repository of Midnight VWAP

Moon Dev GEX Arrows

by moondevonyt
92 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 8 weeks ago · Custom licence GitHub repository of Moon Dev GEX Arrows

This overlay indicator draws a volume profile for a chosen trading session directly on the price chart. It plots the point of control, value area high and low, an optional value area box, a live zone, and a session box with labels. Users select Tokyo, London,

Indicator v5 Sessions & timeVolume
Updated 7 weeks ago · None stated GitHub repository of Sessions & VP with prev session VP & daily/weekly opens

LoD Intraday Entry

by ChartsLector
41 stars

This overlay indicator marks the current day's low and a suggested entry zone a fraction of daily ATR below that low. It compares daily volume with a volume moving average, plots daily SMA and EMA distance, and draws an optional ATR-width price cloud. Labels c

Indicator v6 Support & resistanceVolatility & bands
Updated 2 days ago · None stated GitHub repository of LoD Intraday Entry

RS: Market Profile

by agejevasv
12 stars

This indicator plots a Market Profile on the price chart using time-price opportunity letters or symbols. It marks the point of control, a configurable value area, and the initial balance, and it can highlight a volume-profile point of control and session VWAP

Indicator v5 VolumeSupport & resistance
Updated 2 years ago · None stated GitHub repository of RS: Market Profile

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