OPEN-SOURCE SCRIPT
Dual Volume Profiles: Session + Rolling (Range Delineation)

Dual Volume Profiles: Session + Rolling (Range Delineation)
INTRO
This is a probability-centric take on volume profile. I treat the volume histogram as an empirical PDF over price, updated in real time, which makes multi-modality (multiple acceptance basins) explicit rather than assumed away. The immediate benefit is operational: if we can read the shape of the distribution, we can infer likely reversion levels (POC), acceptance boundaries (VAH/VAL), and low-friction corridors (LVNs).
My working hypothesis is that what traders often label “fat tails” or “power-law behavior” at short horizons is frequently a tail-conditioned view of a higher-level Gaussian regime. In other words, child distributions (shorter periodicities) sit within parent distributions (longer periodicities); when price operates in the parent’s tail, the child regime looks heavy-tailed without being fundamentally non-Gaussian. This is consistent with a hierarchical/mixture view and with the spirit of the central limit theorem—Gaussian structure emerges at aggregate scales, while local scales can look non-Gaussian due to nesting and conditioning.
This indicator operationalizes that view by plotting two nested empirical PDFs: a rolling (local) profile and a session-anchored profile. Their confluence makes ranges explicit and turns “regime” into something you can see. For additional nesting, run multiple instances with different lookbacks. When using the default settings combined with a separate daily VP, you effectively get three nested distributions (local → session → daily) on the chart.
This indicator plots two nested distributions side-by-side:
Rolling (Local) Profile — short-window, prorated histogram that “breathes” with price and maps the immediate auction.
Session Anchored Profile — cumulative distribution since the current session start (Premkt → RTH → AH anchoring), revealing the parent regime.
Use their confluence to identify range floors/ceilings, mean-reversion magnets, and low-volume “air pockets” for fast traverses.
What it shows
POC (dashed): central tendency / “magnet” (highest-volume bin).
VAH & VAL (solid): acceptance boundaries enclosing an exact Value Area % around each profile’s POC.
Volume histograms:
Rolling can auto-color by buy/sell dominance over the lookback (green = buying ≥ selling, red = selling > buying).
Session uses a fixed style (blue by default).
Session anchoring (exchange timezone):
Premarket → anchors at 00:00 (midnight).
RTH → anchors at 09:30.
After-hours → anchors at 16:00.
Session display span:
Session Max Span (bars) = 0 → draw from session start → now (anchored).
> 0 → draw a rolling window N bars back → now, while still measuring all volume since session start.
Why it’s useful
Think in terms of nested probability distributions: the rolling node is your local Gaussian; the session node is its parent.
VA↔VA overlap ≈ strong range boundary.
POC↔POC alignment ≈ reliable mean-reversion target.
LVNs (gaps) ≈ low-friction corridors—expect quick moves to the next node.
Quick start
Add to chart (great on 5–10s, 15–60s, 1–5m).
Start with: bins = 240, vaPct = 0.68, barsBack = 60.
Watch for:
First test & rejection at overlapping VALs/VAHs → fade back toward POC.
Acceptance beyond VA (several closes + growing outer-bin mass) → traverse to the next node.
Inputs (detailed)
General
Lookback Bars (Rolling)
Count of most-recent bars for the rolling/local histogram. Larger = smoother node that shifts slower; smaller = more reactive, “breathing” profile.
• Typical: 40–80 on 5–10s charts; 60–120 on 1–5m.
• If you increase this but keep Number of Bins fixed, each bin aggregates more volume (coarser bins).
Number of Bins
Vertical resolution (price buckets) for both rolling and session histograms. Higher = finer detail and crisper LVNs, but more line objects (closer to platform limits).
• Typical: 120–240 on 5–10s; 80–160 on 1–5m.
• If you hit performance or object limits, reduce this first.
Value Area %
Exact central coverage for VAH/VAL around POC. Computed empirically from the histogram (no Gaussian assumption): the algorithm expands from POC outward until the chosen % is enclosed.
• Common: 0.68 (≈“1σ-like”), 0.70 for slightly wider core.
• Smaller = tighter VA (more breakout flags). Larger = wider VA (more reversion bias).
Max Local Profile Width (px)
Horizontal length (in pixels) of the rolling bars/lines and its VA/POC overlays. Visual only (does not affect calculations).
Session Settings
RTH Start/End (exchange tz)
Defines the current session anchor (Premkt=00:00, RTH=your start, AH=your end). The session histogram always measures from the most recent session start and resets at each boundary.
Session Max Span (bars, 0 = full session)
Display window for session drawings (POC/VA/Histogram).
• 0 → draw from session start → now (anchored).
• > 0 → draw N bars back → now (rolling look), while still measuring all volume since session start.
This keeps the “parent” distribution measurable while letting the display track current action.
Local (Rolling) — Visibility
Show Local Profile Bars / POC / VAH & VAL
Toggle each overlay independently. If you approach object limits, disable bars first (POC/VA lines are lighter).
Local (Rolling) — Colors & Widths
Color by Buy/Sell Dominance
Fast uptick/downtick proxy over the rolling window (close vs open):
• Buying ≥ Selling → Bullish Color (default lime).
• Selling > Buying → Bearish Color (default red).
This color drives local bars, local POC, and local VA lines.
• Disable to use fixed Bars Color / POC Color / VA Lines Color.
Bars Transparency (0–100) — alpha for the local histogram (higher = lighter).
Bars Line Width (thickness) — draw thin-line profiles or chunky blocks.
POC Line Width / VA Lines Width — overlay thickness. POC is dashed, VAH/VAL solid by design.
Session — Visibility
Show Session Profile Bars / POC / VAH & VAL
Independent toggles for the session layer.
Session — Colors & Widths
Bars/POC/VA Colors & Line Widths
Fixed palette by design (default blue). These do not change with buy/sell dominance.
• Use transparency and width to make the parent profile prominent or subtle.
• Prefer minimal? Hide session bars; keep only session VA/POC.
Reading the signals (detailed playbook)
Core definitions
POC — highest-volume bin (fair price “magnet”).
VAH/VAL — upper/lower bounds enclosing your Value Area % around POC.
Node — contiguous block of high-volume bins (acceptance).
LVN — low-volume gap between nodes (low friction path).
Rejection vs Acceptance (practical rule)
Rejection at VA edge: 0–1 closes beyond VA and no persistent growth in outer bins.
Acceptance beyond VA: ≥3 closes beyond VA and outer-bin mass grows (e.g., added volume beyond the VA edge ≥ 5–10% of node volume over the last N bars). Treat acceptance as regime change.
Confluence scores (make boundary/target quality objective)
VA overlap strength (range boundary):
C_VA = 1 − |VA_edge_local − VA_edge_session| / ATR(n)
Values near 1.0 = tight overlap (stronger boundary).
Use: if C_VA ≥ 0.6–0.8, treat as high-quality fade zone.
POC alignment (magnet quality):
C_POC = 1 − |POC_local − POC_session| / ATR(n)
Higher C_POC = greater chance a rotation completes to that fair price.
(You can estimate these by eye.)
Setups
1) Range Fade at VA Confluence (mean reversion)
Context: Local VAL/VAH near Session VAL/VAH (tight overlap), clear node, local color not screaming trend (or flips to your side).
Entry: First test & rejection at the overlapped band (wick through ok; prefer close back inside).
Stop: A tick/pip beyond the wider of the two VA edges or beyond the nearest LVN, a small buffer zone can be used to judge whether price is truly rejecting a VAL/VAH or simply probing.
Targets: T1 node mid; T2 POC (size up when C_POC is high).
Flip: If acceptance (rule above) prints, flip bias or stand down.
2) LVN Traverse (continuation)
Context: Price exits VA and enters an LVN with acceptance and growing outer-bin volume.
Entry: Aggressive—first close into LVN; Conservative—retest of the VA edge from the far side (“kiss goodbye”).
Stop: Back inside the prior VA.
Targets: Next node’s VA edge or POC (edge = faster exits; POC = fuller rotations).
Note: Flatter VA edge (shallower curvature) tends to breach more easily.
3) POC→POC Magnet Trade (rotation completion)
Context: Local POC ≈ Session POC (high C_POC).
Entry: Fade a VA touch or pullback inside node, aiming toward the shared POC.
Stop: Past the opposite VA edge or LVN beyond.
Target: The shared POC; optional runner to opposite VA if the node is broad and time-of-day is supportive.
4) Failed Break (Reversion Snap-back)
Context: Push beyond VA fails acceptance (re-enters VA, outer-bin growth stalls/shrinks).
Entry: On the re-entry close, back toward POC.
Stop/Target: Stop just beyond the failed VA; target POC, then opposite VA if momentum persists.
How to read color & shape
Local color = most recent sentiment:
Green = buying ≥ selling; Red = selling > buying (over the rolling window). Treat as context, not a standalone signal. A green local node under a blue session VAH can still be a fade if the parent says “over-valued.”
Shape tells friction:
Fat nodes → rotation-friendly (fade edges).
Sharp LVN gaps → traversal-friendly (momentum continuation).
Time-of-day intuition
Right after session anchor (e.g., RTH 09:30): Session profile is young and moves quickly—treat confluence cautiously.
Mid-session: Cleanest behavior for rotations.
Close / news: Expect more traverses and POC migrations; tighten risk or switch playbooks.
Risk & execution guidance
Use tight, mechanical stops at/just beyond VA or LVN. If you need wide stops to survive noise, your entry is late or the node is unstable.
On micro-timeframes, account for fees & slippage—aim for targets paying ≥2–3× average cost.
If acceptance prints, don’t fight it—flip, reduce size, or stand aside.
Suggested presets
Scalp (5–10s): bins 120–240, barsBack 40–80, vaPct 0.68–0.70, local bars thin (small bar width).
Intraday (1–5m): bins 80–160, barsBack 60–120, vaPct 0.68–0.75, session bars more visible for parent context.
Performance & limits
Reuses line objects to stay under TradingView’s max_lines_count.
Very large bins × multiple overlays can still hit limits—use visibility toggles (hide bars first).
Session drawings use time-based coordinates to avoid “bar index too far” errors.
Known nuances
Rolling buy/sell dominance uses a simple uptick/downtick proxy (close vs open). It’s fast and practical, but it’s not a full tape classifier.
VA boundaries are computed from the empirical histogram—no Gaussian assumption.
This script does not calculate the full daily volume profile. Several other tools already provide that, including TradingView’s built-in Volume Profile indicators. Instead, this indicator focuses on pairing a rolling, short-term volume distribution with a session-wide distribution to make ranges more explicit. It is designed to supplement your use of standard or periodic volume profiles, not replace them. Think of it as a magnifying lens that helps you see where local structure aligns with the broader session.
How to trade it (TL;DR)
Fade overlapping VA bands on first rejection → target POC.
Continue through LVN on acceptance beyond VA → target next node’s VA/POC.
Respect acceptance: ≥3 closes beyond VA + growing outer-bin volume = regime change.
FAQ
Q: Why 68% Value Area?
A: It mirrors the “~1σ” idea, but we compute it exactly from empirical volume, not by assuming a normal distribution.
Q: Why are my profiles thin lines?
A: Increase Bars Line Width for chunkier blocks; reduce for fine, thin-line profiles.
Q: Session bars don’t reach session start—why?
A: Set Session Max Span (bars) = 0 for full anchoring; any positive value draws a rolling window while still measuring from session start.
Changelog (v1.0)
Dual profiles: Rolling + Session with independent POC/VA lines.
Session anchoring (Premkt/RTH/AH) with optional rolling display span.
Dynamic coloring for the rolling profile (buying vs selling).
Fully modular toggles + per-feature colors/widths.
Thin-line rendering via bar line width.
INTRO
This is a probability-centric take on volume profile. I treat the volume histogram as an empirical PDF over price, updated in real time, which makes multi-modality (multiple acceptance basins) explicit rather than assumed away. The immediate benefit is operational: if we can read the shape of the distribution, we can infer likely reversion levels (POC), acceptance boundaries (VAH/VAL), and low-friction corridors (LVNs).
My working hypothesis is that what traders often label “fat tails” or “power-law behavior” at short horizons is frequently a tail-conditioned view of a higher-level Gaussian regime. In other words, child distributions (shorter periodicities) sit within parent distributions (longer periodicities); when price operates in the parent’s tail, the child regime looks heavy-tailed without being fundamentally non-Gaussian. This is consistent with a hierarchical/mixture view and with the spirit of the central limit theorem—Gaussian structure emerges at aggregate scales, while local scales can look non-Gaussian due to nesting and conditioning.
This indicator operationalizes that view by plotting two nested empirical PDFs: a rolling (local) profile and a session-anchored profile. Their confluence makes ranges explicit and turns “regime” into something you can see. For additional nesting, run multiple instances with different lookbacks. When using the default settings combined with a separate daily VP, you effectively get three nested distributions (local → session → daily) on the chart.
This indicator plots two nested distributions side-by-side:
Rolling (Local) Profile — short-window, prorated histogram that “breathes” with price and maps the immediate auction.
Session Anchored Profile — cumulative distribution since the current session start (Premkt → RTH → AH anchoring), revealing the parent regime.
Use their confluence to identify range floors/ceilings, mean-reversion magnets, and low-volume “air pockets” for fast traverses.
What it shows
POC (dashed): central tendency / “magnet” (highest-volume bin).
VAH & VAL (solid): acceptance boundaries enclosing an exact Value Area % around each profile’s POC.
Volume histograms:
Rolling can auto-color by buy/sell dominance over the lookback (green = buying ≥ selling, red = selling > buying).
Session uses a fixed style (blue by default).
Session anchoring (exchange timezone):
Premarket → anchors at 00:00 (midnight).
RTH → anchors at 09:30.
After-hours → anchors at 16:00.
Session display span:
Session Max Span (bars) = 0 → draw from session start → now (anchored).
> 0 → draw a rolling window N bars back → now, while still measuring all volume since session start.
Why it’s useful
Think in terms of nested probability distributions: the rolling node is your local Gaussian; the session node is its parent.
VA↔VA overlap ≈ strong range boundary.
POC↔POC alignment ≈ reliable mean-reversion target.
LVNs (gaps) ≈ low-friction corridors—expect quick moves to the next node.
Quick start
Add to chart (great on 5–10s, 15–60s, 1–5m).
Start with: bins = 240, vaPct = 0.68, barsBack = 60.
Watch for:
First test & rejection at overlapping VALs/VAHs → fade back toward POC.
Acceptance beyond VA (several closes + growing outer-bin mass) → traverse to the next node.
Inputs (detailed)
General
Lookback Bars (Rolling)
Count of most-recent bars for the rolling/local histogram. Larger = smoother node that shifts slower; smaller = more reactive, “breathing” profile.
• Typical: 40–80 on 5–10s charts; 60–120 on 1–5m.
• If you increase this but keep Number of Bins fixed, each bin aggregates more volume (coarser bins).
Number of Bins
Vertical resolution (price buckets) for both rolling and session histograms. Higher = finer detail and crisper LVNs, but more line objects (closer to platform limits).
• Typical: 120–240 on 5–10s; 80–160 on 1–5m.
• If you hit performance or object limits, reduce this first.
Value Area %
Exact central coverage for VAH/VAL around POC. Computed empirically from the histogram (no Gaussian assumption): the algorithm expands from POC outward until the chosen % is enclosed.
• Common: 0.68 (≈“1σ-like”), 0.70 for slightly wider core.
• Smaller = tighter VA (more breakout flags). Larger = wider VA (more reversion bias).
Max Local Profile Width (px)
Horizontal length (in pixels) of the rolling bars/lines and its VA/POC overlays. Visual only (does not affect calculations).
Session Settings
RTH Start/End (exchange tz)
Defines the current session anchor (Premkt=00:00, RTH=your start, AH=your end). The session histogram always measures from the most recent session start and resets at each boundary.
Session Max Span (bars, 0 = full session)
Display window for session drawings (POC/VA/Histogram).
• 0 → draw from session start → now (anchored).
• > 0 → draw N bars back → now (rolling look), while still measuring all volume since session start.
This keeps the “parent” distribution measurable while letting the display track current action.
Local (Rolling) — Visibility
Show Local Profile Bars / POC / VAH & VAL
Toggle each overlay independently. If you approach object limits, disable bars first (POC/VA lines are lighter).
Local (Rolling) — Colors & Widths
Color by Buy/Sell Dominance
Fast uptick/downtick proxy over the rolling window (close vs open):
• Buying ≥ Selling → Bullish Color (default lime).
• Selling > Buying → Bearish Color (default red).
This color drives local bars, local POC, and local VA lines.
• Disable to use fixed Bars Color / POC Color / VA Lines Color.
Bars Transparency (0–100) — alpha for the local histogram (higher = lighter).
Bars Line Width (thickness) — draw thin-line profiles or chunky blocks.
POC Line Width / VA Lines Width — overlay thickness. POC is dashed, VAH/VAL solid by design.
Session — Visibility
Show Session Profile Bars / POC / VAH & VAL
Independent toggles for the session layer.
Session — Colors & Widths
Bars/POC/VA Colors & Line Widths
Fixed palette by design (default blue). These do not change with buy/sell dominance.
• Use transparency and width to make the parent profile prominent or subtle.
• Prefer minimal? Hide session bars; keep only session VA/POC.
Reading the signals (detailed playbook)
Core definitions
POC — highest-volume bin (fair price “magnet”).
VAH/VAL — upper/lower bounds enclosing your Value Area % around POC.
Node — contiguous block of high-volume bins (acceptance).
LVN — low-volume gap between nodes (low friction path).
Rejection vs Acceptance (practical rule)
Rejection at VA edge: 0–1 closes beyond VA and no persistent growth in outer bins.
Acceptance beyond VA: ≥3 closes beyond VA and outer-bin mass grows (e.g., added volume beyond the VA edge ≥ 5–10% of node volume over the last N bars). Treat acceptance as regime change.
Confluence scores (make boundary/target quality objective)
VA overlap strength (range boundary):
C_VA = 1 − |VA_edge_local − VA_edge_session| / ATR(n)
Values near 1.0 = tight overlap (stronger boundary).
Use: if C_VA ≥ 0.6–0.8, treat as high-quality fade zone.
POC alignment (magnet quality):
C_POC = 1 − |POC_local − POC_session| / ATR(n)
Higher C_POC = greater chance a rotation completes to that fair price.
(You can estimate these by eye.)
Setups
1) Range Fade at VA Confluence (mean reversion)
Context: Local VAL/VAH near Session VAL/VAH (tight overlap), clear node, local color not screaming trend (or flips to your side).
Entry: First test & rejection at the overlapped band (wick through ok; prefer close back inside).
Stop: A tick/pip beyond the wider of the two VA edges or beyond the nearest LVN, a small buffer zone can be used to judge whether price is truly rejecting a VAL/VAH or simply probing.
Targets: T1 node mid; T2 POC (size up when C_POC is high).
Flip: If acceptance (rule above) prints, flip bias or stand down.
2) LVN Traverse (continuation)
Context: Price exits VA and enters an LVN with acceptance and growing outer-bin volume.
Entry: Aggressive—first close into LVN; Conservative—retest of the VA edge from the far side (“kiss goodbye”).
Stop: Back inside the prior VA.
Targets: Next node’s VA edge or POC (edge = faster exits; POC = fuller rotations).
Note: Flatter VA edge (shallower curvature) tends to breach more easily.
3) POC→POC Magnet Trade (rotation completion)
Context: Local POC ≈ Session POC (high C_POC).
Entry: Fade a VA touch or pullback inside node, aiming toward the shared POC.
Stop: Past the opposite VA edge or LVN beyond.
Target: The shared POC; optional runner to opposite VA if the node is broad and time-of-day is supportive.
4) Failed Break (Reversion Snap-back)
Context: Push beyond VA fails acceptance (re-enters VA, outer-bin growth stalls/shrinks).
Entry: On the re-entry close, back toward POC.
Stop/Target: Stop just beyond the failed VA; target POC, then opposite VA if momentum persists.
How to read color & shape
Local color = most recent sentiment:
Green = buying ≥ selling; Red = selling > buying (over the rolling window). Treat as context, not a standalone signal. A green local node under a blue session VAH can still be a fade if the parent says “over-valued.”
Shape tells friction:
Fat nodes → rotation-friendly (fade edges).
Sharp LVN gaps → traversal-friendly (momentum continuation).
Time-of-day intuition
Right after session anchor (e.g., RTH 09:30): Session profile is young and moves quickly—treat confluence cautiously.
Mid-session: Cleanest behavior for rotations.
Close / news: Expect more traverses and POC migrations; tighten risk or switch playbooks.
Risk & execution guidance
Use tight, mechanical stops at/just beyond VA or LVN. If you need wide stops to survive noise, your entry is late or the node is unstable.
On micro-timeframes, account for fees & slippage—aim for targets paying ≥2–3× average cost.
If acceptance prints, don’t fight it—flip, reduce size, or stand aside.
Suggested presets
Scalp (5–10s): bins 120–240, barsBack 40–80, vaPct 0.68–0.70, local bars thin (small bar width).
Intraday (1–5m): bins 80–160, barsBack 60–120, vaPct 0.68–0.75, session bars more visible for parent context.
Performance & limits
Reuses line objects to stay under TradingView’s max_lines_count.
Very large bins × multiple overlays can still hit limits—use visibility toggles (hide bars first).
Session drawings use time-based coordinates to avoid “bar index too far” errors.
Known nuances
Rolling buy/sell dominance uses a simple uptick/downtick proxy (close vs open). It’s fast and practical, but it’s not a full tape classifier.
VA boundaries are computed from the empirical histogram—no Gaussian assumption.
This script does not calculate the full daily volume profile. Several other tools already provide that, including TradingView’s built-in Volume Profile indicators. Instead, this indicator focuses on pairing a rolling, short-term volume distribution with a session-wide distribution to make ranges more explicit. It is designed to supplement your use of standard or periodic volume profiles, not replace them. Think of it as a magnifying lens that helps you see where local structure aligns with the broader session.
How to trade it (TL;DR)
Fade overlapping VA bands on first rejection → target POC.
Continue through LVN on acceptance beyond VA → target next node’s VA/POC.
Respect acceptance: ≥3 closes beyond VA + growing outer-bin volume = regime change.
FAQ
Q: Why 68% Value Area?
A: It mirrors the “~1σ” idea, but we compute it exactly from empirical volume, not by assuming a normal distribution.
Q: Why are my profiles thin lines?
A: Increase Bars Line Width for chunkier blocks; reduce for fine, thin-line profiles.
Q: Session bars don’t reach session start—why?
A: Set Session Max Span (bars) = 0 for full anchoring; any positive value draws a rolling window while still measuring from session start.
Changelog (v1.0)
Dual profiles: Rolling + Session with independent POC/VA lines.
Session anchoring (Premkt/RTH/AH) with optional rolling display span.
Dynamic coloring for the rolling profile (buying vs selling).
Fully modular toggles + per-feature colors/widths.
Thin-line rendering via bar line width.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.