OPEN-SOURCE SCRIPT
Diupdate Volume Nodes & Value Migration [MQLSoftware]

Volume Nodes & Value Migration is an anchored volume profile engine that rebuilds the profile construction itself and then measures how price actually behaves around the profile's own structure: the Point of Control (POC), the Value Area (VAH / VAL), high-volume nodes (HVN) and low-volume nodes (LVN). Instead of a fixed number of rows filled by spreading each bar's volume uniformly, it derives the bin height from ATR at each window anchor, weights every bar's volume toward its close with a triangular kernel, recomputes the POC and Value Area on every confirmed bar so the migration of value is visible as a trail, arms the committed POC and high-volume nodes as trackable levels with an accepted / rejected state machine, and reports measured base rates for those events from the chart's own history.
This is a visual analytical tool intended for chart reading and volume-structure mapping. It does not execute trades and does not provide financial advice.
Key Features
Core Concept
TradingView already ships volume profile tools (Visible Range, Fixed Range, Session and periodic profiles), and most community profiles repeat the same construction: a fixed row count, each bar's volume spread uniformly across its high-low range, and a final static histogram left for the reader to interpret. This indicator rebuilds each of those stages and then closes the loop by measuring what price actually does at the profile's own levels. Five specific algorithmic elements:
1. Adaptive resolution. The bin height is derived from ATR at the window anchor (Coarse 0.50, Balanced 0.25, Fine 0.125 ATR per bin), so the number of bins follows the window's range-to-ATR ratio. A quiet range window and an expansion window get structurally comparable profiles on any symbol and timeframe, with no fixed row count and no per-market tuning. If a window's range outgrows the internal cap, bins merge 2:1 and the height doubles — resolution stays bounded by construction.
2. Close-weighted triangular distribution. Each bar's volume is distributed over its high-low span by a triangular kernel with its apex at the bar close: the weight a price bin receives is the integral of that kernel over the bin. For a bin [a, b] inside a bar with low L, high H and close C, the weight is F(b) - F(a), where F(x) = (x - L)^2 / ((H - L)(C - L)) below the close and F(x) = 1 - (H - x)^2 / ((H - L)(H - C)) above it. The settled price therefore carries more weight than the wick extremes, which a uniform spread treats identically to the body.
3. Developing value area. POC, VAH and VAL are recomputed on every confirmed bar of the active window; the POC is drawn as a step trail and the Value Area as a developing band, so the reader sees value migrate through the window — POC ladders, value-area expansion and contraction — rather than only the final snapshot. Once a window commits, its trail retires and the final POC / VAH / VAL lines remain, so history stays readable. Committed windows are chained with dotted POC-to-POC links labelled with the migration distance in ATR units and percent.
4. Node acceptance state machine. When a window commits, its POC and the strongest HVNs (local peaks holding at least half of the POC volume) arm as horizontal levels. Every return is tracked on confirmed bars only: a retest is accepted after N consecutive confirmed closes inside the node zone (node center plus/minus half an ATR, never thinner than one bin), and rejected when a probe trades through the node center and closes outside the zone, or when a visit leaves the zone before N closes. A graze of the zone edge that neither trades the center nor closes inside resolves nothing. Resolutions are latched and marked on the chart; unresolved nodes expire when the next window commits.
5. Measured base rates. The panel reports observed frequencies from this chart's own loaded history: how often price traded back through the prior window's POC, how often POC retests resolved as accepted, and how often HVN retests were rejected — each with its sample size. Below a minimum sample the panel says "collecting" instead of quoting a percentage. Observed frequencies, not assumptions, and no claims attached to them.
Anatomy of the Display
The committed histogram is the final profile of each closed window, drawn from the window's start with bin brightness following volume share; the Value Area is shaded behind it. The POC row and line mark the single price bin that traded the most volume, labelled `POC · High Volume Node`; VAH and VAL are dashed lines labelled `VAH · Value Area High` and `VAL · Value Area Low`.
The developing trail is a step line of the active window's POC with the developing Value Area shaded behind it, both recomputed on every confirmed bar and existing only for the window still forming. The dotted migration link connects the final POCs of consecutive windows and carries a label with the shift in ATR units and percent.
Node lines extend right from each commit: the POC node in the bright POC color, HVNs in the profile color, each labelled by kind. When a retest resolves, the line recolors and a mark is printed: `✓ accepted` when price held the required confirmed closes inside the zone, `✕ rejected` when it was turned away. Expired (untested) nodes fade to dotted.
Thin Zones are faint dashed boxes labelled `LVN · Thin Zone` over the committed window's low-volume gaps. They carry no state machine and no alerts — context only.
The panel shows the window status (anchor period, bars, bins and bin height), the developing POC and Value Area, the POC migration versus the prior window, the state of each armed node, and the measured base rates with sample sizes.
Notes on Repainting
Typical Analysis Workflow
A common analytical workflow may include:
Configuration
Anchor Period - the window each profile covers (Auto, Day, Week, Month, Quarter); Auto follows the chart timeframe and a pick at or below it escalates automatically.
Committed Profiles to Keep - how many closed windows keep their histogram drawn; statistics always use the full loaded history.
Profile Detail - target resolution (Coarse / Balanced / Fine), expressed as ATR per bin, never a bin count.
ATR Length - the ATR lookback used for bin height and migration distances.
Value Area % - the share of window volume the Value Area encloses.
Track POC / HVN as Nodes - arms committed levels for the accepted / rejected state machine.
Acceptance Closes - confirmed closes inside the node zone required for an accepted resolution.
HVN Nodes per Window - how many high-volume nodes arm besides the POC.
Thin Zones (LVN) - shades the committed window's low-volume gaps.
Resolved Marks to Keep - how many resolved node marks stay drawn on the chart; the measured statistics are unaffected.
Rendering - committed profiles, live developing profile, profile width, the active window's POC trail and Value Area band, migration links, glow, and the four palette colors.
Statistics Panel - visibility, corner and text size.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
Because the bin height, node zones and migration distances are all ATR-based, the visual behavior stays consistent across instruments and timeframes. On symbols that supply no volume data the script weights every bar equally (a time-at-price read) and the panel states so explicitly.
Alerts
All alerts evaluate on confirmed bars to avoid intra-bar oscillation. A dynamic alert message naming the exact event(s) is also provided.
This is a visual analytical tool intended for chart reading and volume-structure mapping. It does not execute trades and does not provide financial advice.
Key Features
- Anchored volume profiles (Day / Week / Month / Quarter, or Auto per chart timeframe) with bin height derived from ATR at the window anchor, so the bin count follows the window's range-to-ATR ratio instead of a fixed row number
- Close-weighted triangular distribution: each bar's volume is spread over its high-low span with the apex at the close, so the settled price carries more weight than the wick extremes
- Developing POC step-trail and Value Area band for the active window, recomputed on every confirmed bar; committed windows keep their final POC and Value Area lines so history stays clean, and consecutive windows are chained with dotted POC-to-POC links labelled with the migration distance in ATR and percent
- Committed POC and the strongest HVNs arm as horizontal levels and every return is tracked armed, then accepted (confirmed closes inside the node zone) or rejected (a probe through the node center that closes outside the zone)
- Thin Zones (LVN) of each committed window shaded as context — the low-volume gaps price historically transits rather than builds business in
- A statistics panel with the live window status, developing value, node states and measured base rates: how often price revisited the prior POC and how node retests resolved, each with its sample size
- Four confirmed-bar alerts: node accepted, node rejected, profile committed, prior POC revisited
Core Concept
TradingView already ships volume profile tools (Visible Range, Fixed Range, Session and periodic profiles), and most community profiles repeat the same construction: a fixed row count, each bar's volume spread uniformly across its high-low range, and a final static histogram left for the reader to interpret. This indicator rebuilds each of those stages and then closes the loop by measuring what price actually does at the profile's own levels. Five specific algorithmic elements:
1. Adaptive resolution. The bin height is derived from ATR at the window anchor (Coarse 0.50, Balanced 0.25, Fine 0.125 ATR per bin), so the number of bins follows the window's range-to-ATR ratio. A quiet range window and an expansion window get structurally comparable profiles on any symbol and timeframe, with no fixed row count and no per-market tuning. If a window's range outgrows the internal cap, bins merge 2:1 and the height doubles — resolution stays bounded by construction.
2. Close-weighted triangular distribution. Each bar's volume is distributed over its high-low span by a triangular kernel with its apex at the bar close: the weight a price bin receives is the integral of that kernel over the bin. For a bin [a, b] inside a bar with low L, high H and close C, the weight is F(b) - F(a), where F(x) = (x - L)^2 / ((H - L)(C - L)) below the close and F(x) = 1 - (H - x)^2 / ((H - L)(H - C)) above it. The settled price therefore carries more weight than the wick extremes, which a uniform spread treats identically to the body.
3. Developing value area. POC, VAH and VAL are recomputed on every confirmed bar of the active window; the POC is drawn as a step trail and the Value Area as a developing band, so the reader sees value migrate through the window — POC ladders, value-area expansion and contraction — rather than only the final snapshot. Once a window commits, its trail retires and the final POC / VAH / VAL lines remain, so history stays readable. Committed windows are chained with dotted POC-to-POC links labelled with the migration distance in ATR units and percent.
4. Node acceptance state machine. When a window commits, its POC and the strongest HVNs (local peaks holding at least half of the POC volume) arm as horizontal levels. Every return is tracked on confirmed bars only: a retest is accepted after N consecutive confirmed closes inside the node zone (node center plus/minus half an ATR, never thinner than one bin), and rejected when a probe trades through the node center and closes outside the zone, or when a visit leaves the zone before N closes. A graze of the zone edge that neither trades the center nor closes inside resolves nothing. Resolutions are latched and marked on the chart; unresolved nodes expire when the next window commits.
5. Measured base rates. The panel reports observed frequencies from this chart's own loaded history: how often price traded back through the prior window's POC, how often POC retests resolved as accepted, and how often HVN retests were rejected — each with its sample size. Below a minimum sample the panel says "collecting" instead of quoting a percentage. Observed frequencies, not assumptions, and no claims attached to them.
Anatomy of the Display
The committed histogram is the final profile of each closed window, drawn from the window's start with bin brightness following volume share; the Value Area is shaded behind it. The POC row and line mark the single price bin that traded the most volume, labelled `POC · High Volume Node`; VAH and VAL are dashed lines labelled `VAH · Value Area High` and `VAL · Value Area Low`.
The developing trail is a step line of the active window's POC with the developing Value Area shaded behind it, both recomputed on every confirmed bar and existing only for the window still forming. The dotted migration link connects the final POCs of consecutive windows and carries a label with the shift in ATR units and percent.
Node lines extend right from each commit: the POC node in the bright POC color, HVNs in the profile color, each labelled by kind. When a retest resolves, the line recolors and a mark is printed: `✓ accepted` when price held the required confirmed closes inside the zone, `✕ rejected` when it was turned away. Expired (untested) nodes fade to dotted.
Thin Zones are faint dashed boxes labelled `LVN · Thin Zone` over the committed window's low-volume gaps. They carry no state machine and no alerts — context only.
The panel shows the window status (anchor period, bars, bins and bin height), the developing POC and Value Area, the POC migration versus the prior window, the state of each armed node, and the measured base rates with sample sizes.
Notes on Repainting
- Volume accumulation, developing POC / VAH / VAL updates, node state transitions, base-rate counters and alerts run on confirmed bars only.
- A committed profile is final: it is built exclusively from the confirmed bars of a closed window and is never recalculated afterwards.
- Node resolutions are latched. An accepted or rejected mark cannot un-happen if price later trades back through the level.
- The live developing histogram, POC trail and Value Area band of the current window redraw as the window grows — they are explicitly visual context for the forming profile, not signals.
- The script requests no higher-timeframe data at all (no `request.security` calls); window anchors are detected with `timeframe.change` in the chart context.
- Alerts are gated by confirmed-bar events and fire once per closed bar, never intra-bar.
Typical Analysis Workflow
A common analytical workflow may include:
- Reading the committed profile for the prior window: where the POC sits, how wide the Value Area is, and where the Thin Zones are
- Watching the developing POC trail of the active window — a POC laddering in one direction reads as value migrating, a static POC as value building in place
- Comparing the migration link and the panel's MIGRATION row to see how far value shifted between windows in ATR terms
- Waiting for price to return to an armed node and letting the state machine resolve the retest into accepted or rejected on confirmed bars
- Consulting the measured base rates to see how often such revisits and retests actually occurred on this chart's history, then combining the read with other forms of analysis and risk management
Configuration
Anchor Period - the window each profile covers (Auto, Day, Week, Month, Quarter); Auto follows the chart timeframe and a pick at or below it escalates automatically.
Committed Profiles to Keep - how many closed windows keep their histogram drawn; statistics always use the full loaded history.
Profile Detail - target resolution (Coarse / Balanced / Fine), expressed as ATR per bin, never a bin count.
ATR Length - the ATR lookback used for bin height and migration distances.
Value Area % - the share of window volume the Value Area encloses.
Track POC / HVN as Nodes - arms committed levels for the accepted / rejected state machine.
Acceptance Closes - confirmed closes inside the node zone required for an accepted resolution.
HVN Nodes per Window - how many high-volume nodes arm besides the POC.
Thin Zones (LVN) - shades the committed window's low-volume gaps.
Resolved Marks to Keep - how many resolved node marks stay drawn on the chart; the measured statistics are unaffected.
Rendering - committed profiles, live developing profile, profile width, the active window's POC trail and Value Area band, migration links, glow, and the four palette colors.
Statistics Panel - visibility, corner and text size.
Markets and Timeframes
The indicator can be applied across multiple markets and timeframes:
- Forex
- Stocks and Indices
- Commodities
- Cryptocurrencies
Because the bin height, node zones and migration distances are all ATR-based, the visual behavior stays consistent across instruments and timeframes. On symbols that supply no volume data the script weights every bar equally (a time-at-price read) and the panel states so explicitly.
Alerts
- Node accepted - price printed the required confirmed closes inside an armed node zone
- Node rejected - an armed node turned the retest away (probe through the node center with a confirmed close outside the zone)
- Profile committed - an anchor window closed; its profile is final and its nodes are armed
- Prior POC revisited - price traded back through the previous window's Point of Control
All alerts evaluate on confirmed bars to avoid intra-bar oscillation. A dynamic alert message naming the exact event(s) is also provided.
Catatan Rilis
Added a VAH / VAL Line Width input (1-4, default 1) under Rendering, per user request to increase VAH/VAL thickness. No changes to the profile/POC/VA calculations, node logic, alerts, or other visuals.Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
🟣 Free tools, guides & product resources:
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.
Skrip open-source
Dengan semangat TradingView yang sesungguhnya, pembuat skrip ini telah menjadikannya sebagai sumber terbuka, sehingga para trader dapat meninjau dan memverifikasi fungsinya. Salut untuk penulisnya! Meskipun Anda dapat menggunakannya secara gratis, perlu diingat bahwa penerbitan ulang kode ini tunduk pada Tata Tertib kami.
🟣 Free tools, guides & product resources:
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
mqlsoftware.com/account/
🟣 New tools, releases & updates:
t.me/mqlsoftware_official
MQLSoftware — trading analysis tools & indicators.
Pernyataan Penyangkalan
Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.