Confluence Zone Engine [CZE]# Confluence Zone Engine
A structural analysis indicator that identifies support and resistance zones by clustering Anchored VWAPs and Anchored Volume Profile levels across the chart timeframe and up to three higher timeframes. Each zone is rated 1 to 5 stars based on how many independent sources cluster at the level and how diverse those sources are.
This is a structural analysis tool. It marks where multiple independent technical references agree at a price. It does not place trades or suggest entries, exits, targets, stops, or position sizes.
---
## What this script does
The engine runs a six-stage pipeline on every confirmed bar:
**Stage 1 — Pivot detection.** Detects pivot highs and pivot lows at Fibonacci-spaced lengths (3, 5, 8, 13, 21, 34, 55, 89). Each pivot becomes an "anchor" point. Default enabled tiers are 8, 21, and 34 — selected to give fast / medium / slow coverage without redundancy. The full Fibonacci set is configurable.
**Stage 2 — Per-anchor calculations.** For every anchor, the engine maintains:
- An Anchored VWAP (volume-weighted average price since the anchor bar)
- An Anchored Volume Profile, which produces a Point of Control (POC = most-traded price since anchor) and a Value Area (VAH and VAL = upper and lower edges of the 70% volume zone)
So a single pivot generates up to 4 contributor levels: AVWAP, POC, VAH, VAL.
**Stage 3 — Higher-timeframe replication.** The same pipeline (stages 1 and 2) re-runs on up to three configurable higher timeframes via non-repainting `request.security` calls. This produces a multi-timeframe view of structural anchors — pivots and AVWAPs from a 1H chart inform what the 5m engine treats as a higher-timeframe reference.
**Stage 4 — Cluster building.** All contributor levels from all enabled timeframes are collected. The cluster builder walks them in price order, merging any that fall within a configurable tolerance (default 0.08% of current price; preset-adjusted per asset class). A cluster with at least the minimum-count threshold becomes a candidate zone.
**Stage 5 — Star rating.** Each zone is rated 1 to 5 stars based on:
- Total contributor count
- Source-type diversity (how many of the 4 source categories — PH-AVWAPs, PL-AVWAPs, POCs, VAH/VAL — are present)
- HTF agreement (whether contributors from multiple timeframes align)
A "Premium" tier flag fires when top stars combine with HTF agreement.
**Stage 6 — State machine.** Each zone is tracked through a lifecycle:
- **Active** (forming, amber): the zone is currently accumulating contributors
- **Pending** (blue): contributor activity has paused; waiting for price to resolve the level
- **Resolved Support** (green), **Resistance** (red), or **Chop** (gray): determined by whether price moved decisively up, decisively down, or stayed range-bound after the zone activated
- **Tested** (dashed border): price entered the resolved zone but has not closed past the defending edge
- **Broken** (dashed orange + "Broken" label): price has closed past the defending edge
- **Flipped**: if a Broken state confirms over multiple closes past a threshold, the zone repaints to the opposite role (broken Resistance becomes Support, broken Support becomes Resistance)
---
## Why this indicator is original (not a simple mashup)
This is not "AVWAP indicator + Volume Profile indicator + multi-timeframe wrapper." Three design choices distinguish it from existing public indicators:
**1. Anchored at every Fibonacci pivot, not at a single user-selected point.** Standard AVWAP indicators require the user to manually click an anchor point. Standard Volume Profile indicators use either a fixed session or a single anchor. This engine automatically detects pivots at multiple Fibonacci lengths and runs an AVWAP + Volume Profile from each one. The number of active anchors at any time is typically 6 to 20, generating 24 to 80 contributor levels — far more than a manually-anchored tool can produce.
**2. Cross-timeframe clustering, not separate per-timeframe overlays.** The engine does not draw 5 separate AVWAPs from a 1H chart, plus 5 from a 4H, plus 5 from a daily. Instead, levels from all timeframes are collected into one pool and clustered in price space. A 1H AVWAP at 23,720 and a daily POC at 23,718 merge into a single zone marked as "two contributors from two timeframes." This produces structural information neither timeframe shows alone.
**3. Compositional bias from the contributor mix.** The cluster builder records *which type* of contributor formed each zone — pivot-high AVWAPs (trapped sellers' breakevens), pivot-low AVWAPs (trapped buyers' breakevens), POCs (acceptance), VAH or VAL (fair-value edges). The directional implication of each type is summed into a "compositional bias" score. A zone built mostly from PL-AVWAPs and VAL contributions leans support; one built from PH-AVWAPs and VAH contributions leans resistance. This is an analytical lens not present in standard S/R indicators, which generally treat all levels as direction-agnostic.
---
## Mashup justification — how the components work together
The four classes of technical analysis used (pivots, AVWAP, Volume Profile, multi-timeframe analysis) are not chosen arbitrarily. Each contributes a dimension the others do not, and the value comes from how they interact:
**Pivots provide the anchors.** Without pivots, AVWAP needs a manual anchor and Volume Profile needs an arbitrary session. Pivots at multiple Fibonacci lengths give the engine *automatic structural anchors* spanning timescales — short-term swings, intraday swings, session-level swings. The Fibonacci spacing (3, 5, 8, 13, 21, 34, 55, 89) ensures the anchors are non-redundant: each tier has a different bar requirement and catches different swings.
**AVWAP measures participant breakeven from each anchor.** This is the "where might trapped participants defend" dimension. An AVWAP from a pivot high is the volume-weighted breakeven for everyone who entered after that high (mostly net-short positions). An AVWAP from a pivot low is the breakeven for everyone who entered after that low (mostly net-long). When price returns to one of these AVWAPs, structurally those participants are at breakeven and have incentive to act.
**Volume Profile measures acceptance from each anchor.** This is the "what price has been most-accepted by volume" dimension. POC is the most-traded price; VAH/VAL are the edges of the 70%-volume range. AVWAP and POC measure different things — average price vs most-accepted price — and frequently disagree. When they *do* agree at a level, that's two independent signals saying "this price matters."
**Multi-timeframe replication tests for structural agreement.** A zone that exists only on the chart timeframe is one-timeframe noise. A zone where chart-TF contributors *agree with* higher-TF contributors at the same price is structural — the same level shows up no matter which timescale you measure from. The engine treats HTF agreement as a primary input to the star rating: HTF-aligned zones can earn an extra star (capped to prevent inflation).
**The clustering is where the value emerges.** Individually, none of these components produce reliable levels. AVWAP gets broken constantly. POC migrates. Pivot levels get violated. But when the engine sees that the 21-pivot AVWAP, the 34-pivot POC, the 8-pivot VAL, and a 1H AVWAP all land within 0.08% of each other at the same price, that's a confluence of independent references measuring different things — and that *coincidence* is what produces structural significance. The star rating quantifies how much agreement is present.
This is the mashup's purpose: not to combine indicators for their own sake, but to use convergence as a filter that turns individually noisy components into a rated structural signal.
---
## How to use the indicator
**Step 1: Apply to any chart timeframe.** All settings have sensible defaults. The asset-class preset (NSE Index Futures, NSE Stock, US Future, US ETF, US Stock, Commodity, Crypto, or Custom) auto-adjusts cluster tolerance and pivot defaults. Auto-selected higher timeframes scale with the chart — a 5m chart defaults to 15m/60m/240m HTFs, while a daily chart defaults to weekly/monthly HTFs.
**Step 2: Read the status panel (bottom-right).** This is the actionable summary:
- "Sup" row: nearest resolved Support below current price, with point distance
- "Res" row: nearest resolved Resistance above current price, with point distance
- "Top zone": the highest-rated zone overall
- "Data": indicator health (OK / Degraded / Critical) — if the underlying volume data is sparse, ratings are capped
**Step 3: Scan the chart for "Broken" labels.** Any zone in dashed orange with a "Broken" label is currently being violated. Watch for either recovery (border returns solid) or polarity flip confirmation (zone repaints to opposite role).
**Step 4: Find the active amber zone.** This is the current forming confluence. Look at the triangle shape: ▲ means the composition leans support, ▼ means it leans resistance, ◆ means neutral. The number next to the triangle is the star rating. A premium "★" prefix means HTF agreement is present.
**Step 5: Use the Major S/R lines as forward references.** Bold horizontal lines mark the top 2 strongest support levels below current price and top 2 strongest resistance levels above. Labels show price, stars, and distance.
**Step 6: Use the Range band as context.** The translucent aqua band marks the recent trading envelope (default last 50 bars). A narrow band means consolidation; a wide band means trending.
**Step 7: Hover any element for the full breakdown.** Every box, triangle, and line has a tooltip showing total contributors, type counts, HTF alignment, state, and history.
---
## How NOT to use the indicator
- **Do not treat the bias arrow as a trade signal.** It is a compositional description of contributors, not a directional forecast. A zone with a ▲ bias can still resolve as resistance.
- **Do not treat a "Broken" label as a trade trigger.** It tells you a known level is failing — not that you should enter a position in either direction.
- **Do not assume higher stars mean higher profit probability.** Stars measure the diversity and density of contributors, not historical performance or expected return.
- **Do not rely on it for low-volume instruments.** If the data-health badge shows "Degraded" or "Critical," the engine has capped ratings and may suppress zones entirely. This is a feature; the indicator is most accurate on liquid, volume-rich instruments (index futures, large-cap stocks, major crypto).
---
## How to read the star rating
Stars are a descriptive summary of confluence quality. They are not a probability of profit.
- 1 to 2 stars: minimum cluster; one or two source types. Background context.
- 3 stars: at least 5 contributors with 2 or more source types. Recurring intraday levels.
- 4 stars: at least 7 contributors with 3 or more source types, OR 3-star with HTF agreement.
- 5 stars: at least 10 contributors with all 4 source types present. Often boosted by HTF alignment.
By default, only 4-star and 5-star zones get triangle markers and qualify for Top-N or Major S/R lines. This is adjustable.
---
## Visual primitives
- **Confluence zones** — colored boxes marking each cluster. Boxes recolor as zones resolve. Border style indicates compromised state.
- **Triangle markers** — ▲ ▼ ◆ at each formation bar. Shape encodes direction. Color encodes lifecycle state.
- **Top-N S/R lines** — top 4 resolved zones by strength and recency project forward.
- **HTF confluence bands** — semi-transparent bands per higher timeframe (cyan, purple, orange).
- **Major S/R lines** — bold lines for top 2 supports below and top 2 resistances above current price.
- **Range band** — translucent band marking recent trading range with HI / LO labels.
- **Current price line** — thin dotted line at current price.
- **Status panel** — bottom-right summary.
---
## Technical notes
- Pine Script v6
- Non-repainting: all `request.security` calls use `barmerge.lookahead_off`
- Asset-class presets adjust cluster tolerance and pivot defaults
- Built-in data-integrity layer caps ratings when volume data is sparse or stale
- Seven alert conditions: new zone formed, high-quality (4 to 5 star) zone, HTF aligned, price entered support, price entered resistance, data health degraded, polarity flip
---
## Important risk disclosure
This indicator is provided for educational and informational purposes only and is not financial advice. Trading and investing involve substantial risk of loss, including the possible loss of all invested capital. The zones, ratings, bias shapes, and lines are descriptive summaries of structural confluence — they are not predictions of future price movement, indications of profitability, win rate, or expected return.
No backtested or hypothetical performance is claimed or implied. Past zones identified by the indicator are not indicative of future results.
You are solely responsible for any decisions you make. Consult a qualified, licensed financial advisor before trading. Past performance does not guarantee future results.
Indicator

MGI Walls | Rainbow MatrixGENERAL OVERVIEW
The MGI Walls is a multi-timeframe institutional liquidity radar that extracts and renders the price zones where institutional capital concentrates: Volume Profile blocks (Point of Control, Value Area High, Value Area Low), Anchored VWAPs, and Parabolic SAR levels. Instead of showing these levels for a single chart timeframe, the indicator scans up to five macro timeframes simultaneously and merges overlapping zones into a single intensified block whenever multiple timeframes agree on the same price area.
The main goal of this indicator is to give traders a clean, automatic read on where the structural barriers in the market are — without having to manually flip between timeframes, mark POCs by hand, or guess which level the next reaction will respect. Every line, box, and confluence zone you see on the chart was extracted from real volume distribution data, not drawn manually.
It plots up to four level types per timeframe (POC, VAH, VAL, VWAP, SAR), each weighted by the structural significance of its timeframe — a Weekly POC carries five times the gravitational weight of a 15-minute POC. The Wall Fusion Engine then detects when levels from different timeframes fall within a configurable percentage threshold and consolidates them into a single block. The Nearest Wall HUD panel and the institutional collision alerts complete the toolkit.
This indicator was developed for traders who already understand Volume Profile and VWAP concepts and want to see them across multiple timeframes in a single visual, with automatic confluence detection.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
Most Volume Profile indicators on PulseWire — including the standard built-in profiles, Fixed Range Volume Profile, and the various session/visible-range derivatives — share a common architectural choice: they operate on a single timeframe. They show you the POC and Value Area for the current chart only. This treats each timeframe as an isolated decision space.
The problem: institutional flow is not isolated to one timeframe. The market makers operating on the daily horizon see different value areas than those operating on the weekly or 4-hour horizon. Their orders sit at their own POCs and Value Area boundaries. When price approaches a level that only one institutional horizon defends, the reaction is often modest. When price approaches a level that multiple horizons defend simultaneously, the reaction is structurally stronger — that confluence is where the largest pools of resting liquidity accumulate.
This indicator addresses that by performing the extraction across five user-configured timeframes simultaneously via `request.security()`, weighting each level by the gravitational significance of its parent timeframe, and then fusing levels from different timeframes that fall within a configurable margin. The math is standard Volume Profile (POC at the volume-weighted mode, VAH/VAL at the ±2.51σ boundary that approximates the 70% Value Area) — what makes it useful is doing it across five timeframes at once, with hierarchical weighting and confluence merging.
Why traders use it: each block represents an institutional decision zone. A standalone POC line from the 15-minute timeframe is a local reaction point. A POC line that simultaneously aligns with the 4-hour VAH and the daily VWAP is a multi-horizon barrier — a zone defended by three independent pools of institutional capital at once. The fusion engine makes these confluences immediately visible as thicker, more opaque blocks; the polarity of each block reflects the accumulated weight balance of the levels that compose it, not the polarity of the last level to be merged.
The three rendered components — Volume Profile zones, Anchored VWAPs, and Parabolic SAR levels — are not independent layers stacked on the same chart. They map three different aspects of institutional positioning at the same set of timeframes: where past volume concentrated (Volume Profile), where the live volume-weighted consensus price currently sits (VWAPs), and which directional trend regime each timeframe is in (SARs). The Wall Fusion Engine operates across all three layers indiscriminately — a POC from the 4-hour timeframe and a VWAP from the daily timeframe at the same price are fused into a single block, because from the perspective of institutional defense they represent the same structural barrier reinforced by two independent mechanisms. This integration is the reason the three components exist in a single script rather than as three separate indicators: the cross-layer fusion is what surfaces multi-mechanism confluence, which a separate-script approach cannot do.
MGI WALLS FEATURES
The indicator includes 6 main features:
Multi-Timeframe Volume Profile Engine
Anchored MTF VWAPs
Parabolic SAR Levels (MTF)
Wall Fusion Engine with Polarity-Balance Coloring
Nearest Wall HUD Panel
Institutional Collision Alerts
Multilingual interface and full customization across all visual layers.
MULTI-TIMEFRAME VOLUME PROFILE ENGINE
🔹 What It Does
The core of the indicator. For each of the five configured radar timeframes, the engine performs three operations:
◇ Locates the price level that received the highest traded volume in the lookback window — the Point of Control (POC).
◇ Computes the volume-weighted standard deviation of price around that POC.
◇ Builds the Value Area High (VAH) and Value Area Low (VAL) at a calibrated multiplier (±2.51σ) of that deviation, approximating the price range that contained 70% of the total volume.
The result is three institutional reference levels per timeframe — POC, VAH, VAL — extracted natively at the granularity of each timeframe rather than approximated from the current chart's data.
🔹 Method
The extraction runs via `request.security()` with `lookahead=barmerge.lookahead_off` to prevent repainting. The POC is identified as the volume-weighted mode within the lookback window. The Value Area boundaries are derived statistically from the volume-weighted variance of price around the POC, using a calibration factor (vp_k = 2.51) tuned to approximate the conventional 70% Value Area definition. Each level is plotted on the chart as a line or box at its native price location, color-coded by whether it sits above (resistance) or below (support) the current price, and weighted by the timeframe it originated from.
🔹 Hierarchical Weighting
The five timeframes are weighted by structural significance:
◇ TF1 (Micro, default 15m): weight 1 — local reaction point.
◇ TF2 (Intraday, default 1h): weight 1 — session-scale level.
◇ TF3 (Macro 1, default 4h): weight 2 — multi-session level.
◇ TF4 (Macro 2, default Daily): weight 3 — multi-day level.
◇ TF5 (Global, default Weekly): weight 5 — multi-week structural barrier.
The weight controls visual prominence (opacity, border thickness) and, when fusion occurs, the contribution of each level to the polarity balance of the resulting block.
ANCHORED MTF VWAPS
🔹 What It Does
For each of the five radar timeframes, an Anchored VWAP is extracted and rendered as a separate level. The Global VWAP — the average of all five — is also plotted, marked with a globe emoji to distinguish it from the per-timeframe VWAPs.
🔹 Method
The per-timeframe VWAP is computed via a volume-weighted moving average of hlc3 on the native bars of each timeframe, then reported back to the current chart through `request.security()`. The Global VWAP is the unweighted average of the five timeframe VWAPs that are currently available (NA values are skipped).
🔹 Why It Matters
The Volume Profile blocks tell you where past volume concentrated. The VWAPs tell you what the volume-weighted consensus price is for each horizon, updated bar by bar. Together they give a complete read on every bar: where the past institutional reference zones are (the blocks) and where the live volume-weighted average for each horizon currently sits (the VWAPs).
PARABOLIC SAR LEVELS (MTF)
🔹 What It Does
The Parabolic SAR for each of the five radar timeframes is extracted and rendered as an institutional trend-direction anchor. SAR levels are toggleable independently of the Volume Profile and VWAP layers.
🔹 Why It Matters
The SAR provides a directional trend reference per timeframe — when the Weekly SAR sits above price and the Daily SAR sits below, the structure is in conflict and the resolution of that conflict often drives the next swing. When multiple SARs align on the same side, the directional bias is structurally agreed across horizons.
WALL FUSION ENGINE WITH POLARITY-BALANCE COLORING
🔹 What It Does
When two or more levels from different timeframes fall within a configurable percentage threshold (default 0.30%), the engine fuses them into a single block. The fused block inherits the combined weight of all its components — visually thicker, more opaque, more visible than a standalone level. The label of the fused block accumulates the directional triangles of each contributing level (▲ for support, ▼ for resistance).
🔹 Polarity-Balance Coloring
The color of a fused block reflects the accumulated weight balance of its constituent levels — not the polarity of the last level to be merged. A block containing four resistance levels (▼▼▼▼) and two support levels (▲▲) will render red, because the resistance weight dominates. A block where support and resistance weights are equal uses a tiebreaker: the position of the current price relative to the block's midpoint. Price above midpoint resolves to support (green); price below resolves to resistance (red). This produces a coloring scheme that is internally consistent with the triangle labels and with the price's current location.
🔹 Customization
The Wall Merge Margin (%) input controls how aggressively levels are fused. Lower values produce many separate precise lines. Higher values produce massive consolidated institutional blocks. The default of 0.30% is calibrated for liquid instruments on intraday timeframes; for higher-volatility assets or higher timeframes, larger margins (0.50–1.00%) may produce more readable charts.
NEAREST WALL HUD PANEL
🔹 What It Shows
A compact corner panel reports four live values:
◇ RESISTANCE — the price of the nearest wall above the current price
◇ DIST. — the percentage distance from current price to that resistance
◇ SUPPORT — the price of the nearest wall below the current price
◇ DIST. — the percentage distance from current price to that support
The distances are computed against the midpoint of each fused block, so the values reflect the consolidated wall, not any single contributing level.
🔹 Why It Helps
The HUD removes the need to visually measure distances to the walls on every bar. It tells you in plain numerical form how far the nearest barriers are in each direction. Useful for stop placement, target placement, and live decision-making where the visual chart is busy with multiple levels.
🔹 Customization
The HUD can be positioned in any of the four chart corners and rendered in any of five font sizes. The display language is controlled by the System Language input.
snapshot
INSTITUTIONAL COLLISION ALERTS
🔹 What Triggers
Two alert types are available:
◇ VWAP Collision — fires when price crosses or touches the daily, weekly, or monthly VWAP within a 0.15% proximity band.
◇ Volume Profile Wall Hit — fires when price crosses or touches the Global POC, VAH, or VAL within the same proximity band.
🔹 How They Fire
Alerts are gated by `barstate.isconfirmed`, which means they only trigger on the close of the bar that touched the level — not intra-bar. This prevents false signals from wicks that get rejected before the bar closes. Each alert uses `alert.freq_once_per_bar`, ensuring no duplicate firings on the same candle.
🔹 alertcondition() Mode
For users who prefer the PulseWire alert UI rather than the `alert()` function call, two `alertcondition` blocks are also exposed: "VWAP Collision" and "Volume Profile Wall Hit". A third dummy `alertcondition` titled "HOW TO SETUP ALERTS (READ)" provides setup guidance in the alert condition menu.
MULTILINGUAL INTERFACE
The indicator supports five languages for the HUD display and alert messages: English (default), Português, Español, Русский, and 中文 (Chinese). Code, comments, and configuration tooltips remain in English regardless of the selected language.
For reference, the English text of all multilingual UI strings used in the HUD and alerts:
◇ (SUPPORT) / (RESISTANCE) — appended to wall labels indicating polarity
◇ RESISTANCE: / SUPPORT: — HUD row labels for nearest walls
◇ DIST.: — HUD row label for distance percentage
◇ VWAP Collision Alert: "🛡️ Price collided with Institutional VWAP. Defense zone active."
◇ Volume Profile Wall Alert: "🧱 Price hit Macro Volume Profile zone (POC/VAH/VAL). Institutional decision imminent."
HOW TO USE
This indicator is not a signal generator. It is a structural map: it tells you where the institutional barriers are, how strong each one is (by weight and fusion), and how far the nearest one is in each direction.
🔹 Reading the Walls
◇ Each line or block on the chart marks an institutional decision zone.
◇ The triangles in the label (▲ or ▼) and their count indicate the polarity and weight of the level.
◇ Walls with multiple triangles in the same direction are stronger reaction points than single-triangle walls.
◇ A block with mixed triangles is a fused confluence — the color shows which side dominates by weight.
🔹 Reading the HUD
◇ The HUD reports the nearest resistance above and nearest support below the current price.
◇ The percentage distances help size stops and targets against the structural barriers rather than against arbitrary fixed values.
🔹 Tactical Reading
◇ Price approaching a heavy multi-triangle wall: zone of elevated structural significance, where multiple institutional horizons coincide.
◇ Price sitting between two close walls of opposite polarity: ranging structure, defined by two opposing barriers of comparable weight.
◇ Price breaking through a heavy wall on confirmed close: structural shift. The wall often inverts polarity on subsequent retests.
◇ VWAP collision alerts: useful as a contextual reference for mean-reversion or trend-continuation analysis.
🔹 Multi-Timeframe Reading
◇ On lower timeframes (1m, 5m, 15m), configure shorter radar timeframes to track intraday institutional flow.
◇ On higher timeframes (1h, 4h, daily), keep the default 15m/1h/4h/D/W configuration to read multi-day and multi-week structural zones.
◇ The Global VWAP and Global POC (marked with 🌎) represent the consensus across all five timeframes — the most structurally significant single reference.
INPUTS EXPLAINED
🔹 System Language
Display language for the HUD and alert messages. Options: English (default), Português, Español, Русский, 中文 (Chinese).
🔹 Radar Timeframes (TF1 to TF5)
Configure each of the five macro periods to scan. Defaults: 15m, 1h, 4h, Daily, Weekly. The shortest timeframe carries weight 1; the longest carries weight 5.
🔹 Show MTF VWAPs (Radar)
Toggle for the Volume-Weighted Average Price extracted from each radar timeframe.
🔹 Show POC Lines
Toggle for the Point of Control lines — the price level with the highest traded volume in each timeframe.
🔹 Show VA Boxes (VAH / VAL)
Toggle for the Value Area High and Value Area Low — the upper and lower boundaries of the 70% volume zone.
🔹 Show SAR Levels
Toggle for the Parabolic SAR levels from each timeframe.
🔹 Fuse Overlapping Walls
Toggle for the confluence merging engine. When enabled, levels from different timeframes that fall within the Wall Merge Margin are consolidated into a single intensified block.
🔹 Wall Merge Margin (%)
Distance threshold to fuse nearby walls. Range 0.01–3.00, default 0.30. Lower values produce separate precise lines; higher values produce consolidated institutional blocks.
🔹 Show Nearest Wall Panel
Toggle for the corner HUD reporting nearest resistance, nearest support, and the percentage distances.
🔹 Panel Position
Position of the HUD on the chart. Four corners available: Top Right (default), Top Left, Bottom Right, Bottom Left.
🔹 Font Size
HUD font size. Options: Tiny, Small (default), Normal, Large, Huge.
🔹 VWAP Collision Alert
Toggle for the alert that fires when price collides with the daily, weekly, or monthly VWAP.
🔹 Volume Profile Wall Alert (POC/VAH/VAL)
Toggle for the alert that fires when price touches the Global POC, VAH, or VAL.
IMPORTANT NOTES
The MGI Walls works on any timeframe. The default radar configuration (15m/1h/4h/D/W) is calibrated for intraday and swing trading on liquid instruments. For position trading or scalping, the radar timeframes can be reconfigured to scan longer or shorter horizons respectively.
The indicator works best on instruments with reliable volume data: crypto perpetual contracts, large-cap equities, futures, major forex pairs. On low-volume instruments, the Volume Profile component becomes less reliable, though the VWAP and SAR components continue to function correctly.
Alerts fire once per confirmed bar. Historical bars never repaint after they close. The live bar updates intra-bar as expected for a real-time indicator.
The Value Area calibration factor (vp_k = 2.51) is tuned to approximate the conventional 70% Value Area definition under volume-weighted standard deviation. It is a calibration constant derived from observation rather than an arbitrary choice.
Pine Script v6. Open-source under Mozilla Public License 2.0.
UNIQUENESS
The MGI Walls is unique in three ways. First, it performs the Volume Profile, VWAP, and SAR extraction across five timeframes simultaneously rather than on the current chart only, surfacing the institutional reference zones that multiple time horizons agree on rather than only those visible on the active timeframe. Second, it weights each level by the structural significance of its parent timeframe — a Weekly POC carries five times the gravitational weight of a 15-minute POC — and the Wall Fusion Engine consolidates levels from different timeframes that fall within a configurable margin into a single intensified block, making multi-horizon confluence zones immediately visible as visually thicker walls. Third, the fused-block coloring reflects the accumulated weight balance of all constituent levels rather than the polarity of the last level to be merged, producing a visual scheme that is internally consistent with the triangle labels (▲ for support, ▼ for resistance) and with the price's current position relative to the block. The combination of multi-timeframe simultaneous extraction, hierarchical weighting with automatic confluence fusion, and balance-driven block coloring produces a structural map that behaves differently from single-timeframe Volume Profile indicators, particularly at price zones where multiple institutional horizons converge and where the strongest reactions tend to occur.
PUBLICATION METADATA (handoff to operator — not part of description)
Title: MGI Walls | Rainbow Matrix
Visibility: Open-source / Public
Category suggestion: Volume-based (primary) — PulseWire's category for Volume Profile / volume-driven indicators
Tag suggestions (TV allows up to 10; pick the 9 most relevant):
- volume-profile
- poc
- value-area
- vwap
- multi-timeframe
- mtf
- confluence
- institutional
- support-resistance
- parabolic-sar (optional, swap for one above if SAR is a key selling point)
License declaration: Mozilla Public License 2.0 (already in script header)
Screenshot slots in the description (5 "snapshot" placeholders):
1. After GENERAL OVERVIEW — wide chart showing the indicator running on BTC or major instrument, with walls visible across multiple TFs
2. After Multi-Timeframe Volume Profile Engine section — chart annotated with POC/VAH/VAL lines from different TFs
3. After Wall Fusion Engine section — close-up of a fused confluence block with mixed triangles (▲▼) and the polarity-balance color clearly visible
4. After Nearest Wall HUD Panel section — HUD close-up showing the 5-row layout with real values
5. (Optional, swap into one of the above slots) — Black Swan-style touch event showing a collision alert firing
Indicator

Liquidity-Anchored Trailing Stop [BigBeluga]Liquidity-Anchored Trailing Stop is a comprehensive volatility and structural framework designed to provide a protective "heatmap" around price action. By fusing multi-layered ATR-based trailing logic with a dynamic Volume Profile, this indicator identifies where market momentum is accelerating and where institutional liquidity is "anchored."
Instead of a single line, this tool provides a graded risk-mitigation zone that adapts to market noise, ensuring you remain in the trend during healthy pullbacks while identifying the exact structural peaks where volume was most concentrated.
🔵 THE DUAL-ENGINE FRAMEWORK
Volatility Heatmap (Trailing Stop): The indicator calculates four distinct levels of trailing protection (Stop 1 through Stop 4). These are anchored to the trend’s direction and volatility, creating a "safety buffer" that narrows or expands based on the Average True Range (ATR).
Trend-Relative Volume Profile (Right Side): Unlike static volume profiles, this engine focuses specifically on the current trend segment. It visualizes the total relative volume transacted at each price bin since the last trend flip, highlighting where the real "meat" of the move occurred.
High Volume Nodes (HVNs): The script automatically detects peaks in the volume distribution. These High Volume Nodes represent structural anchors where the market has spent significant time, serving as high-probability zones for support or resistance.
🔵 CORE ARCHITECTURE
Liquidity Anchoring: By plotting HVN levels (Structural Peaks), the indicator shows you exactly where liquidity is sitting. When a trailing stop aligns with a volume peak, it creates a "Hard Anchor"—a level that is significantly harder for price to break through.
Adaptive Stop Logic: The trailing stops (ts1-ts4) use a ratchet mechanism. In an uptrend, the stops only move up; in a downtrend, they only move down. This prevents the "stop-loss creep" that often leads to giving back profits.
Dynamic Gradient Heatmap: The space between the four trailing bands is filled with a color-coded gradient. Saturated colors represent the core trend, while the outer bands represent the "exhaustion zone" where the trend is at risk of structural failure.
🔵 FEATURES
Granular Profile Rows: Fully adjustable vertical resolution (Profile Rows) allows you to define how detailed you want the volume distribution to be, ranging from broad structural areas to precise price levels.
Peak Level Detection: Horizontal structural lines are automatically drawn across the trend range at major HVNs, providing immediate visual targets and pivot points.
Smart Trend Labels: Clean UI labels (Bull/Bear) mark the exact bar where the trend flips and the volatility bands reset, ensuring you never miss a shift in market regime.
Visual Clarity Toggle: Includes options to show or hide the Volume Profile and Peak Levels, allowing you to use the tool as a pure volatility stop or a full-scale market structure map.
🔵 STRATEGIC APPLICATION
Trailing with the Heatmap: Use the innermost band (Stop 1) for aggressive scalping or tight management, and the outermost band (Stop 4) for macro trend following. If price closes beyond Stop 4, the trend is officially considered "broken."
HVN Confluence: Look for instances where the Trailing Stop aligns with a High Volume Node. These "Anchored Stops" are the most robust areas to place your actual exchange orders, as they are backed by both volatility and historical volume.
Volatility Breakouts: When the ATR bands (Heatmap) contract significantly and then price breaks out, look to the Volume Profile to see if the breakout is supported by a surge in volume at the new price bins.
Targeting Structural Peaks: In a trending market, use the volume peaks on the right side of the chart as natural take-profit targets or areas to expect temporary price stalls.
Liquidity-Anchored Trailing Stop transforms traditional stop-loss logic into a multi-dimensional map of risk and liquidity. By understanding where volume is anchored and how volatility is breathing, you can stay in winning trades longer and exit with precision when the structure finally fails. Indicator

Session Volume Profile - Open Source [CantoLab]Volume Profile is a charting study that displays trading activity over specific time periods at various price levels. It appears as a horizontal histogram on the chart, revealing where traders have shown the most interest based on volume concentration.
This Volume Profile automatically anchors to user-selected timeframes, creating fresh volume analysis for each new period while maintaining clean, systematic visualization of price-volume relationships.
Core Components:
Point of Control (POC): The price level with the highest volume activity during the selected period, marked with a yellow line and left-side label.
Value Area High/Low (VAH/VAL): Price boundaries that contain a specified percentage of the total volume (default 40%), helping identify the main trading range where most activity occurred.
Volume Histogram: Left-aligned bars showing volume distribution across price levels, with value area highlighting for enhanced visual clarity.
Key Features:
- Automatic Period Detection: Supports hourly, daily, weekly, and monthly timeframe anchoring
- Customizable Granularity: Adjustable rows (10-500) for different price resolution needs
- Labels: Clear POC, VAH, and VAL identification positioned at profile start
- Toggle Controls**: Optional display for volume rows, key levels, and background fills
- Clean Visualization: Profiles reset automatically at each new period for current market focus
Display Options:
- Profile Rows: Show/hide the volume histogram bars
- Key Level Lines: Individual controls for POC, VAH, and VAL display
- Value Area Background: Optional shading between VAH and VAL levels
- Color Customization: Separate color controls for all visual elements
The indicator provides systematic volume analysis by creating fresh profiles at regular intervals, helping traders identify significant price levels and volume patterns within their preferred timeframe structure.
Disclaimer: This indicator is for educational and informational purposes only. Trading decisions should be based on comprehensive analysis and proper risk management. Past performance does not guarantee future results. Indicator

Meridian Liquidity Ledger [JOAT]Meridian Liquidity Ledger
Introduction
Meridian Liquidity Ledger is an open-source Pine Script v6 indicator that maps directional liquidity shelves across a rolling price window. It separates buy-side and sell-side volume concentration, ranks shelves by relative participation strength, extends the most relevant levels through the chart, and summarizes the current liquidity ledger in an institutional-style dashboard.
The problem this indicator solves is density. A standard volume profile can show where volume accumulated, but it often does not express directional participation clearly enough for traders who want to know whether the market built more inventory above or below a reference anchor. Meridian Liquidity Ledger addresses that by classifying shelves relative to an adaptive reference price and showing whether each shelf behaves more like a buy shelf or a sell shelf.
The script is intended for traders who think in terms of inventory, acceptance, and liquidity stacking. It does not try to replace execution logic. It provides a map of where volume concentrated across the rolling ledger window, where the point of control sits, how dominant the buy-side and sell-side shares are, and how far price has stretched from the anchor and point of control in ATR terms.
Because the heavy rendering happens only on the last visible bar, the indicator aims to deliver rich visual output without turning into an unreadable chart wall. Historical shelf zones, profile bars, dotted spines, the point of control extension, and the dashboard all work together to make the liquidity map readable rather than overwhelming.
Core Concepts
1. Adaptive Reference Price
At the center of the ledger is a reference engine built from an EMA and a deviation adjustment. The script can use a plain EMA reference or a slight adaptive band depending on the user setting.
float emaRef = ta.ema(close, referenceLength)
float rangeDev = ta.stdev(close, deviationLength) * referenceBias
float synthetic = close >= emaRef ? emaRef - rangeDev * 0.20 : emaRef + rangeDev * 0.20
This reference acts as the ledger divider. Shelves above the reference are treated as sell-side inventory zones. Shelves below the reference are treated as buy-side inventory zones.
2. Rolling Price-Volume Binning
The script scans a configurable lookback window, divides the full price range into bins, and accumulates total, buy-side, and sell-side volume in each bin. This creates the ledger foundation.
Instead of looking only at price touches, the indicator asks where actual traded volume concentrated across the window. That gives each shelf more meaning than a simple horizontal line.
3. Shelf Strength Ranking
Each bin’s relative strength is measured as a percentage of the maximum bin volume in the window. Only shelves above the minimum strength threshold are rendered. That keeps weak background noise from cluttering the chart.
This is important because the point of the ledger is not to show every possible micro shelf. It is to show the shelves that stood out meaningfully within the chosen lookback.
4. Shelf History And Spine Extension
For each active shelf, the script estimates how far left the midpoint price was last crossed, then draws a historical zone, a profile bar on the right, and an optional dotted spine through the shelf midpoint. This creates both historical and forward reference in a single visual package.
The effect is similar to having a compressed split-profile, a shelf map, and a point-of-interest extension all in one indicator.
5. Point Of Control And Ledger Balance
The point of control is the strongest single shelf in the active ledger. The script can extend that level to the right and label it. At the same time, the dashboard tracks buy share, sell share, total imbalance, top-shelf concentration, and ATR distance to both the reference and the point of control.
This makes the ledger useful not just visually but quantitatively.
Features
Directional liquidity shelves: Separates bins into buy-side and sell-side inventory relative to the reference anchor
Adaptive reference engine: Uses EMA and deviation bias to frame the ledger around a contextual central price
Rolling volume ledger: Accumulates total, buy, and sell participation across a user-defined window
Shelf strength filter: Displays only bins strong enough to matter
Historical shelf zones: Shows where active shelves projected through the recent chart history
Profile bars on the right edge: Renders compact shelf bars for immediate strength comparison
Shelf spines: Optional dotted lines extend each shelf midpoint through the chart
Point-of-control extension: Marks and extends the strongest shelf in the current ledger
Institutional dashboard: Displays buy share, sell share, imbalance, POC, concentration, shelf count, and ATR distance metrics
Confirmed-bar alerts: Includes buy dominance, sell dominance, and anchor stretch conditions
Visual Elements
Historical shelf zones: These show where strong bins projected back through the active ledger window
Right-edge profile bars: Compact bars make it easy to compare shelf strength without reading every label
Shelf spines: Optional dotted midpoint lines extend the key shelf levels through the chart
Anchor bands: Inner and outer reference bands help frame whether price is balanced or stretched
POC label and extension: The strongest shelf remains visible as the primary ledger reference
Best Practices
Use the ledger to frame where inventory is concentrated before applying your own execution logic
Watch the relationship between price, the anchor, and the point of control to judge balance versus stretch
Favor shelves that remain visually dominant even as the rolling window updates
Remember that shelf color and position are contextual to the current anchor, not absolute predictions of support or resistance
Use the buy-share and sell-share readings to understand ledger skew before reacting to a single shelf in isolation
Input Parameters
Ledger Window:
Lookback Bars: Sets the rolling history used to build the ledger
Bin Count: Controls the price segmentation granularity
Profile Width: Controls the maximum width of the profile bars on the right
Shelf Padding: Adjusts the spacing between price and the right-edge profile
Reference Engine:
Reference EMA Length: Sets the central EMA anchor
Deviation Length: Controls the standard-deviation calculation for adaptive biasing
Reference Bias: Scales the adaptive offset around the EMA
Use Adaptive Anchor Band: Chooses between the synthetic anchor and plain EMA reference
Shelf Filters And Display:
Minimum Shelf Strength %: Removes shelves below the selected threshold
Show Historical Shelf Zones: Toggles the historical box layer
Extend Point Of Control: Projects the strongest shelf forward
Show Shelf Spines: Enables midpoint extension lines
Show Dashboard: Enables the top-right ledger panel
How to Use This Indicator
Step 1: Start With Buy Share, Sell Share, And Imbalance
The dashboard tells you how the rolling ledger is currently distributed. If buy share dominates, the ledger is skewed below or through the anchor in a way that favors buy-side participation. If sell share dominates, the opposite is true.
Step 2: Locate The Point Of Control
Find the extended POC line. This is the strongest shelf in the current window. It often acts as the most important reference price when judging whether the market is balanced, stretched, or returning to its highest concentration zone.
Step 3: Compare Price To The Reference Anchor
The reference and its surrounding bands tell you whether price is trading above, below, or far away from the ledger center. This is useful for deciding whether the market is exploring beyond inventory or still trading within its main concentration zone.
Step 4: Focus On The Strongest Shelves
The most useful shelves are usually the ones with the greatest width, clearest labels, and strongest color intensity. Those are the bins where the rolling window concentrated the most inventory.
Step 5: Use The Ledger As A Context Map
Meridian Liquidity Ledger is best used as a map of where liquidity stacked and how it is distributed. Pair it with your own entry logic rather than treating any single shelf as an automatic trade signal.
Indicator Limitations
The ledger is rolling-window dependent, so shelf hierarchy can change as older bars leave the calculation window
A strong shelf does not guarantee support or resistance will hold on the next interaction
Directional buy and sell classification is based on bar-level bullish versus bearish volume attribution, which is an approximation rather than true order-flow data
On illiquid symbols or very small windows, shelf concentration can become unstable and less informative
Originality Statement
Meridian Liquidity Ledger is original in the way it turns a rolling bin-based volume map into a directional liquidity shelf system with adaptive anchoring. It is not a generic profile overlay:
It separates buy-side and sell-side participation relative to an adaptive reference rather than showing only total profile mass
It combines historical shelf zones, right-edge shelf bars, shelf spines, and POC extension in one integrated view
It frames liquidity through dashboard metrics such as imbalance, concentration, and ATR stretch rather than pure histogram display
It creates a practical shelf map for context instead of relying on a single profile style or one static reference
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Liquidity shelves and point-of-control levels are descriptive references built from rolling historical data. They do not guarantee future support, resistance, or directional continuation. Always use independent judgment and proper risk management.
-Made with passion by jackofalltrades
Indicator

Luxy BOSS MODE - Support & ResistanceBOSS MODE S/R is a comprehensive Support & Resistance system that detects, scores, and learns from every zone reaction — then automatically generates trade plans with entry, stop, target, and position size.
Unlike traditional S/R indicators that simply draw lines, BOSS MODE combines 6 detection engines , an adaptive scoring algorithm , a real-time momentum classifier powered by the Luxy Energy Index, and a Trade Plan Generator that calculates exact risk parameters based on your account.
── WHAT MAKES IT DIFFERENT ──
1. Adaptive Weight Scoring
Every zone is scored 0-100 based on 7 factors: volume at touch, higher-timeframe origin, confluence with other zones, freshness, touch count, regime alignment, and historical performance. After 20+ observed zone outcomes (first bounce or first break per zone), the system adjusts its scoring weights based on which factors correlated with bounces vs breaks on that specific chart and asset.
2. LEI-Powered Momentum Classifier
Uses the Luxy Energy Index (Extension + Velocity + Volume exhaustion model) to classify each approaching zone as likely BOUNCE or BREAK . LEI ≥ 70 = exhausted move arriving at zone = bounce expected. LEI ≤ 30 = energized move = break risk.
3. Trade Plan Generator
For qualifying setups (Grade A/B zone, regime-aligned, R:R above your minimum), the indicator auto-calculates:
Entry — just beyond zone boundary
Stop Loss — opposite side of zone + ATR buffer
Target — nearest zone in trade direction
Position Size — based on your account size and risk %
R:R ratio — only shows when above your minimum
4. Per-Zone Intelligence
Every zone tracks its own history: how many times it bounced vs broke, average bounce distance in ATR units, and hold rate. Labels show this inline: ⬆ SUPPORT 📐 82 5/7 +0.4ᴬ = score 82, held 5 of 7 tests, avg distance from zone mid at touch: 0.4 ATR.
── 6 DETECTION ENGINES ──
📐 Swing Pivots — Classical swing highs/lows on current, Daily, and Weekly timeframes
🧱 Order Blocks — Last candle before a strong impulsive move, confirmed by volume
📊 Volume POC — Highest-volume price cluster over lookback period
💨 Fair Value Gaps — 3-candle imbalances where price left unfilled ranges
💧 Liquidity Pools — Equal high/low clusters where stops accumulate
⚓ Anchored VWAP — Auto-anchors on gap+volume events (earnings, catalysts)
All 6 sources feed into the same unified zone object, allowing true confluence scoring across methodologies.
── REGIME-AWARE SCORING ──
The market regime (STRONG_BULL / WEAK_BULL / RANGE / WEAK_BEAR / STRONG_BEAR / SQUEEZE) drives the scoring bias. In a bullish regime, support zones receive a significant score bonus while resistance zones score lower — reflecting the statistical reality that zones aligned with the trend hold more reliably.
Regime is calculated from ADX + Bollinger Band Width + EMA slope, giving 5 states plus a Squeeze override when volatility compresses to the bottom 10% of the last 100 bars.
── VISUAL SYSTEM ──
Zones are rendered with a 4-layer heat-map system:
Atmospheric halo — fades beyond zone boundaries, scales with score
Main fill — neon color: cyan family for support, red/orange for resistance, intensity proportional to score
Hot core strip — brighter inner band at zone midpoint
Entry line — solid bright stripe at the price-contact edge (top for support, bottom for resistance)
Grade-A pulse ring — glowing outline when a high-conviction zone is within 1.5 ATR of price
Score bar — vertical progress bar to the right of each zone, height = score 0-100
Simple View : A separate layer draws just two clear boxes — nearest SUPPORT (green) and nearest RESISTANCE (red) — with text centered inside. Designed for traders who want instant visual clarity without analyzing all zones.
── TRADE PLAN GENERATOR ──
Configure in the 💰 Trade Plan settings group:
Account Size ($) — your total trading capital
Risk per Trade (%) — standard is 1.0% per trade
Min R:R to Show — only displays setups where the calculated reward exceeds this multiple of risk
When a qualifying setup is found, three dashed lines appear on the chart (blue = entry, red = stop, green = target) with a summary label showing direction, prices, share count, and R:R ratio. The Dashboard shows it in the 💰 Active Setup row. An alert fires with the full trade plan.
Important: The Trade Plan Generator identifies setups based on zone proximity and regime alignment. All trade decisions remain entirely the responsibility of the user. Past zone reactions do not guarantee future performance. Always apply your own analysis and risk management.
── DASHBOARD (14 rows) ──
The information panel shows in real-time:
Market Regime with color coding
Asset Class / Session (PRE/RTH/AH for stocks)
Active zones breakdown (0A/1B/3C format)
Nearest Resistance price, grade, ATR distance
Nearest Support price, grade, ATR distance
ATR% Rank (volatility context)
Active Warning (8 types, color-coded by severity)
Anchored VWAP value and anchor reason
Squeeze detector
Zone Hit Rate (historical bounce %)
Active Detection Sources
Scenario suggestion
Adaptive Weights status
Active Trade Plan (Entry / Stop / Target / Shares / R:R)
Every cell has a detailed tooltip explaining what the value means and how to use it.
── MULTI-ASSET SUPPORT ──
The asset engine auto-detects chart type and adjusts accordingly:
Stocks — ATR-based zones, session-aware (PRE/RTH/AH)
Stocks under $1 — percent-based zone widths (ATR is unreliable for extreme low-price securities)
Crypto — 24/7, percent bands, no session breaks
Forex — pip-based zone widths
Indices — volume-agnostic fallback
Futures — rollover-aware
── SETTINGS OVERVIEW ──
🎯 Trading Mode — Scalp / Intraday / Swing (affects zone widths and sensitivity)
🧭 Regime Classifier — ADX, BB, and EMA periods
🎯 Zone Detection — Toggle each of the 6 engines independently
📐 Swing Pivots — Left/right lookback bars and zone width
🧱 Order Blocks — Lookback period, minimum move %, volume threshold
📊 Volume POC — Lookback bars and histogram bins
💨 Fair Value Gaps — Minimum gap size %
💧 Liquidity Pools — Lookback and touch tolerance %
⚓ Anchored VWAP — Auto-anchor thresholds and manual catalyst date
⚖️ Scoring — Individual weight controls for all 7 scoring factors
🌍 Asset-Class Adaptation — Override or force Sub-$5 mode
🚨 Warnings — Toggle each of 8 warning types with ATR distance control
🎨 Visual Settings — Top-N zones, adaptive hide, transparency, Simple View toggle
📊 Dashboard — Position, size, show/hide
💰 Trade Plan — Account size, risk %, minimum R:R
🔔 Alerts — Standard or structured JSON for webhook automation
── ALERTS ──
8 alert types:
Any Warning (catch-all)
Sweep Imminent
Regime Shift near Grade-A zone
Trap Suspected (low-volume false breakout)
Zone Approach
Squeeze Detected
Trade Plan — LONG Setup
Trade Plan — SHORT Setup
Enable Structured JSON Alerts to receive webhook-ready payloads with full zone data, regime, warning type, and trade plan details.
── EXTERNAL LIBRARY ──
This script imports Luxy Energy Index (LEI) by OrenLuxy for the momentum classifier. LEI measures move exhaustion using Extension from VWAP, Velocity (5-bar rate of change), and Volume as a modifier.
── IMPORTANT NOTES ──
This indicator is for educational and analytical purposes only . It does not constitute financial advice.
Past zone performance (hit rate, average bounce) does not guarantee future results.
The Trade Plan Generator calculates position sizes mathematically based on user inputs — always verify sizing with your broker before placing orders.
Adaptive weights require 20+ observed bounce/break events to activate. On new charts, base weights are used.
The LEI library requires separate import — the indicator will prompt if not accessible.
── CREDITS ──
Luxy Energy Index (LEI) — OrenLuxy. Exhaustion methodology drawing on academic research by Campbell-Grossman-Wang (1993) on volume-return relationships, ATR normalization by J. Welles Wilder Jr., and standard VWAP methodology.
S/R concepts inspired by VSA (Volume Spread Analysis), SMC (Smart Money Concepts), and classical pivot point theory.
Past performance does not predict future results. This tool is for informational purposes only and does not constitute investment advice. Trading involves substantial risk of loss.
Indicator

Northsea Auction Map [JOAT]Northsea Auction Map
Introduction
Northsea Auction Map is an open-source auction-style overlay that builds a rolling or session-anchored profile directly on the chart. It estimates where business has been conducted, where value is concentrated, where activity is thin, and how price is positioned relative to that structure.
The problem this script solves is that directional tools alone do not explain where the market is accepting price and where it is rejecting price. Auction context is useful because trend and reversal behavior both depend on where price is trading relative to value. Northsea uses a configurable anchor, builds a profile histogram, derives value area and point of control, approximates delta bias, and summarizes that information in a clean on-chart framework.
Core Concepts
1. Session or Rolling Anchoring
The script can build its auction map from a live session anchor or from a fixed rolling window. That allows it to serve both intraday session analysis and broader window-based contextual analysis. Session anchoring can use exchange-aware timing or an explicit timezone selection so the profile starts from the intended session definition.
2. Profile Row Construction
The chosen anchor range is divided into configurable price rows. Each eligible bar contributes volume into those rows, producing a simplified volume-at-price map. The widest concentration becomes the point of control, while the surrounding rows are expanded outward until the configured percentage of activity defines the value area.
3. Point of Control and Value Area
Northsea calculates:
POC: the highest-activity row
VAH: the upper boundary of the selected value area
VAL: the lower boundary of the selected value area
These levels are drawn forward on the chart so users can quickly see whether price is trading inside accepted value or outside it.
4. Delta Bias and Node Logic
The script derives a directional participation proxy and combines it with profile concentration to estimate whether the current map leans more bid-dominant, offer-dominant, or balanced. It also classifies high-value nodes and low-value nodes using row-level z-score logic so pockets of acceptance and low-participation gaps stand out.
5. Anchored VWAP and Range Context
An anchored VWAP and session range lines are drawn alongside the profile. This gives the user both price-distribution context and mean-location context in the same overlay.
Features
Two anchoring modes: Session Anchor and Rolling Window
Flexible session timezone handling: Supports exchange-aware or explicit timezone session anchoring
Configurable profile density: Adjustable lookback, row count, width, and offset
POC and value area: Automatically derived and extended on the chart
HVN and LVN identification: Highlights acceptance nodes and thin areas
Anchored VWAP: Adds a fair-value style reference line
Session range guides: High, low, and midpoint lines
Delta bias proxy: Adds directional auction context
Dashboard summary: Anchor bars, range, POC/VWAP, value area, delta bias, location, and balance metrics
Input Parameters
Anchoring:
Anchor Mode
Session Window
Session Timezone
Profile Lookback
Profile Rows
Value Area Percentage
Layout:
Right Offset
Profile Width
Session Range toggle
Anchored VWAP toggle
Profile Labels toggle
Node Summary toggle
Node Logic:
High-Value Node Z
Low-Value Node Z
Node Transparency
POC Highlight toggle
Value Area Highlight toggle
How to Use This Indicator
Step 1: Locate Price Relative to Value
If price is trading inside the value area, the market is operating near accepted value. If price is outside value and not returning quickly, the market may be discovering a new area.
Step 2: Compare POC With VWAP
The relationship between POC and anchored VWAP can help show whether the bulk of business and the weighted mean price are clustered together or diverging.
Step 3: Watch HVNs and LVNs
High-value nodes often behave like acceptance shelves. Low-value nodes often behave like traversal zones where price moves more quickly. These are not guaranteed reactions, but they are useful structural references.
Step 4: Use the Delta Bias as Context, Not Certainty
The delta bias proxy helps describe whether the current map is leaning more bid-side or offer-side. It should be read as auction context rather than treated as direct order-book truth.
Indicator Limitations
The script approximates auction structure from bar data and does not reconstruct true exchange-level volume at every traded price
Profile interpretation depends on the selected anchor; different anchors can produce different maps
Thinly traded instruments may generate unstable row distributions
Node thresholds are model-based and may require tuning by instrument
Originality Statement
Northsea Auction Map is original in the way it combines anchored profiling, value-area construction, node classification, delta bias estimation, and anchored VWAP into one restrained overlay. The goal is not to duplicate a platform-native profile panel, but to provide a configurable auction context tool that can travel with the chart and integrate directly with other analytical layers.
Disclaimer
This script is provided for educational and informational purposes only. It is not financial advice. Profile levels and node classifications are derived from historical bar data and model assumptions, so they can differ from full exchange or footprint tools. Use independent judgment and risk management.
Indicator

Value Shift Ladder [AGPro Series]Value Shift Ladder
🔹 Overview
Value Shift Ladder is a market-structure mapping tool that extracts the most volume-accepted price shelves from a rolling lookback window and arranges them, in creation order, as the rungs of a ladder. Each rung is a volume-weighted zone where the market has recently spent the most time and traded the most contracts. The script then tracks how price interacts with every rung through a full Held → Broken → Reclaimed lifecycle and summarizes the entire chain into one readable ladder state: Rising, Falling, Mixed, Broken, Reclaiming, Building, or Neutral.
The goal is not to predict direction and not to produce buy or sell signals. The goal is to give the chart reader a continuously updated answer to one question: where is the market's current fair-value region, how is that region moving over time, and which prior value shelves are still relevant versus which have been abandoned. This makes the tool useful as a structural reference for volume-profile readers, auction-theory traders, and anyone who builds a bias from accepted-value migration rather than from trend lines or moving averages.
🔸 Unique Edge
Most volume-based tools either draw a single static profile snapshot, or plot every candidate level and leave the reader to filter. Value Shift Ladder does three things differently:
Multi-shelf chronological ladder. Instead of producing one value band, the script maintains a ranked set of up to eight volume-accepted shelves and arranges them in the order they were first registered. This preserves the migration history of accepted value instead of collapsing it into one average.
Proximity-gated visualization. Only shelves within a configurable ATR distance from current price are drawn on the chart, counted in the panel, and fed into the ladder direction state. Distant historical shelves exist in memory but do not clutter the chart or bias the readout — the ladder always reflects the value structure that is actually relevant to the current bar.
Adaptive, confidence-aware breaks. A shelf is not broken on a single close outside its band. Young shelves are strongly protected (3.0 × ATR), maturing shelves require a medium distance (1.5 × ATR), and fully-aged shelves use the user-defined break distance. Shelves that have been re-confirmed multiple times gain a 2× confidence multiplier on top of that, preventing established value regions from being lost to a single volatility spike.
🔸 Methodology
1) Volume Profile Construction
The script divides the rolling lookback window into equal price bins and distributes each bar's volume across every bin it touches, proportional to range coverage. Zero-range bars are assigned to their single bin. This produces a volume-weighted histogram of the lookback period.
2) Shelf Extraction
The top-K bins by volume are selected iteratively. After each pick, the chosen bin and its ATR-neighborhood are zeroed out before the next pick, enforcing a minimum separation between shelves and preventing a single high-volume cluster from dominating every rung. Each surviving bin becomes a shelf, anchored at its bin-center price.
3) Shelf Merging and Confidence
On every refresh, newly extracted shelves are checked against existing ones. If a new shelf falls within the ATR separation of an existing non-broken shelf, the existing shelf's volume is refreshed and its confidence score is incremented. Otherwise a new shelf is registered. Confidence is capped at ten and used downstream to scale break tolerance.
4) Lifecycle State Machine
Each shelf carries one of three states — Held, Broken, or Reclaimed. Held flips to Broken when price closes beyond an adaptive break distance for three recent bars. Broken flips to Reclaimed when price dwells back inside the band for a user-defined number of bars. Reclaimed auto-promotes to Held once the shelf has stabilized past a short age threshold.
5) Ladder Direction
Proximity-filtered active shelves are sorted by creation order. The last one, two, or three rungs are compared to produce a single state: Rising if the sequence is monotonically higher, Falling if lower, Mixed if non-monotonic, plus transient overrides for Broken, Reclaiming, Building, or Neutral conditions.
6) Pruning
Stale broken shelves expire after a timeframe-aware window. A hard cap of ten active shelves is enforced, with broken shelves removed first when the cap is hit.
🔹 Signals and Alerts
The script provides four deterministic state-change alerts, all tied to closed-bar transitions:
— New Ladder Step Formed: fires when a new volume-accepted shelf is first registered.
— Ladder Step Held: fires when an existing shelf is re-confirmed by the rolling profile.
— Ladder Step Broken: fires when a held shelf transitions to broken.
— Ladder Step Reclaimed: fires when a broken shelf transitions back to reclaimed.
These alerts describe structural state changes inside the indicator logic. They are not trade signals and do not imply expected profitability, win rate, or directional certainty.
🔸 Key Inputs
— Profile Mode (Auto / Manual): Auto derives lookback and refresh from the chart timeframe. Manual exposes both for full control.
— Manual Lookback (bars): Size of the rolling window used to build the profile.
— Manual Refresh Interval (bars): How often the profile is rebuilt.
— Profile Resolution (bins): Number of price bins the range is divided into.
— Target Shelf Count: Maximum number of shelves kept active.
— Min Volume Ratio: Minimum fraction of the top-bin volume a bin must hold to qualify as a shelf.
— Min Shelf Separation (ATR): Minimum ATR distance between two shelves.
— Break Distance (ATR): Fully-aged break tolerance.
— Reclaim Dwell Bars: Bars needed inside the band to flip Broken to Reclaimed.
— Max Visible Distance (ATR): Proximity gate for drawing and counting shelves.
— Display options: panel position, panel font size, on-chart label size, alerts toggle.
🔹 How to Use
Value Shift Ladder is designed as a structural reference rather than a signal engine. Typical reading workflows include:
— Bias framing. Read the Ladder state first. Rising or Falling indicates a one-sided migration of accepted value; Mixed indicates balance; Broken or Reclaiming highlights an active transition.
— Dominant reference. The Dominant row in the panel highlights the nearest held or reclaimed shelf within two ATR of price. Use it as the closest structural reference for scenario planning, not as an execution level.
— Proximity discipline. Because shelves more than the configured ATR distance away are not drawn, the ladder always reflects value structure that is currently relevant. When no shelves are visible, the market is between value regions — a context in which mean-reversion assumptions weaken.
— Confluence. The tool is designed to be combined with independent confirmation such as session structure, higher-timeframe bias, or volume analysis. It is not meant to stand alone as a decision source.
🔸 Limitations and Transparency
— Volume profile quality depends on the instrument's volume reporting. On symbols with unreliable or synthetic volume, shelf placement may drift.
— The profile is recomputed on the close of refresh bars. Intrabar readings on the current bar can change until the bar closes; state transitions evaluate the last three bars for breaks and the reclaim-dwell window for reclaims, so fresh transitions can flip until those bars close.
— On extremely illiquid sessions or instruments with frequent volatility spikes, the adaptive-break logic can delay transitions by design. This is a tradeoff in favor of stability.
— Past structural behavior at a shelf does not guarantee future behavior. The tool does not forecast direction and is not a trading strategy.
🔹 Risk Disclosure
This script is a structural visualization tool provided for educational and analytical purposes. It is not financial advice, not a trading strategy, and not a signal service. All trading involves risk of loss. Past market behavior is not indicative of future results. Users are fully responsible for their own trading decisions and for independently verifying the tool's behavior on their chosen instruments and timeframes before relying on it for any purpose. Indicator

Volume Shelf Reaction Map [AGPro Series]Volume Shelf Reaction Map
🔷 OVERVIEW
Volume Shelf Reaction Map is a structural price-action tool that identifies horizontal zones where volume has historically stacked — "volume shelves" — and classifies, in real time, how price reacts each time it returns to them. Instead of showing a static S/R line, it answers a sharper question: when price revisits this level, does it hold, get reclaimed, get rejected, or lose the level entirely? Fresh shelves (never revisited) are visually separated from reused ones, so the chart communicates not just where the levels are, but which ones still carry unused participation behind them.
🧭 UNIQUE EDGE
Most support/resistance and volume tools stop at drawing a zone. This script adds a reaction-state layer on top of shelf detection:
• Five reaction states per shelf: TOUCH, HELD, RECL (reclaimed), REJ (rejected), LOST
• Fresh vs Reused classification — shelves that have already been tested at least once are faded, so untouched structural levels stand out immediately
• Sticky state logic — a shelf keeps its reaction color until a new transition actually occurs, preventing flicker between bars
• Passive-window coloring — shelves whose last reaction is older than the user-defined active window fade to the neutral accent color, keeping old/stale levels visible without dominating the chart
• Strongest-shelf-only reaction tags with cooldown — reaction labels are printed only for the highest-strength shelf and only on actual state transitions, producing a clean chart even on long histories
The result is a volume-aware reaction map rather than a crowded S/R overlay.
🧪 METHODOLOGY
1. Pivot detection — standard pivot highs and lows over a configurable pivot length act as shelf candidates.
2. Volume qualification — each pivot bar is checked against a rolling 20-bar volume average; bars above the Volume Filter multiplier contribute extra weight to shelf strength.
3. ATR-based clustering — candidates within a configurable ATR multiple of an existing shelf are merged using a touches-weighted mean price, stabilizing the shelf location as evidence accumulates.
4. Confirmation — a shelf must reach the Minimum Touches threshold before it is rendered; weak candidates are pruned after one-third of the lookback window.
5. State machine — on every confirmed bar, a shelf's reaction is updated against the prior close's side (support vs resistance context), using an ATR-scaled buffer to distinguish genuine holds and losses from noise.
6. Ranking and rendering — on the last bar, shelves are sorted by strength; only the top N are drawn, with fresh shelves rendered solid and reused shelves rendered thinner and faded.
🔔 SIGNALS & ALERTS
Three alert types, each debounced per shelf so the same state cannot spam consecutive bars:
• Shelf Touched — price range intersects a confirmed shelf for the first time since its last transition
• Shelf Respected — price HELDs, RECLs, or REJs at a shelf (reaction in favor of the shelf)
• Shelf Lost — price closes through a shelf with the required ATR buffer
Reaction tags on the chart (HELD / RECL / REJ / LOST) are printed only for the strongest shelf and only on a true state transition, with a user-adjustable cooldown for historical cleanliness.
⚙️ KEY INPUTS
Shelf Detection
• Lookback Window (bars) — how far back the pivot scan reaches
• Pivot Strength — bars required on each side of a pivot
• Cluster Distance (x ATR) — how tightly nearby pivots merge
• Minimum Touches — confirmation threshold
Filters & Cleanup
• Volume Filter (x average) — participation threshold for strength weighting
• Show Fresh Shelves Only — hide already-revisited shelves
• Max Shelves to Display — cap visible shelves for chart cleanliness
• Fade Reused Shelves — dim reused shelves so fresh ones stand out
• Reaction Sensitivity (x ATR) — ATR buffer used by the state machine
• Active Window (bars) — how recently a reaction must have occurred to show in full color
Visuals
• Label & Panel Size — Tiny / Small / Normal / Large (default: Normal)
• Show Reaction Tags — toggle on-chart state labels
• Tag Cooldown (bars) — minimum bars between tags on the same shelf
Panel
• Show Info Panel, Panel Location (6 anchors), Panel Theme (Dark / Light)
Alerts
• Shelf Touched, Shelf Respected, Shelf Lost
🧰 HOW TO USE
1. Add the indicator to any liquid symbol and timeframe. Volume-aware markets (crypto, index futures, major FX) and timeframes from 15m upward tend to produce the most structured shelves.
2. Start with defaults. The Active Window of 30 bars is a reasonable middle-ground; reduce it on intraday charts (around 20) or raise it on daily/weekly (30–60).
3. Read the panel:
• Active Shelves — how many of the eligible shelves are currently drawn
• Strongest Shelf — the top-ranked shelf by strength
• Current State — live reaction state of the top shelf
• Fresh / Reused — how the displayed shelves split between untested and already-tested levels
4. Use fresh shelves as higher-quality reaction candidates; treat reused shelves as context, not primary triggers.
5. Combine the HELD / RECL / REJ / LOST reactions with your own trigger logic (e.g. break-retest, liquidity sweeps, momentum shifts). This script is a location and reaction tool — not a standalone trade system.
🧱 LIMITATIONS & TRANSPARENCY
• This indicator describes historical structure and live reactions; it does not forecast price direction.
• Pivot-based detection requires the Pivot Strength window to complete on both sides, so fresh pivots appear with a natural lag equal to the pivot length.
• On very low-volume symbols or illiquid timeframes, shelves may be sparse or unstable.
• The state machine is bar-close based; intrabar wicks can temporarily intersect a shelf without changing its state until the bar confirms.
• Max drawing limits (max_lines_count, max_labels_count, max_boxes_count) are set to 120; extremely long histories combined with large lookbacks may drop the oldest drawings.
⚠️ RISK DISCLOSURE
This script is provided for educational and analytical purposes only. It is not a strategy, not a buy/sell signal generator, and not financial advice. Trading involves substantial risk of loss. Past behavior of levels, volume, or reactions does not guarantee future outcomes. Always apply your own risk management, position sizing, and independent judgment. The author and AGProLabs accept no responsibility for decisions made based on this indicator. Indicator

Adaptive Volume Concentration Levels + Volume-Price Shift BoxDescription
Adaptive Volume Concentration Levels + Volume-Price Shift Box combines two powerful market analysis concepts into one streamlined tool: adaptive volume-based support and resistance mapping, and a real-time volume-price flow dashboard.
The script identifies the most meaningful price zones based on where volume has concentrated over a chosen lookback range, helping highlight areas where the market has shown strong interest. At the same time, it displays a compact shift box that evaluates price, volume, VWAP, OBV, A/D behavior, and momentum to estimate whether market pressure is currently bullish, bearish, or neutral.
This makes the script useful for traders who want both structural levels and contextual order-flow style bias in a single indicator.
How It Works
The script has two main components:
-Adaptive Volume Concentration Levels
It scans historical price action over a customizable lookback period.
Price is divided into bins, and volume is accumulated into those bins.
The script then selects the highest-volume zones and converts them into horizontal support/resistance levels.
A higher timeframe option and smoothing feature can be used to reduce noise and reveal more stable levels.
Levels can be displayed with custom colors, line styles, transparency, and optional percentage labels.
- Volume-Price Shift Box
The dashboard evaluates several internal conditions:
VWAP trend and price distance from VWAP
OBV trend and OBV acceleration
A/D line trend
Relative volume versus average volume
Price momentum
Weighted bullish and bearish scores are calculated from these components.
The final shift score determines whether the current state is:
Bullish
Bearish
Neutral
The box then displays key readings such as shift strength, volume vs average, VWAP distance, shift duration, and OBV state.
Key Features
Adaptive volume-based support and resistance detection
Dual SR logic for identifying important high-volume price zones
Optional higher timeframe processing for cleaner structure
Price smoothing to reduce noise in level calculation
Customizable level count, bin density, transparency, labels, and styling
Real-time shift box with bullish, bearish, or neutral bias
Weighted scoring model using VWAP, OBV, A/D, volume, and momentum
Shift strength readout for quick bias confirmation
Shift duration tracking to show how long the current condition has persisted
Clean visual layout that combines structure and flow into one script
How to Use
Start by applying the indicator to your chart and adjusting the level settings based on your trading style.
For the volume concentration levels:
Increase the lookback if you want broader, more established levels.
Increase the number of bins for finer price granularity.
Use the minimum volume filter to remove weaker levels.
Turn on the higher timeframe option if you want more stable zones from a broader market perspective.
For the shift box:
Use the default settings first, then adjust sensitivity and component weights to better match your market and timeframe.
Watch for bullish or bearish shifts when price approaches one of the plotted volume levels.
Use the strength reading to judge whether the bias is weak or decisive.
Monitor duration to see whether the current directional pressure is fresh or extended.
A practical workflow is:
Use the horizontal levels as reaction zones
Use the box to judge whether current pressure supports continuation or rejection from those zones
Combine both with your existing entry and risk management rules
How It Helps
How It Helps
This script helps simplify decision-making by combining where price is likely to react with how price and volume are behaving right now.
The volume concentration levels help traders identify:
likely support and resistance
potential reaction zones
areas of prior market agreement or interest
The shift box helps traders evaluate:
whether buyers or sellers currently have control
whether momentum and volume are aligned
whether market pressure is strengthening or fading
Used together, the tool can help with:
trade location
directional confirmation
filtering weak setups
improving timing around important price zones
It is especially useful for traders who want a clearer view of both market structure and current flow conditions without cluttering the chart with multiple separate indicators.
Disclaimer
This indicator is provided for informational and educational purposes only. It does not constitute financial advice, investment advice, trading recommendations, or an offer or solicitation to buy or sell any financial instrument.
All indicator outputs, classifications (including bullish, bearish, or neutral states), and visual elements are derived from historical market data using user-defined parameters. These outputs are interpretive in nature and do not predict future market performance or guarantee any specific result.
Trading financial instruments involves substantial risk, including the risk of loss exceeding initial capital. Market conditions may change rapidly due to factors outside the scope of this indicator, including but not limited to economic events, news releases, liquidity conditions, execution quality, and slippage.
The developer assumes no responsibility or liability for any trading decisions, losses, or damages arising directly or indirectly from the use of this indicator. Users are solely responsible for evaluating the suitability of this tool for their own trading objectives, risk tolerance, and market conditions.
Past performance, indicator behavior, or historical alignment of signals does not guarantee future results. Use of this indicator constitutes acceptance of these terms.
Indicator

Auction Intelligence█ AUCTION INTELLIGENCE
Auction Market Theory Overlay
An Auction Market Theory (AMT) overlay that analyzes market structure through volume profile analysis. It detects profile shape (D/P/b/DD), identifies balance vs. imbalance states, and tracks value migration — giving you the same auction-based framework used by institutional traders to understand market behavior.
Free and Open Source.
█ THE CONCEPT: WHY AUCTION MARKET THEORY MATTERS
Standard indicators tell you what happened. AMT tells you why . Markets are continuous two-sided auctions where buyers and sellers negotiate fair value:
Balance — Price rotates within an accepted value area. Expect mean-reversion and range-bound trading.
Imbalance — Price breaks away from the value area. One side dominates. Expect continuation.
Profile Shape — The distribution of volume tells you who is in control and what to expect next.
Value Migration — The direction where the POC and Value Area are shifting reveals the underlying trend.
█ CORE FEATURES
1. Volume Profile Engine
Distributes each bar's volume proportionally across price rows, building a volume-at-price distribution:
POC (Point of Control) — Highest volume row = strongest S/R level
VAH (Value Area High) — Upper boundary of the 70% value area = resistance
VAL (Value Area Low) — Lower boundary of the 70% value area = support
2. Profile Shape Detection
Automatically classifies the volume distribution into four distinct shapes:
D-shape — Balanced. Volume evenly distributed, POC near center. Expect rotation.
P-shape — Bullish. Volume concentrated in upper half. Buyers in control.
b-shape — Bearish. Volume concentrated in lower half. Sellers in control.
DD (Double Distribution) — Two distinct volume clusters. Market transitioning between value areas.
3. Balance vs. Imbalance Recognition
Three-factor analysis combining price position, VA width dynamics, and trend strength. The chart background colors automatically when imbalance is detected (cyan = bullish discovery, red = bearish discovery).
4. Value Migration Tracker
Monitors how the POC and Value Area midpoint shift over time:
Bullish Migration ▲ — POC and VA migrating higher = institutional buying
Bearish Migration ▼ — POC and VA migrating lower = institutional selling
Neutral ─ — No significant migration = consolidation
█ AUTO-TIMEFRAME ADAPTATION
All parameters automatically adjust based on the chart timeframe:
1-5 min → Lookback 30, 18 Rows, Migration Len 5
15-30 min → Lookback 40, 20 Rows, Migration Len 8
1 Hour → Lookback 50, 24 Rows, Migration Len 10
4 Hour → Lookback 70, 28 Rows, Migration Len 15
Daily → Lookback 100, 32 Rows, Migration Len 20
Weekly+ → Lookback 150, 40 Rows, Migration Len 30
Disable Auto-TF to use manual settings for full control.
█ DASHBOARD
A compact, dark-themed info panel displaying:
State — Current AMT state (BALANCE / IMBALANCE) with context
Shape — Detected profile shape (D / P / b / DD) with description
Migration — Value migration direction and strength
Position — Current price position relative to Value Area
POC / VAH / VAL — Key volume-based levels
█ ALERTS (4 CONDITIONS)
Balance → Imbalance — Market leaving the value area
Imbalance → Balance — Market returning to the value area
Profile Shape Changed — Volume distribution pattern shift
Value Migration Shift — Directional bias change in POC/VA migration
█ PRO VERSION
The PRO version (Auction Intelligence PRO v2.0) adds:
Initial Balance Range — IB Tracking + IB Extension Detection
Failed Auction Detection — VA Breakout Failures
Excess & Poor High/Low — Wick analysis at session extremes
Auction Rotation Factor — POC-cross frequency as market efficiency measure
Day Type Classification — Trend/Normal/Normal Var./Neutral/Double Dist. (Dalton)
Previous Day Value Area — PDPOC/PDVAH/PDVAL as reference levels
Enhanced Confluence Score — 0-12 scale with A+ to D grading
13 Alert Conditions
█ NON-REPAINTING
The volume profile is calculated from confirmed bar data only. The rolling lookback window recalculates on each confirmed bar using historical high/low/volume — no future data is used. No repainting.
█ WORKS ON
Crypto, Forex, Stocks, Futures, Indices — any timeframe from 1 minute to Monthly.
█ DISCLAIMER
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always do your own research and manage your risk. Past performance does not guarantee future results. Trading involves substantial risk of loss.
Indicator

NBSG_DayTradingSuiteAn all-in-one day trading overlay designed by a futures trader for futures traders. It consolidates the key levels, anchored VWAPs, session volume profiles, and structural references that intraday traders typically spread across 3-5 separate indicators into a single, configurable script.
Built and defaulted for CME futures (ES, MES, NQ, MNQ, and similar instruments), but the session times are fully adjustable in settings. Traders on equities, crypto, or forex can adapt the indicator to their instrument by configuring the session windows to match their market's electronic trading hours.
The default session times are set for a trader operating in US Central Time (Chicago time). If you trade in a different timezone, adjust the session inputs accordingly.
This indicator is not a signal generator. It plots structure so you can make your own decisions.
FEATURES
Multiple Anchored VWAPs
The indicator plots two independent session-anchored VWAPs, each with optional standard deviation bands:
Overnight VWAP (VWAP 1) anchors at 17:00 CT (CME session open) and accumulates across the entire futures trading day through 16:00 CT. It resets cleanly each session. Optional 1SD and 2SD bands with fill show the statistical envelope around the developing VWAP.
NY Session VWAP (VWAP 2) anchors at 08:30 CT (Regular Trading Hours open) and accumulates through 16:00 CT. It includes a leapfrog mechanic: when the new RTH session begins, the prior session's VWAP is preserved and continues to plot as "Prev NY VWAP," giving you a reference for how price relates to yesterday's value during overnight trading.
Prev NY VWAP: This is the previous day's NY Session VWAP, which continues accumulating through the overnight session after the NY VWAP resets at 08:30. It provides a critical structural reference, particularly during the premarket and early RTH, showing where the prior session's volume-weighted equilibrium sits relative to current price. Many traders use the relationship between current price, the active NY VWAP, and the Prev NY VWAP to gauge directional bias.
All VWAPs use separate source, color, and line size settings.
Higher Timeframe VWAPs
Optional Weekly and Monthly VWAP overlays provide broader context without cluttering the chart. Disabled by default.
Session Volume Profiles (SVP)
Volume is distributed across the bar's high-low range using a configurable tick-based bin size (default: 2 ticks). The script calculates and plots:
Current Session SVP: POC and Value Area (VAH/VAL) for the active session, updating in real time.
Prior Day SVP: POC and Value Area from the previous completed session. These levels carry forward as horizontal references.
Last Week SVP: POC and Value Area from the prior completed week.
Each profile can be displayed as POC Only or POC + VA. The Value Area percentage is configurable (default: 70%).
Static Reference Levels
Prior Day High/Low (PDH/PDL): Previous day's range boundaries.
Last Week High/Low (LWH/LWL): Previous week's range boundaries.
Previous Session Close (PSC): The prior day's closing price.
Premarket High/Low (PMH/PML): Dynamically tracked during the 18:00-08:30 premarket session.
Opening Range (ORH/ORL): The first 15 minutes of RTH (08:30-08:45), with optional fill.
All static levels are individually togglable with independent color and size controls.
Deadzone
A configurable time window (default: 11:00-13:00 CT) highlighted with a background fill and border lines. This marks the midday period where volume and follow-through typically thin out on equity index futures. The time window is adjustable in settings.
Bar Coloring
Optional bar coloring based on the close's relationship to the three primary VWAPs (Overnight, NY, Prev NY). Bars are colored bullish when above 2 of 3, bearish when below 2 of 3, and neutral otherwise. Disabled by default.
Display Modes
A master display mode toggle lets you switch between:
Advanced All-Level: Shows everything you have enabled, the full suite.
Simplified VWAP: Strips the chart down to just the Overnight VWAP, NY VWAP, Prev NY VWAP, and Opening Range. All volume profiles, static levels, and the deadzone are automatically hidden. Useful for cleaner charts or when you want to focus purely on VWAP structure.
Labels
Every plotted level gets a text label with optional price display, offset to the right of the current bar for readability. Labels can be globally toggled on/off.
HOW TO USE
1. Add the indicator to your chart on an intraday timeframe (1m-30m recommended). It is defaulted for CME futures but can be adapted to any instrument by adjusting the session time inputs.
2. The default session times are built for US Central Time (Chicago). If your chart uses a different timezone, adjust the session inputs in the settings to match your market's session boundaries.
3. The default configuration shows most levels. Start by reviewing what each level represents, then toggle off anything that creates noise for your specific approach.
4. For cleaner charts, switch to "Simplified VWAP" mode, which isolates the core VWAP structure and Opening Range only.
CONFIGURATION
All session times, colors, line sizes, and visibility toggles are individually configurable. The settings are organized into numbered groups for clarity:
1. Master Display Mode
2. Session Times
3. NY VWAP Settings
4. Overnight VWAP Settings
5. Opening Range
6. Volume Profiles (SVP)
7. Static Levels
8. Higher Timeframe VWAPs
9. Deadzone
10. Bar Coloring
11. Labels
LIMITATIONS
The default session times are configured for CME futures with the standard 17:00-16:00 CT (close enough) session structure. If you are using this on equities, crypto, forex, or other instruments, you will need to adjust the session time inputs to match your market's electronic trading hours. The indicator will work on any instrument, but the session boundaries must be set correctly for accurate VWAP anchoring and level calculation.
This is a feature-rich script with multiple VWAPs, volume profiles, and level calculations running simultaneously. Tradingview handles it well the vast majority of the time, but on occasion the script may load slowly or display incompletely. If levels appear missing or the indicator looks off, a simple page refresh will typically resolve it.
The session volume profile uses a simplified volume distribution method (volume is evenly distributed across the bar's high-low range in tick-based bins). This is an approximation, not a tick-level volume profile. Accuracy improves on lower timeframes where bars have smaller ranges.
The Overnight VWAP session detection uses an hour-based reset (detecting when the bar's hour enters 17:00 in exchange time) rather than PineScript's built-in session boundary detection. This is intentional: on CME futures, the VWAP session (1700-1600) matches the instrument's native session, which prevents the standard session boundary method from firing correctly.
The deadzone time window relies on your chart's timezone setting. The default of 1100-1300 assumes US Central. Adjust if your chart uses a different timezone.
NOTES
This script is original work, but it stands on the shoulders of giants. The concepts and ideas behind it draw from numerous traders, educators, and open-source contributors who have freely shared their knowledge with the trading community. VWAP, volume profile, session levels, and opening range are not new ideas. What this script attempts to do is bring them together in a thoughtful, configurable way that reflects how an active futures day trader actually uses these tools in practice.
I built this for my own trading first. I am sharing it as open source because the open-source community on Tradingview gave me the foundation to learn, and this is my way of giving back what I have been given.
This is a structural tool, not a trading system. It does not generate buy/sell signals, alerts, or backtest results. Use it as a framework for building your own context around price action.
It's all risky, so you may as well make the bet.
Indicator

Live HTF Volume POC - ChartDNAThis indicator displays a real-time volume profile with a dynamic Point of Control (PoC) line on any higher timeframe, from 15-minute sessions up to 3-month periods.
HOW IT WORKS
The script divides the selected timeframe's price range into configurable bins and accumulates normalized volume at each level. The bin with the highest volume is highlighted as the PoC. A stepping PoC line tracks how the highest-volume level shifts as the session develops in real time.
When a new HTF session begins, the previous session's profile is frozen on the chart, building a visual history of volume distribution across sessions.
FEATURES
- Flexible timeframe selector supporting intraday (15m, 30m, 1h, 2h, 4h, 8h, 12h) through higher timeframes (Daily, Weekly, Monthly)
- Dynamic PoC plotted as a stepline showing real-time PoC migration
- 8 profile color styles: Default, Monochrome, Blue, Cyan, Green, Red, Orange, Purple (all gradient-based)
- Adjustable bin count and PoC line width
- Clean overlay with minimal chart clutter
HOW TO USE
- Use on lower timeframes (e.g., 5m or 15m chart) with a higher session timeframe (e.g., 1D or 1W) to see where volume is concentrating
- The PoC level often acts as a magnet for price, useful for identifying support/resistance and mean-reversion zones
- Combine with your existing price action or order flow analysis
LIMITATIONS
- Volume data quality depends on your broker/exchange feed
- On very low-liquidity instruments, the profile may appear sparse
- The indicator uses request.security() with a offset and lookahead to detect HTF boundaries; this does not introduce future data
CREDITS
Based on "Real-Time HTF Volume Footprint" by BigBeluga (open-source, CC BY-NC-SA 4.0). Modified with added timeframe flexibility, multiple gradient color styles, PoC line customization, and UI cleanup.
Indicator

Volume Profile█ VOLUME PROFILE
Volume-at-Price Analysis with POC, VAH & VAL
A powerful volume-at-price analysis overlay that calculates and visualizes the Point of Control (POC) , Value Area High (VAH) , and Value Area Low (VAL) directly on your chart. It reveals where the most trading activity occurred and provides real-time price position analysis — helping you identify high-probability support/resistance levels and mean-reversion zones.
Free and Open Source.
█ THE CONCEPT: WHY VOLUME PROFILE MATTERS
Price charts show when trading happened. Volume Profile shows where it happened. The distribution of volume across price levels reveals the market's true valuation zones:
Point of Control (POC) — The price with the highest accumulated volume. Acts as a magnet for price and the strongest single S/R level.
Value Area (70%) — The range containing 70% of all traded volume. Defines what the market considers "fair value."
Above/Below VA — Price outside the value area signals potential overextension or breakout.
Institutional traders, market makers, and algorithmic systems all reference volume profile levels.
█ CORE FEATURES
1. Volume Profile Engine
Distributes each bar's volume proportionally across the price rows it spans, building a precise volume-at-price histogram:
POC — Highest volume row = strongest support/resistance
VAH — Upper boundary of the 70% value area = resistance
VAL — Lower boundary of the 70% value area = support
Row count is configurable (10-50 levels).
2. Profile Anchoring
Three anchor modes control how the profile is built:
Rolling — Continuously recalculated over the last N bars. Best for real-time analysis.
Session — Resets every new trading day. Best for intraday context.
Week — Resets every new trading week. Best for swing context.
3. Price Position Analysis
Real-time classification of price relative to the value area:
ABOVE VA — Potential overextension or breakout
BELOW VA — Potential undervaluation or breakdown
AT POC — High-probability mean-reversion zone
IN VA — Normal trading range
4. Bounce & Rejection Signals
Automatic detection of price interaction with key volume levels:
POC Bounce Up/Down — Price touches POC and reverses
VAL Rejection — Price tests VAL and bounces up (bullish)
VAH Rejection — Price tests VAH and bounces down (bearish)
5. Volume Histogram Visualization
A horizontal bar chart displayed directly on the price chart showing the volume distribution. POC row highlighted with a distinct color.
█ AUTO-TIMEFRAME ADAPTATION
All parameters automatically adjust based on the chart timeframe:
1-5 min → Lookback 30, 18 Rows, Histogram Width 8
15-30 min → Lookback 40, 20 Rows, Histogram Width 10
1 Hour → Lookback 50, 24 Rows, Histogram Width 15
4 Hour → Lookback 70, 28 Rows, Histogram Width 18
Daily → Lookback 100, 32 Rows, Histogram Width 22
Weekly+ → Lookback 150, 40 Rows, Histogram Width 30
█ DASHBOARD
A compact, dark-themed info panel displaying:
POC — Current Point of Control price level
VAH / VAL — Value Area boundaries
Position — Current price position (ABOVE VA / BELOW VA / AT POC / IN VA)
To POC — Distance from current price to POC in percent
Anchor — Active profile anchor mode
VA Range — Width of the value area in price units
█ ALERTS (4 CONDITIONS)
POC Bounce Up — Bullish bounce off the Point of Control
POC Bounce Down — Bearish bounce off the Point of Control
VAL Rejection — Bullish rejection at Value Area Low
VAH Rejection — Bearish rejection at Value Area High
█ NON-REPAINTING
The volume profile is calculated from confirmed bar data only. Rolling mode recalculates the full lookback window on each bar using historical high/low/volume — no future data is used. Session and Week modes accumulate incrementally within the anchor period. No repainting.
█ WORKS ON
Crypto, Forex, Stocks, Futures, Indices — any timeframe from 1 minute to Monthly.
█ DISCLAIMER
This indicator is for educational and informational purposes only. It does not constitute financial advice. Always do your own research and manage your risk. Past performance does not guarantee future results. Trading involves substantial risk of loss.
Indicator

Volume Acceptance Zones [BigBeluga]Volume Acceptance Zones is a market structure tool designed to identify areas of price acceptance and statistically stretched extremes. By modeling market activity as a continuous distribution, the indicator highlights where price is actively accepted versus where it behaves as a statistical outlier.
The goal is not prediction, but context — separating balanced price behavior from structurally stretched conditions.
🔵 CONCEPTS
The indicator calculates a Volume-Weighted Balance Price , representing the center of gravity for participation over a selected range.
Price dispersion around this balance point is measured using volume-weighted standard deviation .
The area within ±1 standard deviation forms the Acceptance Zone , where the majority of activity is concentrated.
Prices beyond this zone are treated as outliers , where participation thins and market reactions become more likely.
These zones do NOT represent guaranteed probabilities — they describe participation density and behavioral extremes.
🔵 STANDARD DEVIATION, BELL CURVE & OUTLIERS
At the core of this indicator lies the concept of standard deviation , which describes how price activity clusters around a central value.
When activity is observed over time, it tends to form a distribution where:
Most activity concentrates near a central balance level.
Fewer observations occur as price moves further away from that balance.
This behavior can be visualized conceptually as a bell-shaped distribution — a practical way to describe market participation density.
Prices that move beyond the Acceptance Zone deviate meaningfully from the balance of participation.
These areas are treated as outliers , where price is statistically stretched relative to recent market behavior.
Outliers do not imply immediate reversals — they signal that price is operating in a low-acceptance environment.
Market responses in these zones often include rejection, consolidation, or strong continuation if acceptance builds.
🔵 NEW: INTEGRATED FREQUENCY PROFILE
While the zones are calculated using volume-weighted math, the visual profile has been updated to a Frequency-Based Distribution . This transition allows you to see "Time at Price" rather than just raw volume.
Frequency Distribution: The profile counts the number of bars (occurrences) spent at each price bin. This highlights levels of high interest where the market finds it easy to trade, effectively acting as a Time-Price Opportunity (TPO) proxy.
Time-Based Sentiment: Each bin is split into Bull/Bear frequency. This shows which side was in control during the time spent at that specific level, identifying where buyers or sellers were more persistent.
Filtering Noise: By using frequency instead of raw volume, the profile avoids being skewed by single high-volume spikes, focusing instead on where the market established a sustained presence.
🔵 FEATURES
Acceptance Zone (±1σ)
Highlights the primary balance area where price is most actively accepted and rotational behavior is common.
Extreme Zones (±2σ)
Marks statistically stretched prices where acceptance weakens and reactions or trend continuation may occur.
Volume-Weighted Balance Line
Acts as a structural fair-value reference similar to an anchored VWAP.
Outlier Detection
Price closing beyond the acceptance zone is flagged as an outlier, helping identify exhaustion or breakout conditions.
Distribution Labels
Displays how price activity is distributed between acceptance and extreme zones, reinforcing the concept visually.
Flexible Anchoring
Calculations can be based on a fixed lookback or the visible chart range.
🔵 HOW TO USE
Treat the Acceptance Zone as a balance area where price is fairly valued and mean-reversion is common.
Observe how price behaves in Extreme Zones — rejection may signal reversion, while sustained acceptance may indicate trend continuation.
Frequency Nodes: Use the Frequency Profile to identify where the market is "stalling." High frequency nodes often act as magnets for price, while low frequency gaps (low time spent) often lead to fast price movement.
Use outlier signals in combination with trend bias, liquidity levels, or momentum tools.
🔵 CONCLUSION
Volume Acceptance Zones reframes market analysis around participation density. By distinguishing accepted price behavior from statistical outliers and providing a frequency-based view of time-at-price, the indicator helps traders understand when the market is balanced—and when it is structurally stretched. Indicator

AG Pro Volume Profile Acceptance Ladder [AGPro Series]AG Pro Volume Profile Acceptance Ladder
Overview / What it does
AG Pro Volume Profile Acceptance Ladder is a volume-structure indicator designed to monitor whether price is building acceptance, holding acceptance, or losing acceptance inside a rolling volume-defined band. Instead of treating volume profile as a static reference snapshot, this script tracks acceptance as a progressive process. The goal is not to predict where price must go next, but to help the user read whether the market is spending enough time and participation inside a value zone to justify calling that area accepted.
The script builds a rolling profile window, estimates the active acceptance band, and then classifies current behavior into states such as Probe, Build, Accept, Shift Watch, Shift Confirmed, and Fail. This creates a ladder-style framework for reading when the market is stabilizing within one value region and when that acceptance may be migrating toward another region. In practice, that makes it useful for users who want a structured way to distinguish temporary interaction from more durable volume-based acceptance.
A key design goal of this script is to separate acceptance progression from simple attraction-to-level logic. Some tools are built around whether price is pulled back toward a reference such as a POC or another central level. This script focuses on a different question: is the market actually building and holding acceptance inside a rolling value zone, and is that acceptance stable enough to be treated as an active auction area rather than a temporary touch.
Because of that framing, the indicator is best read as a market-structure context tool. It maps an evolving acceptance zone, estimates a directional ladder bias, and provides state transitions that can be used to organize chart reading, scenario planning, or alert workflows. It is not an execution engine, not a broker-grade order book product, and not a substitute for independent trade management.
Unique Edge
The distinguishing feature of this script is that it treats acceptance as a staged process rather than a single level event. The output is not limited to a profile center or a value-area drawing. Instead, the script evaluates how price behaves relative to a rolling volume-defined band and converts that behavior into a progression model.
That matters because a market can interact with a value area in very different ways. It can briefly probe it, begin building around it, hold it in a more stable manner, shift acceptance upward or downward, or fail to maintain acceptance altogether. By organizing those conditions into a ladder of states, the script attempts to make the auction process easier to read in real time.
This also makes the indicator materially different from a standard POC-centered interpretation. The emphasis here is not on magnetic pull toward one volume reference. The emphasis is on whether acceptance is forming, strengthening, or migrating. In that sense, the script is better understood as an acceptance progression map than as a simple volume anchor display.
Methodology
The script uses a rolling lookback window and distributes bar-based volume across a defined number of bins in order to approximate a local volume profile. From that rolling profile it derives the active central reference, the current acceptance band, and the relative participation of that band within the profile window.
Using those profile components, the script calculates several internal measures. These include how often price remains inside the band over a recent hold window, how often price re-enters the band after leaving it, how stable the band center is relative to recent values, and whether the active center appears to be migrating in a meaningful way. These measures are then blended into an aggregate acceptance score and a ladder bias.
The state engine uses those components to classify behavior into the following progression states:
- Reject
- Probe
- Build
- Accept
- Shift Watch
- Shift Confirmed
- Fail
These states should not be read as guarantees of continuation or reversal. They are condition labels describing how the script currently interprets interaction with the active acceptance band.
Signals & Alerts
The script includes deterministic state-based alerts so users can build workflows around changes in acceptance conditions.
Available alert events:
- Acceptance Building
- Acceptance Confirmed
- Upward Ladder Migration Confirmed
- Downward Ladder Migration Confirmed
- Acceptance Failed
- Acceptance Lost
These alerts are designed to reflect state transitions inside the indicator logic. They do not imply expected profitability, win rate, or directional certainty.
Key Inputs
- Profile Window: Defines the rolling lookback used for the local profile estimate.
- Bin Count: Controls the profile resolution.
- Value Area %: Defines how much of the rolling profile volume is used to construct the active acceptance band.
- Migration Sensitivity: Controls how easily the script classifies center shifts as migration activity.
- Probe Band Multiplier: Expands the outer interaction zone around the active acceptance band.
- Hold Lookback: Defines the window used for hold and re-entry style calculations.
- Theme / Panel Location / Panel Font Size / Label Font Size: Presentation controls for chart readability.
- Show Previous Acceptance Band / Show State Markers / Forward Extension Bars: Visual controls for context and labeling.
Limitations & Transparency
This script does not use exchange-native tick-by-tick volume profile data. It uses a bar-based approximation built from the information available to Pine Script on the chart. As a result, the acceptance band and profile structure shown by the indicator should be interpreted as a model of local volume distribution, not as a perfect reconstruction of exchange-level auction detail.
The ladder states are also model outputs, not objective market facts. Small changes in lookback, resolution, or volatility regime can influence how the script classifies the same area. Users should therefore treat the states as structured analytical context rather than as standalone instructions.
The indicator is also not intended to replace broader market analysis. Trend structure, liquidity conditions, volatility regime, higher-timeframe context, and instrument-specific behavior can all affect how useful an acceptance reading is in practice.
Risk Disclosure
This script is for chart analysis and educational use only. It does not provide financial advice, investment advice, or trade recommendations. All markets involve risk, and no indicator can guarantee outcome, timing, or future performance. Users should apply independent judgment, test settings carefully, and use risk management appropriate to their own methodology.
What this script is not
- It is not a promise of continuation or reversal.
- It is not a broker-grade volume profile engine.
- It is not a substitute for execution planning or risk control.
- It is not a claim that acceptance automatically leads to trend persistence. Indicator

AG Pro Volume Profile POC Magnet Map [AGPro Series]AG Pro Volume Profile POC Magnet Map
Overview
AG Pro Volume Profile POC Magnet Map is a chart-overlay indicator built around one practical question: how strongly is the current Point of Control attracting, holding, or losing price?
Instead of trying to replicate a full volume-profile workstation, this script focuses on the behavior of the active POC and the surrounding value area. The goal is to turn a familiar volume-profile concept into a cleaner decision-support map that helps users judge whether price is still interacting with the current fair-value center, rejecting it, reclaiming it, or beginning to establish value elsewhere.
The script is designed for users who want a visual framework around POC behavior without covering the chart with heavy histogram structures or overly complex dashboards. It highlights the active POC, the current Value Area High (VAH), the current Value Area Low (VAL), a compact magnet band around the POC, and a small set of reaction labels that describe how price is interacting with that area.
In short, this indicator is not trying to tell users what to buy or sell. It is trying to make one specific market reference more readable: the relationship between price and the current POC region.
What the script does
At a high level, the script does five things:
1) It builds a fixed-lookback volume-distribution map from recent chart data.
2) It derives the active POC, VAH, and VAL from that distribution.
3) It measures how close price is to the current POC and how often price revisits or accepts that region.
4) It converts those observations into a compact Magnet Score and state readout.
5) It marks a small set of price/POC interaction events such as Tag, Reject, and Reclaim.
The result is a visual tool that combines reference levels and contextual interpretation in one overlay.
Unique edge
Many indicators can show a POC. This script is built to answer a more specific question: what is the quality of the current POC as a magnet for price?
That difference matters. A raw POC line can be useful, but by itself it does not explain whether price is repeatedly returning to it, drifting away from it, rejecting it, or stabilizing around it. This script adds that missing context by combining the active POC with a behavior layer.
The design goal is not “more features.” The design goal is clearer interpretation:
- Is price still accepting the current value center?
- Is the POC functioning as a pullback magnet?
- Is price rejecting the area instead of accepting it?
- Is value beginning to migrate?
That is the role of the score, the state engine, and the reaction labels.
Methodology
The script uses a fixed lookback window and divides the recent price range into user-defined bins. It then allocates each bar’s volume to one price bin using the selected bar source, which can be Close or HLC3. From that distribution it identifies:
- POC: the highest-volume bin in the lookback window
- VAH: the upper boundary of the selected value area percentage
- VAL: the lower boundary of the selected value area percentage
After the levels are derived, the script evaluates how price is behaving relative to the active POC region.
The Magnet Score is built from multiple components:
- Distance: how far current price is from the POC, normalized by ATR
- Revisit behavior: how often price has returned to the POC region
- Acceptance behavior: how often price has closed near the POC region
- Stability: whether the POC is relatively stable or drifting quickly
- Rejection pressure: whether interactions with the POC region are ending in rejection rather than acceptance
These components are combined into a bounded 0-100 score. Higher readings suggest that the current POC remains a stronger center of attraction. Lower readings suggest weaker pull, weaker acceptance, or a market beginning to operate away from the current value center.
The script then classifies context into states such as:
- Magnet Strong
- Magnet Active
- POC Tagged
- POC Rejected
- Accepted Away
- Magnet Weakening
This state layer is designed to summarize the current context rather than generate automatic trading instructions.
How to read the chart
POC
The POC is the main reference line. It marks the highest-volume price zone inside the selected lookback distribution. If price repeatedly returns to it, reacts from it, or consolidates around it, that line is functioning as an active center of interest.
VAH and VAL
VAH and VAL define the current value-area boundaries. These help users judge whether price is still operating inside value or beginning to establish acceptance above or below it.
Magnet band
The magnet band is a narrow region around the POC. It exists to make POC interaction easier to read visually. It is not a claim that every touch is meaningful. It is simply a compact visual tolerance zone around the active POC.
Reaction labels
The script can display a small set of event labels:
- Tag: price reached the current POC region
- Reject: price interacted with the area and moved away
- Reclaim: price crossed back through the active POC after being on the other side
These labels are meant to help describe interaction, not to replace confirmation logic, risk management, or broader market context.
Panel
The panel summarizes:
- Magnet Score
- POC Distance
- POC Drift
- Value Context
- Last Reaction
- Current POC / VAH / VAL values
This gives users a quick status view without needing to inspect every line manually.
Typical use cases
This indicator may be useful when users want to:
- monitor whether pullbacks are still returning to the active POC
- judge whether price is still auctioning inside value or beginning to accept away from value
- compare different symbols for how “sticky” the current POC region appears to be
- add context to an existing structure, trend, or mean-reversion workflow
- keep a cleaner chart while still tracking basic volume-profile behavior
The script is intended as a context and interpretation layer. It is not a complete trading plan on its own.
Key inputs
Lookback Bars
Controls the size of the historical window used for the profile calculation. A larger value creates a broader context. A smaller value makes the profile more reactive.
Rows / Bin Count
Controls profile granularity. Higher values create more detailed binning. Lower values produce a smoother, simpler map.
Value Area %
Defines how much of total lookback volume is included inside the value area used to derive VAH and VAL.
Price Source For Bin Allocation
Lets users choose whether each bar’s volume is allocated using Close or HLC3. This changes how the profile is distributed across bins.
ATR Length
Used in normalization and spacing calculations, including the distance component and label positioning.
Magnet Band Width (ATR)
Controls the thickness of the tolerance zone around the active POC.
Distance Ceiling (ATR)
Caps how far price can be from the POC before the distance component is treated as maximally weak.
Revisit Window and Acceptance Window
These affect how the script measures repeated interaction and acceptance around the active POC region.
POC Drift Lookback
Used to estimate whether the active POC is relatively stable or shifting.
Label controls
Users can adjust label visibility, density, cooldown behavior, and right-edge line labels to keep the chart cleaner or more descriptive depending on preference.
Alerts
The script includes alert conditions for:
- POC Tag
- POC Reject
- POC Reclaim
- Magnet Strong
- Magnet Active
- Magnet Weakening
- Accepted Away
These alerts are event-based notifications tied to the script’s contextual logic. They are not performance claims and they should not be interpreted as guaranteed entry or exit signals.
Limitations and transparency
This script uses a fixed-lookback, bar-based approximation of volume distribution. It does not reconstruct native exchange-level order flow, bid/ask delta, or true tick-by-tick auction detail.
Volume is allocated to bins using a selected bar source rather than full intrabar volume-at-price reconstruction. That means the profile is intentionally simplified so it can remain lightweight and readable inside a standard Pine overlay.
Because the script uses a rolling lookback window, the active POC, VAH, and VAL can change as older bars leave the window and newer bars enter it. That is normal behavior for this design.
The reaction labels are descriptive, not predictive. A Tag does not imply reversal. A Reject does not guarantee continuation. A Reclaim does not guarantee trend resumption. They are context markers showing how price interacted with the current POC area according to the script’s definitions.
This tool should be read in conjunction with price structure, volatility, liquidity conditions, and user-defined execution rules.
What this script is not
This script is not:
- a full session volume-profile suite
- an order-flow or footprint tool
- a prediction engine
- a guaranteed reversal detector
- a stand-alone trade system
It is a focused overlay for interpreting how price is behaving around the current Point of Control and value-area structure.
Practical interpretation notes
In many markets, the POC acts like a reference area rather than a directional signal. The more often price returns to it and the more often price stabilizes near it, the more useful that region can become as a working fair-value reference.
By contrast, when price begins to hold above VAH or below VAL and stops interacting meaningfully with the POC region, the script may shift toward weaker magnet states or accepted-away context. That does not automatically imply trend continuation, but it does suggest that the current value center may be losing influence.
Users may find this especially useful when comparing:
- balanced conditions vs. directional conditions
- shallow pullbacks vs. deeper value retests
- symbols that keep rotating through value vs. symbols that are clearly accepting away from it
Risk disclosure
This indicator is for chart analysis and market context only. It does not provide investment advice, trading advice, or guaranteed outcomes.
All indicators simplify market behavior. This script is no exception. Markets can ignore previously important value references, react differently across symbols and timeframes, and change behavior as volatility regimes shift.
Users are responsible for their own confirmation process, execution decisions, and risk management. Indicator

Daily Volume Profile Pro [WillyAlgoTrader]📊 Daily Volume Profile Pro is an overlay indicator that builds a complete volume profile for each daily session — distributing volume across price bins using candle-range proportional allocation, computing POC (Point of Control), 70% Value Area (VAH/VAL) using the CME expansion method, session VWAP, buy/sell delta per bin, and displaying up to 7 days of profiles simultaneously. The indicator also detects naked (unvisited) POCs from prior days, classifies each day's profile shape (Normal/Trend/Neutral/Double Distribution), tracks Initial Balance ranges, and highlights single-print thin-volume zones — creating a complete volume-based market context tool.
🧩 WHY THESE COMPONENTS WORK TOGETHER
A volume profile alone shows where trading activity concentrated — but without context, you don't know whether the profile represents a trending day, a balanced day, or a double-distribution day. You don't know whether the POC from two days ago was ever revisited. You don't know whether the current price is above or below the Initial Balance — which tells you whether the opening range has been broken.
This indicator layers multiple volume-based analyses that each answer a different question:
Volume Profile → WHERE did volume concentrate? Which prices are accepted (high volume) and rejected (low volume)?
POC → What is the single most-traded price? This is the market's "fair value" for that session.
Value Area (70%) → Where did 70% of volume trade? Price inside VA = balance. Price outside VA = imbalance seeking new value.
Delta Coloring → At each price level, was the activity dominated by buyers or sellers? Green bins = buying pressure, red = selling.
Naked POCs → Which prior-day fair values were never revisited? These are strong magnets — price tends to return to unfinished business.
Initial Balance → What was the opening range? Price above IB High = bullish conviction. Below IB Low = bearish. Inside = balance.
Day Type → What shape is the profile? Trend days (narrow) behave differently than Normal (bell curve) or Double Distribution (bimodal) days.
Single Prints → Where did price move too fast for volume to fill? These thin-volume zones are gaps in the profile that often get revisited.
No single component provides a complete picture. The combination tells you: the market's fair value (POC), the accepted range (VA), the directional pressure (delta), the day's character (day type), the opening bias (IB), unfinished levels from prior sessions (naked POCs), and price imbalances (single prints) — all from volume data.
🔍 WHAT MAKES IT ORIGINAL
1️⃣ Candle-range proportional volume allocation.
Each candle's volume is distributed across the price bins it touches, proportional to the overlap between the candle's range and each bin:
overlap = max(0, min(candle_high, bin_high) − max(candle_low, bin_low))
allocated_volume = total_volume × overlap / candle_range
This produces a smoother, more accurate profile than the common approach of assigning all volume to a single price (close or typical price). A candle spanning 5 bins distributes its volume across all 5, weighted by how much of the candle falls in each bin.
Buy/sell classification: close ≥ open → buy candle (volume added to buy array), close < open → sell candle (volume added to sell array). Delta coloring shows whether each bin was dominated by buying or selling pressure.
2️⃣ CME-style Value Area expansion.
The 70% Value Area is computed using the standard CME method:
— Start at POC bin
— Compare the volume of the next bin above vs the next bin below
— Expand toward whichever side has higher volume
— Repeat until 70% of total session volume is captured
— VAH = top of the highest included bin, VAL = bottom of the lowest included bin
This matches the industry-standard method used by CME Group and professional platforms. The VA is displayed as dashed lines (VAH/VAL) with an optional semi-transparent background fill.
3️⃣ Naked POC detection with historical scan.
For each prior day's POC, the indicator scans all bars from the POC's day to the present — checking whether price ever touched that level (low ≤ pocPrice ≤ high). If no bar has touched it, the POC is classified as "naked" (nPOC) and drawn as a dashed red line extending to the right.
Naked POCs represent unfinished business — the market established fair value at that price but never returned to retest it. They act as strong magnets because institutional activity that established the original POC may still hold positions anchored to that level. The scan limit is 300 bars to maintain performance.
4️⃣ Day type classification from profile shape.
Each day's volume distribution is analyzed to classify the session:
— Trend : significant bins < 35% of total bins — volume concentrated in a narrow area, price moved decisively in one direction
— Neutral : significant bins > 65% — volume spread evenly across the range, balanced/rotational day
— Normal : 35–65% — bell-curve distribution with clear POC and tapering tails
— DD (Double Distribution) : significant bins concentrated in both top and bottom thirds but not the middle — bimodal distribution indicating two separate value areas (e.g., gap-and-go)
A "significant bin" is defined as having volume > 25% of POC volume. The classification appears as a color-coded label above each session.
5️⃣ Initial Balance (IB) range tracking.
The IB captures the high and low of the first N minutes of each session (configurable: 30, 60, 90, or 120 minutes). The IB range is drawn as solid lines with optional background fill, optionally extended to the end of session.
IB context: price above IB High signals that early buyers were committed and the market accepted higher prices — bullish bias. Price below IB Low signals the opposite. Price inside IB = range-bound session. The dashboard shows the current IB position (Above IB / Below IB / Inside IB).
6️⃣ Single print (thin volume) zone detection.
Bins with volume less than 15% of the POC bin's volume are classified as single prints — areas where price moved too quickly for significant volume to build. These are highlighted with a distinct border color and represent imbalance zones that often get revisited as the market seeks to fill the volume gap.
7️⃣ Multi-day profile display with configurable orientation.
Up to 7 days of profiles are drawn simultaneously with left or right orientation. Each day's profile bins are scaled proportionally: bin width = volume / maxVolume × span/3 in bars. The adaptive bin count adjusts to the day's price range: bins = min(binCountInput, max(8, range / (ATR × 0.05))).
8️⃣ POC extension + previous day POC (yPOC).
Each day's POC can be extended forward as a dashed line for 1–7 days (configurable), serving as a reference level for subsequent sessions. Yesterday's POC (yPOC) is drawn separately as a labeled reference — one of the most-watched volume levels in professional trading.
Today's POC, VAH, and VAL can be extended to the right chart edge for real-time reference.
9️⃣ Session VWAP.
Volume-weighted average price computed per session: VWAP = Σ(typicalPrice × volume) / Σ(volume). Displayed as a dotted line within each session. VWAP represents the average price at which volume traded — a key reference for institutional traders.
🔟 Optional MA overlay.
Six MA types available (SMA, EMA, RMA, WMA, VWMA, None) for additional trend context alongside the volume profile.
⚙️ HOW IT WORKS — CALCULATION FLOW
Step 1 — Session detection: Day change tracked via ta.change(time("D")). Session start/end bars, day high/low, and timestamps stored in arrays. IB high/low tracked during the first N minutes of each session.
Step 2 — Profile construction (per day): For each session, the price range is divided into bins. Every candle within the session distributes its volume across bins proportional to the candle-range overlap with each bin. Separate buy and sell arrays track directional volume.
Step 3 — POC/VA/VWAP: POC = bin with maximum volume. VA computed via CME expansion from POC until 70% captured. VWAP = cumulative (typical price × volume) / cumulative volume.
Step 4 — Visualization (last bar): All profiles, lines, and labels are drawn on barstate.islast using delete-and-redraw pattern. Profile boxes are colored by delta (buy/sell dominance), with POC bin highlighted, VA bins tinted, single prints bordered.
Step 5 — Naked POC scan: Each prior-day POC is checked against all subsequent bars. If no bar has touched the level → naked POC drawn as dashed line.
Step 6 — Day type: Volume distribution analyzed for shape classification (Trend/Normal/Neutral/DD).
📖 HOW TO USE
🎯 Quick start:
1. Add the indicator to an intraday chart (1M–30M recommended)
2. Volume profiles appear for each daily session (up to 7 days)
3. Yellow horizontal line = POC (highest volume price)
4. Blue dashed lines = VAH / VAL (70% Value Area boundaries)
5. Red dashed lines = naked POCs from prior days (unvisited fair values)
6. Orange lines = Initial Balance high/low
👁️ Reading the chart:
— 🟡 Solid line = POC (session fair value)
— 🟡 Dashed line = extended POC (reference for future sessions)
— 🔴 Dashed line with "nPOC" label = naked POC (unvisited — strong magnet)
— 🟡 "yPOC" label = yesterday's POC
— 🔵 Dashed lines = VAH / VAL (70% Value Area boundaries)
— 🔵 Shaded zone = Value Area background
— 🟣 Dotted line = session VWAP
— 🟠 Solid lines = IB High / IB Low
— 🟠 Shaded zone = Initial Balance range
— 🟢 Profile bins = buying pressure (delta positive)
— 🔴 Profile bins = selling pressure (delta negative)
— 🟡 Bordered bins = single prints (thin volume — imbalance zones)
— Day type labels: Trend / Normal / Neutral / DD
📊 Dashboard fields:
— Day Type: profile shape classification (Trend / Normal / Neutral / DD)
— Trend: price vs POC (Bullish ▲ / Bearish ▼)
— Price Zone: Above VA / Inside VA / Below VA
— IB Position: Above IB / Inside IB / Below IB
— POC: today's price, vs POC distance
— VAH / VAL: Value Area boundaries
— Delta: net buy/sell percentage
— Volume: total session volume
— Naked POCs: count of unvisited prior-day POCs
🔧 Tuning guide:
— Profile too coarse: increase Profile Bins (30–40)
— Profile too granular: decrease Profile Bins (15–20)
— Want to see more history: increase Days to Show (up to 7)
— IB too narrow for your market: increase IB Period (90–120 min)
— Too many single prints: this is informational — they highlight real imbalances
⚙️ KEY SETTINGS REFERENCE
⚙️ Main:
— Days to Show (default 7): number of daily profiles (1–7)
— Profile Bins (default 34): resolution of volume distribution
📊 Profile:
— Delta Coloring (default On): color bins by buy/sell pressure
— Single Prints (default On): highlight low-volume imbalance zones (< 15% of POC)
— Profile Side (default Left): draw bars left or right of session
📏 Levels:
— POC (default On) with width and extension (1–7 days)
— Naked POCs (default On): unvisited prior-day POCs
— Value Area (default On) with background fill
— Session VWAP (default Off)
— Previous Day POC (default On): yPOC reference
— Extend Today (default On): extend current session levels to chart edge
🔲 Initial Balance:
— IB Period (default 60 min): 15–120 minutes
— IB Background (default On) / Extend IB Lines (default On)
🎨 Visual:
— Day separators, day labels (Mon–Sun), day type labels
— MA overlay: SMA/EMA/RMA/WMA/VWMA/None
— Auto / Dark / Light theme
🔔 Alerts
— 🟢 POC CROSS UP / 🔴 POC CROSS DOWN — price crosses today's POC
— ⬆️ VAH BREAK — price breaks above Value Area High
— ⬇️ VAL BREAK — price breaks below Value Area Low
All support plain text and JSON webhook format. Bar-close confirmed.
⚠️ IMPORTANT NOTES
— 📐 Use on intraday timeframes. The indicator builds daily session profiles — it requires intraday data (1M–30M recommended) to produce meaningful volume distribution. On daily or higher timeframes, each day has only one candle, producing a single-bin profile.
— 🚫 No repainting. All alert conditions require barstate.isconfirmed. Profiles are computed from historical data within each session. Today's profile updates in real-time as new bars arrive (this is expected behavior for a live volume profile — not repainting).
— 📊 The volume allocation is proportional to candle-range overlap , not tick-by-tick. True tick data is not available in Pine Script. This candle-range method produces a close approximation for intraday timeframes (1M–15M). Lower timeframes = more candles per session = more accurate profile.
— ⚖️ The Value Area uses the standard CME expansion method : start at POC, expand toward higher-volume adjacent bins until 70% captured. This matches the industry-standard algorithm used by professional platforms.
— 🔴 Naked POC scan checks up to 300 bars of history per POC for performance reasons. On very low timeframes with many bars per day, a POC from 5+ days ago may exceed the scan range.
— 📏 Single prints are defined as bins with volume < 15% of POC volume — these represent areas where price moved too quickly for meaningful volume to accumulate. They are not errors or missing data.
— 🏷️ Day type classification uses volume distribution shape analysis based on the ratio of significant bins to total bins. It's a probabilistic assessment of the session's character, not a definitive market prediction.
— 🛠️ This is a volume analysis and market context tool , not an automated trading system. It visualizes where volume traded, which prices are accepted/rejected, and which levels remain unfinished — trade decisions remain yours.
— 🌐 Requires volume data. On instruments without reliable volume (some forex pairs), the profile accuracy depends on broker-reported tick volume. Indicator

AG Pro Price Acceptance Profile [AGPro Series]AG Pro Price Acceptance Profile
OVERVIEW
AG Pro Price Acceptance Profile is a price-structure tool designed to reveal where the market is spending time, where it is repeatedly returning, and where it is rejecting price efficiently.
Instead of using volume distribution, signal arrows, or breakout-style triggers, this script builds an acceptance/rejection map from price-time interaction inside a rolling lookback window. The goal is simple: make it easier to identify where price is being accepted, where it is being rejected, and whether current price is trading inside balance or at its outer edges.
This is not a volume profile clone, not a support/resistance line generator, and not a momentum signal script. It focuses on one specific question:
Which price areas are currently showing repeated acceptance, and which areas are failing to hold price?
That narrow focus is intentional. The script is built as an analytical context tool rather than an entry engine.
UNIQUE EDGE
The core idea is to measure acceptance through price-time behavior rather than centralized volume data.
The profile logic evaluates how often price revisits a zone, how long it tends to remain there, and how efficiently it exits that zone. This creates a structured map of:
- Acceptance zones
- Rejection zones
- The active balance area
- The current market state relative to that balance
Because the methodology is based on price persistence and revisit behavior, the script can be useful on markets where volume-based profiling is either unavailable, fragmented, or not the preferred analytical lens.
METHODOLOGY
The script divides the rolling price range into rows and evaluates each row using multiple internal dimensions derived from recent bars:
1) Time at price
Measures how frequently the market occupies each row across the selected lookback.
2) Revisit density
Tracks how often price returns to a row after leaving it. Repeated revisits can indicate ongoing acceptance or unfinished balancing behavior.
3) Dwell persistence
Approximates whether the market tends to spend stable time in an area rather than only touching it briefly.
4) Rejection speed
Measures how efficiently price exits an area after interaction. Faster and cleaner exits tend to support rejection classification.
5) Balance mapping
Uses the strongest acceptance region to define the current balance area and then classifies the live market location relative to it.
The result is a simplified profile-style framework built from price behavior itself.
HOW TO READ IT
The large balance area highlights the current acceptance region derived from the profile engine.
Acceptance zones mark price areas that showed stronger persistence, repeated interaction, and better structural acceptance within the chosen lookback.
Rejection zones mark areas where price interacted but failed to remain stable, leading to less durable occupation and faster displacement.
The panel is designed to summarize the current profile state:
- Acceptance Strength: relative quality of the dominant accepted area
- Revisit Density: how actively the market is returning to profiled zones
- Balance Width: width of the accepted region relative to the full profiled range
- Rejection Speed: how efficiently price is leaving unstable areas
- Location: whether current price is inside, above, or below balance
In practice, traders can use the script to distinguish between stable trade location and unstable trade location, instead of treating every nearby level as equally important.
KEY INPUTS
Lookback
Controls how much recent history is used to build the profile.
Rows
Defines profile resolution. Higher values increase granularity but can also make the map more sensitive.
Acceptance Threshold / Rejection Threshold
Adjust how selective the script is when classifying stronger acceptance and rejection areas.
Maximum Acceptance / Rejection Zones
Controls chart density and visual focus.
Panel and label settings
Allow adaptation for different chart layouts and screen sizes.
LIMITATIONS AND TRANSPARENCY
This script does not predict future price movement.
It does not generate guaranteed reversal points.
It does not replace execution logic or risk management.
Acceptance and rejection are contextual measurements derived from the selected lookback and row resolution. Different settings can produce different maps because the profile is adaptive by design.
As with any charting tool based on rolling historical context, zones may evolve when older bars leave the lookback window and new bars enter it.
This script is best used as a contextual framework for market location, not as a standalone trade mandate.
RISK DISCLOSURE
This indicator is for analytical and educational use only. It does not provide financial advice, investment advice, or trading guarantees. All trading decisions remain the responsibility of the user. Indicator

kNN Market Architecture [LuxAlgo]The kNN Market Architecture indicator is a professional-grade market structure framework that utilizes a k-nearest neighbors (kNN) machine learning classifier to validate price pivots across multiple time horizons. By integrating a dynamic detection engine, cumulative volume delta analysis, and a range-based volume profile, this tool provides a multi-layered hierarchical view of price action to identify high-probability reversal and breakout zones.
🔶 USAGE
The indicator identifies and classifies market structure into three distinct layers: Short-Term (ST), Medium-Term (MT), and Long-Term (LT). Unlike traditional pivot indicators that rely on static lookbacks, each point must pass a kNN similarity test based on relative volatility and volume features to be validated and plotted.
🔹 Multi-Scale Bias Analysis
Users can define which structural layer (ST, MT, or LT) dictates the overall market bias. When price is trading above the most recent validated high of the selected term, the candles and dashboard will reflect a bullish bias. Conversely, trading below the recent validated low indicates a bearish bias. This allows for seamless "top-down" analysis within a single chart view.
🔹 The Delta Tank
When a structural level is active (not yet breached), a "Delta Tank" label appears at the price line. This tool tracks the cumulative volume and delta (buying vs. selling pressure) since the level was formed.
A green icon with a high fill percentage indicates aggressive buying defending a support level or attacking resistance.
A red icon suggests selling pressure is mounting, potentially signaling an upcoming Break of Structure (BOS).
The percentage value represents the delta-to-total-volume ratio, providing a metric for the "exhaustion" or "strength" of a specific level.
🔹 Anchor Volume Profile
The indicator includes a dynamic Volume Profile that anchors itself specifically to the current active structural range. This profile calculates volume distribution between the most recent validated High and Low of your chosen Bias Source, allowing you to see exactly where the most "fair value" was traded within the current trading range.
🔶 ADVANTAGES OVER TRADITIONAL METHODS
The kNN Market Architecture offers several significant improvements over standard market structure indicators:
Noise Filtering via Machine Learning: Traditional pivot indicators plot every mathematical high/low within a window. The kNN classifier filters these by comparing the "signature" (volatility and volume) of the current point against historical successful pivots. If a pivot lacks the necessary confidence, it is ignored, leading to much cleaner charts.
Volatility-Adjusted Detection: Most indicators use a fixed lookback (e.g., 10 bars). This script uses a dynamic engine that expands during high volatility and contracts during low volatility, ensuring the structure remains relevant regardless of market speed.
Contextual Volume Data: While standard indicators only show price, this tool layers Volume Delta and Volume Profiles directly onto the structure points, providing the "why" behind price movements.
🔶 DETAILS
🔹 Auto-Adjust Sensitivity
The core of the detection engine is its ability to adapt to changing market conditions. When "Auto-Adjust Sensitivity" is enabled, the script calculates a volatility ratio by comparing the current ATR to its long-term average. During periods of high volatility, the engine automatically expands the detection window. This ensures that the indicator requires more significant price movement to confirm a new structure point, preventing "false positives" during erratic price swings. In low-volatility environments, the window contracts, making the engine more sensitive to subtle structural shifts.
🔹 kNN Validation Engine
For every potential price pivot, the engine analyzes features such as Relative ATR and Relative Volume. It compares these features against a historical database of previous pivots. If the current point does not meet the "Confidence Threshold" (the average score of its k-nearest neighbors), it is discarded.
🔶 SETTINGS
🔹 Dynamic Engine
Structure Sensitivity: Controls the base lookback for pivot detection.
Auto-Adjust Sensitivity: Enables volatility-based scaling of the detection engine.
🔹 kNN Classifier
k-Nearest Neighbors: The number of historical neighbors to compare against the current pivot.
Confidence Threshold: The minimum similarity score required to validate a structure point.
🔹 Visual Hierarchy
ST/MT/LT Toggles: Enables or disables the visibility of Short, Medium, and Long-term structures.
Bias Source: Choose which term (Auto, LT, MT, ST) governs candle coloring and the Volume Profile.
Color Candles by Bias: Toggles the gradient candle coloring based on the current range position.
🔹 Volume Profile
Show Volume Profile: Toggles the structural range-based profile.
Profile Rows: Adjusts the vertical granularity (price bins) of the profile.
Profile Width (%): Controls the horizontal scale of the profile.
Indicator

Fair Value Gap Profile + Rolling POC [BigBeluga]🔵 OVERVIEW
FVG Profile builds a price-level profile based on detected Fair Value Gaps (FVGs) over a fixed lookback period.
Instead of measuring traded volume alone, this tool aggregates bullish and bearish FVG occurrences into horizontal bins, allowing traders to see where price inefficiencies are most concentrated.
Each profile level represents how many bullish and bearish FVGs formed near that price zone, along with their relative strength, imbalance, and delta volume.
🔵 CONCEPTS
FVG Detection —
• Bullish FVG: when the high two bars back is below the current low.
• Bearish FVG: when the low two bars back is above the current high.
Price Binning — The full price range of the lookback period is divided into fixed bins.
FVG Aggregation — Each detected FVG is mapped to its nearest price bin and counted.
Directional Separation — Bullish and bearish FVGs are stored separately inside each bin.
🔵 FEATURES
Bull / Bear FVG Profile —
• Green segments represent bullish FVG counts.
• Orange segments represent bearish FVG counts.
• Each bin visually shows how many FVGs occurred at that level.
Strength Percentage —
• Each bin displays a % value based on total FVG count.
• The strongest bin is normalized to 100%.
Delta Volume —
• Calculates the difference between bullish and bearish FVG volume per bin.
• Positive delta = bullish dominance.
• Negative delta = bearish dominance.
Heatmap Mode —
• Colors profile levels by relative strength.
• Color direction is driven by delta volume (bullish vs bearish).
Live FVG Visualization — Optionally plots individual bullish and bearish FVG boxes on the chart.
Profile Background — A background frame highlights the full analyzed price range.
🔵 Rolling POC Logic
Unlike a static profile, the Rolling POC moves with price.
It continuously calculates the "peak imbalance level" for the last X bars, providing a moving average of where the market's most significant gaps are forming.
🔵 Moving Average Integration
The indicator features a customizable Moving Average (SMA, EMA, WMA, VWMA, etc.).
This MA helps identify if the price is currently trending toward or away from high-density FVG zones.
An "Auto" length feature is included that scales the MA based on the selected lookback period for optimal smoothing.
🔵 HOW TO USE
Identify FVG Clusters — Strong profile levels highlight prices where inefficiencies repeatedly formed.
Directional Bias — Compare bullish vs bearish segments to determine dominance at each level.
Delta Confirmation — Use delta volume to confirm whether bullish or bearish FVGs control the zone.
Reaction Zones — High-strength bins often act as areas of interest for price reactions.
Heatmap Context — Enable heatmap to quickly spot dominant imbalance zones across the range.
🔵 CONCLUSION
FVG Profile transforms Fair Value Gaps into a structured price-level profile, revealing where inefficiencies cluster and which side dominates those zones.
By combining FVG count, directional balance, delta volume, and strength normalization, it provides a powerful way to analyze imbalance behavior beyond traditional volume profiles. Indicator

Volume Delta with Fibonacci Projection [UAlgo]Volume Delta Profile with Fibonacci Projection is a structure driven profiling tool that combines swing discovery, lower timeframe volume allocation, delta analysis, Fibonacci mapping, and forward target projection inside a single chart overlay. Its purpose is not only to show where price has moved, but also to show how participation was distributed inside that move and where the next projected objective levels may sit.
The script begins by identifying a dominant recent swing inside a user defined lookback window. Once that swing is found, it becomes the structural anchor for everything else in the indicator. The swing defines the full high to low range, the Fibonacci ladder, the profile segmentation, the delta bands, and the forward projection path. This creates a unified framework where all visual components are tied to the same market structure instead of being calculated independently.
A key part of the script is its lower timeframe profiling engine. It requests intrabar data from a lower timeframe and uses that data to distribute volume into price rows and Fibonacci bands inside the active swing. This allows the indicator to estimate where buying activity and selling activity were concentrated with far more detail than a simple bar based approximation. If lower timeframe data is unavailable for a given bar, the script falls back to the chart bar itself so the profile can still be built.
The profile section shows how total activity was distributed across the swing range, while the delta section shows which Fibonacci bands leaned more bullish or bearish in terms of estimated participation. A Point of Control line can also be drawn to highlight the most active profile row. In addition, the script projects a continuation path from a chosen Fibonacci level toward target extensions such as 100 percent, 127.2 percent, and 161.8 percent of the swing.
The result is a tool that can be used for structure analysis, premium and discount mapping, participation study, and projection planning. It is especially useful for traders who want to combine profile logic and Fibonacci logic inside the same structural framework rather than treating them as separate tools.
🔹 Features
🔸 Structure Based Swing Detection
The script automatically finds a recent dominant swing inside the selected lookback period and requires a minimum separation between the major high and low. This gives the indicator a clean structural base before any profile or projection is drawn.
🔸 Auto Lower Timeframe Intrabar Analysis
The indicator can automatically choose a lower timeframe for intrabar volume analysis based on the current chart timeframe. A custom intrabar timeframe can also be used if desired.
🔸 Volume Profile Across the Swing Range
The full swing range is divided into profile rows, and lower timeframe volume is distributed into those rows according to price overlap. This builds a true participation map across the swing rather than a simple one point volume assignment.
🔸 Delta by Fibonacci Band
In addition to row based profiling, the script also groups volume into six Fibonacci bands between the swing extremes. Each band receives estimated buy and sell volume, and the script calculates directional delta for each band.
🔸 Fib POC Highlighting
A Point of Control line can be displayed at the profile row with the highest total accumulated volume, giving the user a quick view of the strongest participation level inside the swing.
🔸 Flexible Row Sizing
Profile row size can be determined automatically from ATR and tick size, or it can be defined manually through ticks per row. This makes the profile adaptable to very different instruments.
🔸 Forward Projection Path
The script draws a projection path starting from a selected retracement level and extends it toward major target levels such as 100 percent, 127.2 percent, and 161.8 percent of the swing range.
🔸 Optional Target Boxes
Target zones can be shown as compact boxes around the projected objective levels, helping the user visualize likely reaction areas rather than only exact lines.
🔸 Bull and Bear Participation Coloring
The profile and delta display use directional coloring to separate estimated buying volume from estimated selling volume. This makes the participation structure much easier to read visually.
🔸 Complete Structural Integration
The swing line, Fibonacci levels, volume profile, delta profile, Point of Control, and projection targets all come from the same underlying swing. This keeps the whole tool internally consistent.
🔹 Calculations
1) Defining the Swing Object
type Swing
int startIndex
int endIndex
float startPrice
float endPrice
float lowPrice
float highPrice
float swingRange
bool bullish
int recentOffset
int olderOffset
This object stores the full structural context of the move being analyzed.
It contains:
where the swing starts,
where it ends,
the starting price,
the ending price,
the full low and high of the move,
the total range,
the direction,
and the bar offsets used for the profiling loop.
This is important because the script does not calculate the profile on an arbitrary fixed range. It first defines a real market swing and then builds all later logic from that anchor.
2) Choosing the Lower Timeframe Automatically
autoLowerTf() =>
if timeframe.isseconds
"1S"
else if timeframe.isminutes and timeframe.multiplier == 1
"1S"
else if timeframe.isintraday
"1"
else if timeframe.isdaily
"5"
else
"60"
This function selects a lower timeframe automatically according to the current chart timeframe.
Very fast charts use one second data.
Intraday charts use one minute data.
Daily charts use five minute data.
Higher charts default to sixty minute data.
The goal is to obtain more granular intrabar structure without forcing the user to choose a lower timeframe manually every time.
3) Computing Automatic Row Size
autoTicksPerRow(int atrLen) =>
int t = int(math.round((0.2 * ta.atr(atrLen)) / syminfo.mintick))
math.max(1, t)
When row size mode is set to Auto, the script derives the profile row size from ATR and tick size.
It takes twenty percent of ATR, converts that value into ticks, then enforces a minimum of one tick.
This creates a profile row height that adapts to the instrument’s current volatility instead of staying fixed across very different market conditions.
4) Finding the Major Swing
makeSwing(int lookback, int minBars) =>
int hiOff = -ta.highestbars(high, lookback)
int loOff = -ta.lowestbars(low, lookback)
int minSep = math.min(minBars, math.max(1, lookback - 1))
bool bullish = loOff > hiOff
int startIndex = bullish ? bar_index - loOff : bar_index - hiOff
int endIndex = bullish ? bar_index - hiOff : bar_index - loOff
float startPx = bullish ? lo : hi
float endPx = bullish ? hi : lo
This function discovers the dominant swing inside the selected lookback.
First, it locates the highest bar and lowest bar inside the lookback window. Then it determines which came first in time. If the low occurred earlier and the high occurred later, the swing is bullish. If the high occurred earlier and the low occurred later, the swing is bearish.
The function also forces a minimum separation between the swing endpoints. If the raw highest and lowest points are too close together, it searches farther out to build a more meaningful move.
So the swing used by the indicator is not just the highest high and lowest low. It is a structurally filtered move with time separation and direction.
5) Fibonacci Price Calculation
method fibPrice(Swing s, float ratio) =>
s.bullish ? s.highPrice - s.swingRange * ratio : s.lowPrice + s.swingRange * ratio
This method converts a Fibonacci ratio into an actual price inside the current swing.
For bullish swings, ratios are measured downward from the swing high.
For bearish swings, ratios are measured upward from the swing low.
So the Fibonacci ladder always respects swing direction and preserves the standard premium and discount interpretation.
6) Defining the Six Internal Fibonacci Bands
method bandRatioAt(Swing s, int slot) =>
float r = 0.0
if s.bullish
switch slot
0 => r := 1.000
1 => r := 0.786
2 => r := 0.618
3 => r := 0.500
4 => r := 0.382
5 => r := 0.236
6 => r := 0.000
else
switch slot
0 => r := 0.000
1 => r := 0.236
2 => r := 0.382
3 => r := 0.500
4 => r := 0.618
5 => r := 0.786
6 => r := 1.000
r
These ratio slots define the six profiling bands used in the delta section.
The bands span the space between:
1.000 and 0.786
0.786 and 0.618
0.618 and 0.500
0.500 and 0.382
0.382 and 0.236
0.236 and 0.000
The order is reversed automatically for bearish swings so the structure remains directionally consistent.
So the delta section is not arbitrary. It measures directional participation inside familiar Fibonacci zones.
7) Mapping Prices Into Profile Rows
locateRowIndex(float lowPrice, float highPrice, float step, int rows, float price) =>
float clampedPrice = math.max(lowPrice, math.min(highPrice, price))
int idx = int(math.floor((clampedPrice - lowPrice) / step))
math.max(0, math.min(rows - 1, idx))
This helper function converts any price into its corresponding profile row.
The price is first clamped inside the swing boundaries. Then the script measures how far above the swing low the price sits and divides that by the row step size.
This gives the row index where the price belongs. That mapping is necessary for distributing intrabar volume into the correct profile level.
8) Mapping Prices Into Fibonacci Bands
locateBandIndex(Swing s, float price) =>
float clampedPrice = math.max(s.lowPrice, math.min(s.highPrice, price))
int idx = 5
for b = 0 to 5
float p1 = s.bandPriceAt(b)
float p2 = s.bandPriceAt(b + 1)
float bandLow = math.min(p1, p2)
float bandHigh = math.max(p1, p2)
bool inside = b == 5 ? (clampedPrice >= bandLow and clampedPrice <= bandHigh) : (clampedPrice >= bandLow and clampedPrice < bandHigh)
if inside
idx := b
break
idx
This function assigns a price to one of the six Fibonacci bands.
It walks through the band boundaries one by one, checks where the price sits, and returns the matching band index.
That index is later used when a bar or an intrabar has zero height or when band overlap needs to be accumulated. So this function is the bridge between raw prices and the delta profile zones.
9) Lower Timeframe Data Request
string ltf = useCustomLtf ? customLtf : autoLowerTf()
= request.security_lower_tf(syminfo.tickerid, ltf, )
This is the intrabar engine.
The script first decides whether to use the automatic lower timeframe or the custom user defined one. Then it requests arrays of lower timeframe open, high, low, close, and volume values for each chart bar.
This means every bar inside the swing can be broken down into smaller internal bars, allowing a more detailed volume allocation than a single chart timeframe candle would allow.
10) Determining Effective Profile Row Size
int ticksPerRow = rowSizeMode == "Auto" ? autoTicksNow : manualTicksPerRow
float minRowStep = math.max(syminfo.mintick, ticksPerRow * syminfo.mintick)
float rowStep = math.max(minRowStep, swing.swingRange / rowsInput)
int rowsEff = math.max(1, int(math.ceil(swing.swingRange / rowStep)))
rowStep := swing.swingRange / rowsEff
This block finalizes the profile geometry.
It first determines the tick size per row, either from the automatic ATR based logic or from the manual input. Then it ensures the row step is not smaller than that minimum. After that, it calculates how many rows are actually needed to cover the full swing range.
Finally, it recalculates the row height so the entire swing fits perfectly into the effective row count.
So the profile is always both instrument aware and range aligned.
11) Estimating Intrabar Direction
int dir = prevDir
if ic > io
dir := 1
else if ic < io
dir := -1
else
if not na(prevClose)
if ic > prevClose
dir := 1
else if ic < prevClose
dir := -1
else
dir := prevDir
else
dir := prevDir
This block decides whether a lower timeframe bar should be treated as bullish or bearish for volume allocation.
If close is above open, the bar is treated as buying.
If close is below open, the bar is treated as selling.
If the bar is neutral, the script falls back to its relation versus the previous close. If that is also neutral, it inherits the previous direction.
This gives the script a practical directional model for classifying intrabar volume into buy side or sell side participation.
12) Distributing Intrabar Volume Into Profile Rows
for r = 0 to rowsEff - 1
float rowLow = swing.lowPrice + rowStep * r
float rowHigh = rowLow + rowStep
float overlap = math.min(ih, rowHigh) - math.max(il, rowLow)
if overlap > 0
float frac = overlap / iRange
rowBuy.addAt(r, buyV * frac)
rowSell.addAt(r, sellV * frac)
This is one of the most important calculations in the script.
For every lower timeframe bar, the script checks how much of that bar overlaps each profile row. If overlap exists, volume is distributed proportionally according to the fraction of the bar’s range that passed through that row.
So if an intrabar spends more range inside a certain row, more of its volume is assigned there.
This is much more realistic than placing the full volume into a single price row because it respects the bar’s actual vertical path through price.
13) Distributing Intrabar Volume Into Fibonacci Bands
for b = 0 to 5
float p1 = swing.bandPriceAt(b)
float p2 = swing.bandPriceAt(b + 1)
float bandLow = math.min(p1, p2)
float bandHigh = math.max(p1, p2)
float bandOverlap = math.min(ih, bandHigh) - math.max(il, bandLow)
if bandOverlap > 0
float bFrac = bandOverlap / iRange
bandBuy.addAt(b, buyV * bFrac)
bandSell.addAt(b, sellV * bFrac)
The same overlap logic is then applied to the six Fibonacci bands.
Each intrabar contributes buy volume and sell volume into the band or bands it overlaps. The contribution is proportional to the amount of overlap relative to the bar’s own range.
So the delta section is not built from row totals. It is built directly from participation inside each Fibonacci segment of the swing.
14) Fallback Logic When Lower Timeframe Arrays Are Empty
else
float bo = open
float bh = high
float bl = low
float bc = close
float bv = math.max(volume , 0)
int dir = barDirFromOffset(off)
If the lower timeframe request returns no intrabar data for a specific chart bar, the script falls back to the bar itself.
It reads the normal chart timeframe OHLCV values, determines a direction using the helper method, and then distributes that bar’s volume into rows and bands using the same overlap logic.
This is important because it makes the indicator robust. The profile can still be constructed even when granular intrabar data is unavailable.
15) Point of Control Calculation
float pocVol = 0.0
float pocPrice = na
for r = 0 to rowsEff - 1
float totalRow = rowBuy.get(r) + rowSell.get(r)
if totalRow > pocVol
pocVol := totalRow
pocPrice := swing.lowPrice + rowStep * (r + 0.5)
This block finds the Point of Control.
The script scans every profile row, calculates total row volume as buy plus sell, and keeps track of the highest one. The midpoint of that strongest row becomes the Point of Control price.
So the POC is the single most active price area inside the swing based on the constructed row profile.
16) Building the Horizontal Volume Profile
int totalWidthBars = math.max(1, int(math.round(profileWidthBars * (total / maxRowTotal))))
sellWidthBars := int(math.round(totalWidthBars * (sellVol / total)))
buyWidthBars := totalWidthBars - sellWidthBars
if sellWidthBars > 0
pushBox(boxPool, profileStartX, rowHigh, profileStartX + sellWidthBars, rowLow, color.new(bearColor, 72), color.new(bearColor, 100))
if buyWidthBars > 0
int buyLeftX = profileStartX + sellWidthBars
int buyRightX = buyLeftX + buyWidthBars
pushBox(boxPool, buyLeftX, rowHigh, buyRightX, rowLow, color.new(bullColor, 72), color.new(bullColor, 100))
This is the profile drawing engine.
Each row’s total participation is scaled relative to the strongest row. That determines how wide the full profile bar should be.
Then the script splits that width between sell volume and buy volume according to their relative shares. The selling segment is drawn first, followed by the buying segment.
So each row shows both:
how much total volume was traded there,
and how that volume split between bearish and bullish participation.
17) Delta Calculation by Fibonacci Band
float deltaV = buyV - sellV
float deltaPct = totalV > 0 ? (deltaV / totalV) * 100.0 : 0.0
color dColor = math.abs(deltaV) <= 0.0000001 ? fibColor : deltaV > 0 ? bullColor : bearColor
This block calculates directional delta inside each Fibonacci band.
Delta is simply buy volume minus sell volume.
Delta percent then normalizes that difference by total volume inside the band.
If the result is positive, the band leaned bullish.
If the result is negative, the band leaned bearish.
If the result is near zero, the band was balanced.
So the delta section tells the user not just how much activity occurred in a band, but which side dominated it.
18) Scaling the Delta Bars
maxBandAbs := math.max(maxBandAbs, math.abs(buyV - sellV))
int dWidthBars = maxBandAbs > 0 and math.abs(deltaV) > 0 ? math.max(1, int(math.round(deltaWidthBars * (math.abs(deltaV) / maxBandAbs)))) : 1
pushBox(boxPool, deltaStartX, bandHigh, deltaStartX + dWidthBars, bandLow, color.new(dColor, 76), color.new(dColor, 100))
The script first finds the maximum absolute delta among all bands. Then it uses that value as the scaling reference for the delta boxes.
A band with the strongest absolute delta receives the widest box. Smaller delta bands receive proportionally narrower boxes.
So the delta profile communicates both direction and relative strength across the Fibonacci segments of the swing.
19) Drawing the Core Fibonacci Ladder
for i = 0 to fibRatios.size() - 1
float ratio = fibRatios.get(i)
float price = swing.fibPrice(ratio)
bool keyLevel = math.abs(ratio - projBaseRatio) < 0.0001 or ratio == 0.0 or ratio == 1.0
color lc = keyLevel ? color.new(fibColor, 10) : color.new(fibColor, 68)
pushLine(linePool, swing.startIndex, price, fibEndX, price, lc, keyLevel ? line.style_dashed : line.style_dotted, 1)
This loop draws the Fibonacci levels across the swing.
Every ratio from zero to one is converted into price using the earlier swing based Fibonacci method. The selected projection base level plus the zero and one boundaries are emphasized, while the other internal levels are drawn more softly.
So the user gets a full retracement map tied directly to the chosen swing.
20) Building the Projection Path and Targets
float cPrice = swing.fibPrice(projBaseRatio)
float target1 = swing.bullish ? cPrice + swing.swingRange * 1.000 : cPrice - swing.swingRange * 1.000
float target2 = swing.bullish ? cPrice + swing.swingRange * 1.272 : cPrice - swing.swingRange * 1.272
float target3 = swing.bullish ? cPrice + swing.swingRange * 1.618 : cPrice - swing.swingRange * 1.618
pushLine(linePool, swing.endIndex, swing.endPrice, cX, cPrice, color.new(projColor, 30), line.style_dashed, 2)
pushLine(linePool, cX, cPrice, t1X, target1, color.new(projColor, 0), line.style_solid, 2)
pushLine(linePool, t1X, target1, t2X, target2, color.new(projColor, 18), line.style_solid, 2)
pushLine(linePool, t2X, target2, t3X, target3, color.new(projColor, 35), line.style_solid, 2)
This is the forward projection engine.
The chosen Fibonacci retracement level becomes point C. From that point, the script projects three forward targets based on the swing range:
100 percent,
127.2 percent,
and 161.8 percent.
For bullish swings, the targets are projected upward.
For bearish swings, the targets are projected downward.
The script then connects the swing end to point C and extends the projection path forward through each target.
So the projection section transforms the structural swing into a directional roadmap.
21) Drawing Target Boxes
float zoneHalf = math.max(swing.swingRange * 0.015, syminfo.mintick * 8)
if showTargets
pushBox(boxPool, t1X - 1, target1 + zoneHalf, t1X + 2, target1 - zoneHalf, color.new(projColor, 87), color.new(projColor, 55))
pushBox(boxPool, t2X - 1, target2 + zoneHalf, t2X + 2, target2 - zoneHalf, color.new(projColor, 89), color.new(projColor, 60))
pushBox(boxPool, t3X - 1, target3 + zoneHalf, t3X + 2, target3 - zoneHalf, color.new(projColor, 91), color.new(projColor, 68))
Instead of marking the targets as exact single prices only, the script can draw small target boxes around them.
The vertical thickness of each box is based on a fraction of the swing range, with a minimum tick based width. This helps present the targets as realistic reaction zones rather than razor thin levels.
So the projection module provides both precise target labels and visual target areas. Indicator

Range Finder & Profile [UAlgo]Range Finder & Profile is a structured market range detection tool that combines pivot based range discovery with an embedded volume profile. Its purpose is to identify areas where price begins to rotate inside a defined boundary, track whether that balance remains intact, and then summarize how volume was distributed inside the completed range once price finally exits it.
The script starts by using pivot highs and pivot lows to define potential horizontal boundaries. When a valid upper and lower reference exist, and price is trading inside those bounds without already breaking them, the script opens a candidate range. From that point onward, it keeps monitoring the structure bar by bar, checking whether the range survives long enough to become confirmed and whether price remains accepted inside it.
What makes this indicator especially useful is that it does not stop at simply drawing a box around consolidation. Once a range becomes confirmed, it also builds a row based internal profile of all activity inside that zone. When the range eventually breaks, the script calculates Point of Control, Value Area High, and Value Area Low, then draws a compact profile directly inside the range. This transforms a simple horizontal box into a more informative market acceptance map.
The result is a tool that can help traders study balance, distribution, and eventual expansion. It is useful for identifying clean consolidation structures, understanding where the heaviest participation occurred inside a range, and interpreting whether the breakout happened after meaningful internal acceptance or after a less developed structure.
🔹 Features
🔸 Pivot Based Range Discovery
The script uses pivot highs and pivot lows to establish potential range boundaries. This creates a structure that reacts to meaningful swing points rather than arbitrary rolling highs and lows. As a result, the detected ranges tend to reflect actual market rotation more naturally.
🔸 Clean Range Validation
A new range is only created when price is already trading inside the proposed top and bottom boundaries and when no bar in the candidate history has already closed outside those levels. This helps prevent invalid or already broken ranges from being accepted.
🔸 Overlap Protection
The script tracks where the last completed range ended and avoids creating a new one that starts inside an already closed structure. This reduces repeated overlap and keeps the chart cleaner.
🔸 Minimum Range Confirmation
Not every detected range is immediately treated as valid. The structure must survive for a minimum number of bars before it becomes confirmed. This helps filter out weak or short lived consolidations.
🔸 Embedded Volume Profile
Each confirmed range contains its own internal volume profile. The vertical height of the range is divided into configurable rows, and every bar contributes volume into the relevant price segments. This creates a compact distribution map inside the actual range boundaries.
🔸 Proportional Volume Allocation
The script does not simply drop full bar volume into a single row unless the bar has no height. Instead, when a candle spans multiple rows, its volume is distributed proportionally across the overlapped sections. This produces a more realistic representation of participation across the range.
🔸 Point of Control Detection
After the range is complete, the script finds the profile row with the highest accumulated volume. This row becomes the Point of Control, giving the user a quick view of the price area with the strongest concentration of activity.
🔸 Value Area Calculation
The script expands outward from the Point of Control and accumulates neighboring rows until the selected percentage of total range volume is reached. This produces Value Area High and Value Area Low, which highlight the area where most participation occurred.
🔸 Gradient Range Background
The active and completed range is drawn with a multi slice background gradient between the upper and lower colors. This improves readability and gives the zone a more polished visual structure.
🔸 Histogram Inside the Range
When a range is confirmed and completed, the script draws horizontal histogram bars inside the zone. Rows inside the value area use a dedicated color, while rows outside the value area use a separate profile color. This makes internal acceptance easy to read visually.
🔸 Live Active Range Updates
While the range is still active and not yet broken, the background extends forward in time with every new bar. Once the range becomes confirmed, profile and value area calculations are refreshed continuously until the breakout occurs.
🔸 Practical Market Structure Use
This makes the indicator useful for consolidation analysis, acceptance and rejection studies, and breakout context. A trader can see not only where price paused, but also how volume built inside that pause before expansion occurred.
🔹 Calculations
1) Pivot Detection for Range Anchors
float ph = ta.pivothigh(high, lengthInput, lengthInput)
float pl = ta.pivotlow(low, lengthInput, lengthInput)
if not na(ph)
recentPH := ph
recentPHIndex := bar_index
if not na(pl)
recentPL := pl
recentPLIndex := bar_index
This is the starting point of the whole script.
The code asks PulseWire to detect a pivot high and a pivot low using the selected swing length. A pivot high appears only after enough bars have formed on both sides of the swing, and the same logic applies to a pivot low. Because of that, pivots are confirmed reference points rather than instant highs or lows.
When a valid pivot high is found, the script stores two things.
The pivot price itself in recentPH
The bar index where that pivot actually occurred in recentPHIndex
The same is done for pivot lows through recentPL and recentPLIndex .
This means the script always keeps track of the latest confirmed upper swing and the latest confirmed lower swing. Those two swing references become the raw ingredients for a possible trading range.
2) Candidate Range Creation Logic
bool canCreateRange = na(activeRange) and not na(recentPH) and not na(recentPL)
if canCreateRange
float top = math.max(recentPH, recentPL)
float bot = math.min(recentPH, recentPL)
if top > bot and close <= top and close >= bot
int sIndex = math.min(recentPHIndex, recentPLIndex)
int barsBack = bar_index - sIndex
This block decides whether the script is even allowed to start a new range.
First, canCreateRange requires three conditions:
there must be no currently active range,
there must be a recent pivot high,
and there must be a recent pivot low.
If those conditions are met, the script builds a provisional upper bound and lower bound using the greater and smaller of the two pivot prices. Then it checks whether current price is actually inside that proposed range. This is important because it prevents the script from creating a range that price has already escaped.
The code also finds sIndex , which is the earlier of the two pivot bar indices. That earlier point becomes the true starting location of the range. Then barsBack measures how many bars ago the range began.
So at this stage, the script has a full candidate structure:
an upper price,
a lower price,
and a starting point in time.
3) Overlap Prevention and Broken History Check
bool isOverlapping = false
if sIndex <= lastClosedRangeEndIndex
isOverlapping := true
if not isOverlapping
bool broken = false
if barsBack > 0
for i = 0 to barsBack
if close > top or close < bot
broken := true
break
This section filters out bad candidates before a range is created.
First, the script checks whether the proposed start index falls inside or before the end of the last completed range. If it does, the new candidate is marked as overlapping and rejected. This keeps the indicator from repeatedly generating new boxes on top of old structures.
Next, even if there is no overlap, the script scans every bar from the proposed start point up to the present. It checks whether any close moved above the top boundary or below the bottom boundary. If that happened, the candidate is marked as broken.
This is a very important quality filter. It means the script does not simply connect two pivots and call that a range. It also verifies that price actually stayed accepted inside those boundaries over the full candidate history.
4) Initializing the Range Object
activeRange := RangeData.new(
startIndex = sIndex,
startTime = time ,
endIndex = bar_index,
endTime = time,
topPrice = top,
bottomPrice = bot,
isActive = true,
isConfirmed = false,
totalVolume = 0.0,
pocPrice = na, pocVolume = 0.0, pocIndex = -1, vah = na, val = na,
bgBoxes = na, histBoxes = na, pocLine = na, vahLine = na, valLine = na, pocLabel = na, vahLabel = na, valLabel = na
)
activeRange.initProfile(profileRows)
Once the script is satisfied that the candidate is valid, it creates a new RangeData object.
This object stores all important information about the range:
where it starts,
where it currently ends,
its top price,
its bottom price,
whether it is still active,
whether it is confirmed,
and all profile related values such as total volume, Point of Control, Value Area High, and Value Area Low.
Immediately after creating the object, the script calls initProfile(profileRows) . That method prepares the internal volume profile rows that will later hold the distribution data.
So this is the moment where the script moves from pure detection into active tracking.
5) Building the Internal Profile Rows
method initProfile(RangeData this, int rowsCount) =>
float step = (this.topPrice - this.bottomPrice) / rowsCount
this.profile := array.new()
for i = 0 to rowsCount - 1
float pBottom = this.bottomPrice + (i * step)
float pTop = pBottom + step
this.profile.push(ProfileRow.new(pTop, pBottom, 0.0))
This method divides the height of the range into a fixed number of rows.
First, it calculates step , which is the height of one profile row. That is simply the total range height divided by the selected number of profile rows.
Then it creates an empty profile array and fills it row by row. Each row stores:
its upper price,
its lower price,
and the total volume accumulated in that row.
At this moment, every row starts with zero volume. The profile is just an empty framework waiting to receive bar by bar contributions.
This design is important because the script is not using a prebuilt PulseWire volume profile function. It is constructing the profile manually, row by row, inside the exact range boundaries.
6) Adding Volume Into the Profile
method addVolume(RangeData this, float bHigh, float bLow, float bVol) =>
float overlapHigh = math.min(bHigh, this.topPrice)
float overlapLow = math.max(bLow, this.bottomPrice)
if bHigh == bLow and bHigh <= this.topPrice and bHigh >= this.bottomPrice
for i = 0 to this.profile.size() - 1
ProfileRow row = this.profile.get(i)
if bHigh >= row.priceBottom and bHigh <= row.priceTop
row.volumeTotal += bVol
this.totalVolume += bVol
break
else if overlapHigh > overlapLow
float overlapHeight = overlapHigh - overlapLow
float totalHeight = bHigh - bLow
float effectiveVol = totalHeight > 0 ? bVol * (overlapHeight / totalHeight) : bVol
for i = 0 to this.profile.size() - 1
ProfileRow row = this.profile.get(i)
float rowOverlapHigh = math.min(overlapHigh, row.priceTop)
float rowOverlapLow = math.max(overlapLow, row.priceBottom)
if rowOverlapHigh > rowOverlapLow
float rowOverlapHeight = rowOverlapHigh - rowOverlapLow
float rowRatio = rowOverlapHeight / overlapHeight
float addedVol = effectiveVol * rowRatio
row.volumeTotal += addedVol
this.totalVolume += addedVol
This is one of the most important calculations in the whole script.
The goal here is to take a candle and distribute its volume into the profile rows that the candle actually overlaps.
First, the script limits the candle to the range boundaries using overlapHigh and overlapLow . This ensures that only the part of the candle inside the range contributes to the profile.
Then two cases are handled.
If the candle has no height, meaning bHigh == bLow , the full volume is assigned to the single row that contains that exact price.
If the candle does have height, the script calculates how much of the candle actually overlaps the range. That overlapping height becomes the valid section for profile allocation. Then, for each profile row, the script measures how much of that valid section overlaps the row. Volume is distributed proportionally according to that overlap share.
This is much more accurate than placing the full candle volume into a single row. It means tall candles contribute volume across the price levels they truly passed through, which creates a more realistic internal distribution.
7) Filling the New Range With Historical Volume
if barsBack >= 0
for i = 0 to barsBack
float bVol = na(volume ) ? 1.0 : volume
activeRange.addVolume(high , low , bVol)
Right after a new range is created, the script goes back through all bars that belong to that range from its start until the current bar.
For each of those bars, it reads the volume and sends the bar high, bar low, and volume into addVolume .
This step is essential because it backfills the profile immediately. Without it, the range would start with an empty volume profile and would only accumulate data from future bars. Instead, the script reconstructs the whole internal history of the range as soon as the range is created.
Also notice the fallback 1.0 when volume data is missing. That ensures the script can still function on symbols where actual volume may not be available.
8) Range Confirmation and Break Detection
bool isBroken = close > activeRange.topPrice or close < activeRange.bottomPrice
if (bar_index - activeRange.startIndex) >= minRangeLen
activeRange.isConfirmed := true
Once a range is active, the script keeps evaluating two key questions on every bar.
The first question is whether the range is broken.
If the current close moves above the top or below the bottom, the range is considered finished.
The second question is whether the range has lasted long enough to be trusted.
If the number of bars since the range started is at least the user selected minimum, isConfirmed becomes true.
This creates a useful distinction between a candidate range and a confirmed range. A short structure can exist visually for a while, but it only becomes analytically meaningful after it survives long enough.
9) Live Updating While the Range Is Active
if not justCreated
float barVol = na(volume) ? 1.0 : volume
activeRange.addVolume(high, low, barVol)
if activeRange.isConfirmed
activeRange.calcValueArea(valAreaPct)
activeRange.drawProfile(colorBgTop, colorBgBot, colorProfile, colorProfileVA, colorPOC, colorVA)
else
activeRange.updateBgRight(time, colorBgTop, colorBgBot, colorBorder)
This block explains how the range evolves in real time.
If the current bar is not the same bar where the range was created, the script adds the latest candle volume into the profile. That keeps the internal distribution up to date bar by bar.
Then the script behaves differently depending on confirmation state.
If the range is already confirmed, it recalculates the value area and redraws the full profile. This means Point of Control, Value Area High, Value Area Low, and the histogram are all updated continuously as long as price remains inside the range.
If the range is not yet confirmed, the script only extends the background box to the current time. In other words, the market structure is still being monitored, but the full profile is not drawn until the range has proven itself.
10) Point of Control Discovery
float maxVol = -1.0
int pIndex = -1
for i = 0 to this.profile.size() - 1
ProfileRow row = this.profile.get(i)
if row.volumeTotal > maxVol
maxVol := row.volumeTotal
pIndex := i
this.pocIndex := pIndex
this.pocVolume := maxVol
ProfileRow pocRow = this.profile.get(pIndex)
this.pocPrice := (pocRow.priceTop + pocRow.priceBottom) / 2.0
This is the first phase inside the value area calculation.
The script scans every profile row and looks for the one with the largest accumulated volume. That row becomes the Point of Control row.
Once that row is found, the script stores:
the row index in pocIndex ,
the largest row volume in pocVolume ,
and the row midpoint price in pocPrice .
So the Point of Control is not guessed from the center of the range or from price action alone. It is derived directly from the heaviest profile row.
11) Expanding to Build the Value Area
float targetVol = this.totalVolume * (pct / 100.0)
float currentVol = maxVol
int upIndex = pIndex + 1
int downIndex = pIndex - 1
while currentVol < targetVol and (upIndex < this.profile.size() or downIndex >= 0)
float upVol = upIndex < this.profile.size() ? this.profile.get(upIndex).volumeTotal : -1.0
float downVol = downIndex >= 0 ? this.profile.get(downIndex).volumeTotal : -1.0
if upVol == -1.0 and downVol == -1.0
break
Here the script begins with the Point of Control row and tries to accumulate enough neighboring volume to reach the selected percentage of total range volume.
First, it calculates targetVol , which is the amount of total volume required for the value area. For example, if the input is 70 percent, the target is 70 percent of the full profile volume.
The process then starts from the Point of Control row. currentVol begins at the Point of Control volume itself. From there, the script looks one row up and one row down and keeps expanding until the target is reached or no more rows remain.
This is the classic logic of building a value area around the highest participation zone.
12) Choosing Whether to Expand Up or Down
bool addUp = false
if upVol > downVol
addUp := true
else if downVol > upVol
addUp := false
else
int distUp = upIndex - pIndex
int distDown = pIndex - downIndex
if distUp < distDown
addUp := true
else if distDown < distUp
addUp := false
else
addUp := true
This section decides which side should be added next to the value area.
If the row above the current zone has more volume than the row below, the script expands upward.
If the row below has more volume, it expands downward.
If both sides have the same volume, the script breaks the tie by comparing distance from the Point of Control. If distance is also equal, it defaults upward.
This matters because value area construction should not be arbitrary. It should expand toward the heaviest nearby participation first. That keeps the final value area centered around the most meaningful volume concentration.
13) Final VAH and VAL Calculation
int finalUp = math.min(upIndex - 1, this.profile.size() - 1)
int finalDown = math.max(downIndex + 1, 0)
this.vah := this.profile.get(finalUp).priceTop
this.val := this.profile.get(finalDown).priceBottom
After expansion is complete, the script converts the final upper and lower included rows into actual price boundaries.
vah becomes the top of the highest included row.
val becomes the bottom of the lowest included row.
These two values form the value area envelope, showing the price zone that contains the selected percentage of all volume traded inside the range.
So the final value area is not a fixed distance from Point of Control. It adapts to the actual row by row distribution.
14) Drawing the Gradient Range Background
method drawBg(RangeData this, color cBgTop, color cBgBot, color cBorder, int rTime) =>
if not na(this.bgBoxes)
for b in this.bgBoxes
b.delete()
this.bgBoxes := array.new()
int bgSlices = 10
float sliceStep = (this.topPrice - this.bottomPrice) / bgSlices
for i = 0 to bgSlices - 1
float bBot = this.bottomPrice + (i * sliceStep)
float bTop = bBot + sliceStep
this.bgBoxes.push(box.new(this.startTime, bTop, rTime, bBot, border_color=na, bgcolor=sliceCol, xloc=xloc.bar_time))
This method handles the visual background of the range.
Before drawing anything new, the script deletes previously drawn background boxes. Then it splits the range vertically into ten slices. Each slice receives an interpolated color between the selected bottom background color and top background color.
Finally, each slice is drawn as a time based box from the range start to the chosen right edge time.
The result is a smooth vertical color transition across the range body, which makes the zone easier to read and visually separates upper and lower sections.
15) Drawing the Histogram, POC, VAH, and VAL
if this.isConfirmed
float maxVol = this.pocVolume
if maxVol > 0
int rangeTimeWidth = math.max(rightTime - this.startTime, 1000)
int maxTimeWidth = math.round(rangeTimeWidth * 0.35)
for i = 0 to this.profile.size() - 1
ProfileRow row = this.profile.get(i)
if row.volumeTotal > 0
float widthRatio = row.volumeTotal / maxVol
int boxTimeWidth = math.round(maxTimeWidth * widthRatio)
int boxLeftTime = rightTime - boxTimeWidth
bool inVA = (row.priceTop <= this.vah and row.priceBottom >= this.val)
color finalHistCol = inVA ? histVaCol : histCol
this.histBoxes.push(box.new(boxLeftTime, t, rightTime, b, border_color=na, bgcolor=finalHistCol, xloc=xloc.bar_time))
this.pocLine := line.new(this.startTime, this.pocPrice, rightTime, this.pocPrice, color=pocCol, style=line.style_solid, width=2, xloc=xloc.bar_time)
this.vahLine := line.new(this.startTime, this.vah, rightTime, this.vah, color=vaCol, style=line.style_dashed, width=1, xloc=xloc.bar_time)
this.valLine := line.new(this.startTime, this.val, rightTime, this.val, color=vaCol, style=line.style_dashed, width=1, xloc=xloc.bar_time)
This is the drawing engine for the completed profile.
For each row with volume, the script calculates a width ratio relative to the Point of Control volume. Rows with more volume receive wider histogram boxes. Rows with less volume receive narrower boxes.
That width is converted into time space, so the histogram grows leftward from the right edge of the range. This creates a compact in range horizontal profile.
The script also checks whether each row lies inside the value area. If it does, the row uses the value area histogram color. If it does not, it uses the normal profile color. This makes the high participation area visually distinct.
Finally, the script draws three key lines across the full width of the range:
Point of Control,
Value Area High,
and Value Area Low.
These lines convert the internal profile data into easy to read structure references on the chart.
16) What Happens When the Range Breaks
if isBroken
activeRange.isActive := false
activeRange.endIndex := bar_index
activeRange.endTime := time
if not activeRange.isConfirmed
if not na(activeRange.bgBoxes)
for b in activeRange.bgBoxes
b.delete()
else
activeRange.calcValueArea(valAreaPct)
activeRange.drawProfile(colorBgTop, colorBgBot, colorProfile, colorProfileVA, colorPOC, colorVA)
lastClosedRangeEndIndex := bar_index
activeRange := na
This block defines the final lifecycle of a range.
When price closes outside the range boundaries, the active structure is terminated. The script records the ending bar and ending time, then checks whether the range had ever become confirmed.
If the range was never confirmed, its background is deleted and the structure is discarded. This prevents weak or short lived ranges from leaving unnecessary clutter.
If the range was confirmed, the script performs a final value area calculation and profile draw on the completed structure. It also stores the ending index so future ranges do not overlap with this one.
Then the active range is cleared from memory, which allows the script to start searching for the next valid structure. Indicator
