OPEN-SOURCE SCRIPT
Mis à jour

Anchored Volume Profile Confluence

1 310
ANCHORED VOLUME PROFILE CONFLUENCE — POC, Value Area, HVN/LVN & Value Migration

OVERVIEW
This is an anchored volume-at-price framework. From a chosen anchor — the session, a swing pivot, or a bar you click — it builds a volume profile and reads where trade actually happened: the POC (the most-traded price), the value area, and the high- and low-volume nodes. It overlays the anchored VWAP (the mean) on the same anchor, maintains a second time-decayed profile whose value migrates against the sticky POC, and calibrates its stretch signals against the symbol's own past. Everything is built from one idea — volume distributed across price — so the layers describe the same auction from different angles rather than competing for screen space.

WHY THESE COMPONENTS ARE COMBINED (and how they work together)
Price tells you where the market is; volume-at-price tells you where it agreed value was. A profile alone is a static picture, a VWAP alone is a single line, and neither tells you whether what you are seeing is reliable. Each layer here answers a different question, and they are meant to be read together as one object:

- VOLUME PROFILE (POC / VALUE AREA / HVN-LVN) is the distribution of volume across price since the anchor. The POC is the price with the most acceptance. The value area is the price range containing the chosen percentage of volume (default 70%). High-volume nodes (HVN) are acceptance shelves where price tends to stall and rotate; low-volume nodes (LVN) are rejection gaps price tends to move through quickly. This is the structural map.

- ANCHORED VWAP (MEAN) is the volume-weighted average price over the same anchor. The POC is the MODE of value (where most trade occurred) and the VWAP is the MEAN (the volume-weighted centre). Their relationship is information in itself: when VWAP sits above the POC the distribution is top-heavy, below it bottom-heavy. Showing both, anchored to the same event, is what turns a profile into a read on skew.

- VOLUME-WEIGHTED SIGMA measures dispersion around the mean, computed from the running second moment (sigma = square root of E[x^2] - (E[x])^2), so "stretched" means the same thing on any instrument. This is what makes the stretch signal comparable across assets and calibratable.

- VALUE MIGRATION is the original layer. A second profile is maintained with an exponential half-life applied to its volume, so it weights recent trade more heavily. Its value (the decayed POC or value-area midpoint) reacts to what is happening now, while the anchored POC stays sticky. When the fast value crosses the anchored POC, acceptance is shifting — buyers or sellers are building value away from the established centre. Because both are derived from the same volume data, this is a coherent structural signal, not two unrelated indicators stacked together.

- REGIME and CALIBRATION are the quality layer. An efficiency-ratio and ADX read labels the market trending, mixed or choppy for context. Separately, the script tracks — past-only — how often a stretch beyond the bands actually reverted toward value, reported as a percentage with a confidence interval. This is what separates a measured framework from a drawing: the signal is scored against the instrument's own history.

Read together: the profile shows the structure (where value is, where the shelves and gaps are), the POC-versus-VWAP skew shows how that value is distributed, the sigma bands show how far price has stretched from it, the migration shows whether acceptance is moving, the regime tells you whether to trust a signal, and the calibration shows how the stretch has behaved here before.

HOW TO USE IT
1. Pick an anchor mode in settings — Session, Pivot High, Pivot Low, Pivot High/Low (auto), or Manual (click a bar). The profile and VWAP rebuild from that point.
2. Read the histogram for structure: trade toward HVN shelves (acceptance) and expect quick travel through LVN gaps (rejection). The POC is the gravity centre.
3. Use the value area (VAH/VAL) as the fair-value range; price outside it is out of value and either trending or stretched.
4. Watch the VWAP-versus-POC skew for whether value is top- or bottom-heavy, and the sigma stretch rails for extension.
5. Watch the fast value crossing the POC (triangles) as a sign acceptance is migrating; the table and exports quantify the migration.
6. Treat a stretch (circles) into an LVN as more reversion-prone and a stretch into an HVN as a potential trap; the table's verdict and past-only reversion rate summarise this.

WHAT MAKES IT ORIGINAL
It is not a static volume profile. It pairs an anchored profile with the anchored VWAP so you read the mode and the mean together; it adds a decayed-profile value-migration signal against the sticky POC; it uses robust percentile-based HVN/LVN thresholds that self-scale instead of a fixed percentage of the POC; it refines the profile with lower-timeframe intrabar data where available; and it calibrates its stretch signal per symbol. The migration read and the per-symbol calibration in particular are not part of a standard volume profile.

WORKS ON ANY ASSET (universal)
The price SOURCE for the mean is selectable in the settings, so the engine runs on any market — futures, indices, FX, crypto, or stocks. The profile is built from each bar's true high-low range (and from lower-timeframe bars where available, for accuracy). Volume-at-price requires volume; on symbols that report none, you can borrow volume from a reference symbol. All thresholds are ATR- and sigma-relative, so nothing is tied to one instrument's price scale. A data-health row tells you whether volume is native, borrowed, or refined by lower-timeframe data.

SETTINGS SUMMARY
- Data Source: price source (default HLC3) and an optional volume-borrow symbol for no-volume instruments.
- Anchor: anchor mode, pivot left/right lengths, and a manual anchor time.
- Profile: resolution (rows per ATR), value-area percentage, lower-timeframe refinement and its resolution, robust percentile node thresholds, HVN/LVN levels, histogram width, and what to draw.
- Value Migration: enable the decayed profile, its half-life, and the fast-line definition (value-area midpoint or raw POC).
- Signals & Regime: stretch threshold in sigma.
- Calibration: enable tracking, evaluation horizon, and minimum reversion in ATR.
- Visuals: Auto/Dark/Light theme, colours, line glow, on-chart labels, legend, table and their positions, and a data-health row.

The script also prints its name, the symbol and the timeframe on the chart, and an on-chart legend names every plotted level, so it is always clear what is being viewed.

LIMITATIONS (please read)
- Pivot anchors confirm only after the right-pivot length in bars; the profile is seeded back to the true pivot bar, but a new pivot anchor appears with that delay.
- Lower-timeframe refinement depends on available intrabar history and is disabled when volume is borrowed; older bars fall back to bar-range distribution.
- The decayed profile re-weights every bin each bar, so it is heavier than a static profile on long anchors.
- Calibration is descriptive of past behaviour only and is not a forecast.
- Everything here is probabilistic context, not a prediction or a guarantee.

DISCLAIMER
This is a study / indicator for chart analysis and education only. It is NOT a strategy, NOT a recommendation, and NOT financial advice. It places no orders and guarantees no outcome. Trading involves risk. Do your own research and manage your own risk.
Notes de version
v2.0 — Adaptive auto-anchoring + refreshed visuals
Anchoring is now fully automatic — no more click-to-place setup.
• New modes: Dual (auto) (default), Swing Low, Swing High, Session. Dual anchors to the most recent significant swing and re-anchors as new structure forms; swing anchors seed back to the true pivot bar.
• Removed the manual click-anchor and its on-add prompt. Note: a manual anchor set in the previous version no longer applies — the profile self-anchors, no action needed.
• Refreshed colour scheme: teal/magenta acceptance-rejection, orange POC, blue value area, amber fast (migration) line, dark panel. All colours remain editable in Settings.
All analytics unchanged — volume profile, POC / value area / HVN-LVN, anchored VWAP, value migration, regime filter, and the past-only stretch-reversion calibration.
Notes de version
Minor update

Clause de non-responsabilité

Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.