Percentile Stretch Bands [AGPro Series]Percentile Stretch Bands
🔹 OVERVIEW
Percentile Stretch Bands is an empirical, distribution-free overextension map. Instead of plotting standard deviation envelopes that assume a normal distribution of price behavior, this indicator samples the actual historical distance between price and a chosen reference (EMA, VWAP, or Anchored VWAP) and draws context-specific Stretch and Extreme bands directly from the empirical percentile distribution. The result is a visual reference of how stretched price is relative to its own historical behavior, adapted to the asset and timeframe being viewed.
🔹 UNIQUE EDGE
Most "stretch" or "volatility band" tools on the platform rely on parametric assumptions — standard deviation multipliers, ATR multiples, or fixed percentage offsets. These approaches collapse when the underlying return distribution is skewed, fat-tailed, or regime-dependent, which is the rule rather than the exception across crypto and FX assets.
Percentile Stretch Bands takes a different path:
• Distribution-free: bands are drawn from the actual empirical percentile of price-to-reference distance, not from a Gaussian assumption.
• Side-specific sampling: upper and lower distances are collected into separate samples, so asymmetric behavior (trending markets, one-sided regimes) is preserved rather than averaged away.
• Regime-aware rendering: when Focus Active Side is enabled, each bar displays only the side relevant to price position, producing a clean single-story chart without visual competition.
• Readiness gating: bands appear only once a minimum number of observations is reached on the active side, with the status panel clearly indicating the collection stage.
🔹 METHODOLOGY
For every bar in the configured lookback window, the signed percent distance between close and the selected reference is computed and partitioned into two historical samples: positive distances (upper extensions) and negative distances in absolute terms (lower extensions).
Each sample is sorted and two percentile cut-offs are extracted independently:
• Stretch percentile (default 80) — the threshold beyond which a distance is considered materially extended.
• Extreme percentile (default 95) — the threshold beyond which a distance is statistically rare within the chosen lookback.
These cut-offs are then translated from percent-distance back into absolute price bands around the active reference, producing four levels: Upper Stretch, Upper Extreme, Lower Stretch, Lower Extreme. The current distance is also ranked against its side's sample and displayed as an ordinal percentile (for example, "Upper P87") in the status panel.
🔹 SIGNALS AND ALERTS
The indicator is a visual overextension map and does not generate directional trade signals. Four alert conditions are exposed for users who want to be notified of boundary events:
• Upper Stretch Cross — close crosses above the Upper Stretch band.
• Upper Extreme Cross — close crosses above the Upper Extreme band.
• Lower Stretch Cross — close crosses below the Lower Stretch band.
• Lower Extreme Cross — close crosses below the Lower Extreme band.
These alerts mark entries into statistically extended zones relative to the empirical sample. They are contextual flags, not trade recommendations.
🔹 KEY INPUTS
Reference
• Reference Mode — EMA, VWAP, or Anchored VWAP baseline
• EMA Length — smoothing length for the EMA reference
• AVWAP Anchor Time — starting timestamp for Anchored VWAP
Statistics
• Lookback — bars used to build the empirical distribution (default 500)
• Minimum Side Sample — observations required before bands appear
• Stretch Percentile — primary extension threshold (default 80)
• Extreme Percentile — rare-extension threshold (default 95)
Display
• Focus Active Side — regime-aware single-story rendering
• Show Active Stretch Zone Box — right-side zone anchor on the active side
• Zone Forward Projection — forward visibility of the active zone
• Band Color Profile — Soft, Premium, or Bold
• Panel Text Size and Label Text Size — Small, Normal, or Large
Level Tags
• Show Level Tags, Show Reference Tag, Tag Mode, Tag Offset Bars
🔹 HOW TO USE
1. Select a reference that fits the asset and timeframe. EMA is a robust default across all instruments. VWAP is suited to intraday equities and futures. Anchored VWAP is used when a specific event origin (earnings, news, structural low) is relevant.
2. Let the status panel reach the "Ready" state. The panel reports active samples and readiness — bands are intentionally withheld until the side-specific sample is sufficient.
3. Read the current percentile rank in the Zone cell. Values near the center indicate price trading close to the reference; values approaching P95 or above indicate the sample's rare extensions.
4. Treat Stretch and Extreme bands as context, not as triggers. A move into the Extreme zone reflects a statistically rare extension on the chosen sample, not a directional signal.
5. Combine with structural tools — trend context, market structure, higher-timeframe bias — before any discretionary decision.
🔹 LIMITATIONS AND TRANSPARENCY
• The indicator is descriptive, not predictive. Percentile bands describe past behavior within the lookback window; they do not forecast future price action.
• Regime shifts can temporarily invalidate historical bands. A sudden volatility expansion will push price beyond extreme levels while the sample re-stabilizes.
• Empirical percentiles require sufficient observations. On very new symbols or short lookbacks, the "Collecting" state is the correct and expected behavior.
• Anchored VWAP mode depends on a meaningful anchor choice. A poorly chosen anchor produces a reference line without structural relevance.
• The active stretch zone box is a visual anchor for screenshots and review, not a projection of future levels.
🔹 RISK DISCLOSURE
This script is a visual analytics tool and is not a strategy, signal service, or financial advice. It does not place orders, manage positions, or recommend directional exposure. Trading involves risk of loss. Users are responsible for their own analysis, risk management, and trading decisions. Indicator

Session VWAP Reaction Engine [AGPro Series]Session VWAP Reaction Engine
Session VWAP Reaction Engine builds the active intraday session VWAP as a reaction anchor and classifies confirmed price behaviour around it into three clear event types — Reclaim, Bounce, and Reject — each validated by a configurable confirmation window, a minimum prior-side bar filter, and an optional VWAP slope alignment filter. A volatility-scaled reaction corridor, compact reaction zones, a session box, and a minimal right-side bias panel turn raw session flow into a clean, publication-ready read on acceptance, rejection, and continuation.
🔷 OVERVIEW
Most session VWAP tools simply plot the line. Session VWAP Reaction Engine goes further: it reads how price behaves around the line inside a selected session window (Asia, London, New York, or Custom) and labels that behaviour using three structural event classes:
• Reclaim — a confirmed cross and acceptance on the new side of session VWAP, after price has spent a minimum number of bars on the opposite side.
• Bounce — a test of the reaction corridor edge that closes back on the prevailing side, with body-range and slope alignment quality checks feeding a Strong / Clean / Weak strength read.
• Reject — a wick into session VWAP that fails to accept on the other side, resolving as pressure against the crossing attempt.
Each confirmed event paints a compact rectangular reaction zone, a single label near the zone, and updates a right-side bias panel so the current session's story is always readable at a glance.
🟦 WHAT MAKES IT DIFFERENT
▸ Event classification, not just a line. Reclaim, Bounce, and Reject are treated as distinct structural events — each with its own confirmation path and visual signature — instead of blending into a single "crossed VWAP" signal.
▸ Corridor-based reaction detection. Bounce and Reject use a volatility-scaled ATR corridor around session VWAP rather than a single-pixel touch, which matches how VWAP is typically tested in real intraday flow.
▸ Slope-aware trend filter. Optional VWAP slope alignment biases bounce events toward the prevailing session direction and filters out counter-flow reactions that tend to fail.
▸ Reaction Strength read. Bounces are classified Strong / Clean / Weak using body-to-range ratio, close location in range, and slope alignment — turning every bounce into a quality-graded event.
▸ Active-Only and Publish Focus visual modes. The chart stays clean by surfacing only the latest session and the latest confirmed reaction, with older structure fading or removed. Ideal for decision-making and presentation.
🟣 METHODOLOGY
1) Session anchor. The selected session (Asia / London / New York / Custom) resets a cumulative PV / V VWAP on every new session bar, giving a fresh reaction reference for that window.
2) Prior-side filter. Before any Reclaim or opposite-side reaction can qualify, price must have spent a minimum configurable number of bars on one side of session VWAP. This isolates structural interactions and rejects chop.
3) Reclaim confirmation. A raw cross must be followed by N consecutive confirmed closes on the new side (default 2) before the Reclaim is validated and painted.
4) Corridor reactions. A volatility-scaled corridor (ATR × user multiplier) around session VWAP defines where Bounce and Reject qualify. Bounces require a corridor-edge test plus a close back on the prevailing side with body confirmation; Rejects require a wick into session VWAP that closes on the originating side.
5) Bias and state synthesis. Live Bias (Bullish / Bearish Acceptance or Pressure, or Neutral Rotation) is derived from close position relative to VWAP and corridor. Reaction State reflects the latest confirmed event (Bullish Acceptance, Bearish Acceptance, Bounce Support, Bounce Resistance, Reject Pressure, Reject Lift).
6) Post-session context. After the session ends, the last session VWAP and corridor stay on the chart for a configurable number of bars so recent structure remains visible without polluting older history.
🟢 SIGNALS & ALERTS
Eight alertcondition hooks are provided, all bar-close confirmable:
• Bullish Session VWAP Reclaim Confirmed
• Bearish Session VWAP Reclaim Confirmed
• Bullish Session VWAP Bounce Confirmed
• Bearish Session VWAP Bounce Confirmed
• Bullish Session VWAP Reject Confirmed
• Bearish Session VWAP Reject Confirmed
• Reaction State Shifted Bullish
• Reaction State Shifted Bearish
A "Confirmed Alerts Only" toggle restricts firing to barstate.isconfirmed so alerts will not repaint before close.
🟡 KEY INPUTS
Session Engine
• Selected Session — Asia / London / New York / Custom
• Custom Session — HHmm-HHmm format (used when Custom is selected)
• Session Timezone — Exchange / UTC / London / New York / Singapore
Reaction Engine
• Reclaim Confirm Bars — number of confirmed closes required after a cross (default 2)
• Minimum Prior Side Bars — whipsaw filter on the opposite side before qualifying (default 2)
• Reaction Corridor Width (ATR) — half-width of the ATR corridor around VWAP (default 0.20)
• Reaction Zone Length (Bars) — how far a confirmed zone extends right (default 14)
• Use VWAP Slope Alignment — trend filter for bounce events (default on)
• VWAP Slope Lookback — slope estimation window (default 3)
• Post-Session Context Bars — how long last session structure stays visible (default 18)
Visual Story
• Active-Only Mode, Publish Focus Mode, Show Previous Reaction Ghost
• Show Session Box, Show VWAP Reaction Corridor, Show Confirmed Reaction Zone
• Show Reaction Label, Show Session VWAP, Show Right-Edge SVWAP Tag
• Visible History Bars (default 700), Label Font Size (default Normal)
Panel
• Show Bias Panel (top-right), Panel Font Size (default Normal)
Alerts
• Confirmed Alerts Only (default on)
🟠 HOW TO USE
1) Apply to any intraday timeframe (1m–4h). Session VWAP requires intraday data to anchor the session reference.
2) Choose the session that best fits your market focus — New York for US equities and US-hours crypto, London for FX and European hours, Asia for Asian-session flow, or a Custom window.
3) Watch the corridor as the session develops. Bounce and Reject events inside the corridor describe how the session is defending or failing the VWAP reference.
4) Use Reclaim events as session-context shifts — combine with your own structure (HTF trend, S/R, order flow) rather than treating them as standalone entries.
5) Read the right-side Bias Panel for a compact summary: Session Status, Bias, Last Reaction, Reaction Strength, Signal Age, Reaction State, and Latest Line status.
6) For screenshots and presentation use, keep Publish Focus Mode and Active-Only Mode enabled — older sessions fade and only the latest structure remains dominant.
🟤 LIMITATIONS & TRANSPARENCY
• Intraday-only. Session VWAP is meaningful only on intraday timeframes; on daily and higher, the indicator will remain idle.
• Session VWAP resets at the start of each selected session. Reactions are evaluated within that window only.
• Confirmed events use bar-close logic. Intra-bar touches of the corridor are not counted as events until the bar closes.
• Volume-dependent. Session VWAP uses symbol volume. On symbols without meaningful volume, VWAP accuracy will be limited.
• The Reaction Corridor is a volatility-scaled visual and detection band, not a support/resistance guarantee.
⚠️ RISK DISCLOSURE
This indicator is an analytical and visualisation tool. It is not a trading strategy, does not generate buy/sell recommendations, does not predict future price direction, and does not guarantee any specific outcome. All signals, zones, and panel readings describe past and current price behaviour around session VWAP, not forecasts.
Markets carry risk of loss. Always use independent risk management, position sizing, and your own trading plan. Past behaviour of any signal does not imply future performance.
Indicator

Repricing Belt Engine [AGPro Series]Repricing Belt Engine
🔹 OVERVIEW
Repricing Belt Engine identifies qualifying displacement impulses and constructs ATR-scaled repricing belts around the impulse body, then tracks each belt's first-revisit lifecycle through three discrete outcomes: Held, Rejected, and Broken. The engine turns raw impulse candles into structured, evaluable reaction zones — giving traders a clean framework for studying how price behaves when it returns to the scene of a decisive move.
Unlike generic supply/demand or order block tools, this indicator does not simply mark impulse zones and leave them on the chart indefinitely. Every belt has a full state machine: Active → first qualifying touch → terminal outcome. A top-right status panel summarizes active belts, current belt context, 50-bar directional bias, and outcome counts so the chart context is always one glance away.
🔸 UNIQUE EDGE
Most displacement or supply/demand indicators stop at drawing a box. Repricing Belt Engine differentiates itself with four specific mechanics:
• ATR-scaled geometry — Belt width is normalized by ATR (not raw body size), producing consistently visible zones across volatility regimes and symbols. Optional "Auto (Body)" and "Body 70%" modes are available for traders who prefer tighter constructions.
• Three-outcome lifecycle model — Every belt resolves into one of five states (Active, Held, Rejected, Broken, Expired) based on penetration depth and close position. No more static zones cluttering the chart after price has decisively moved on.
• Depth-gated touch qualification — Wick-grazing does not trigger state transitions. A revisit must penetrate the belt by a configurable minimum depth (ATR-relative) before it counts, filtering noise from meaningful reactions.
• Excursion-tolerant hold detection — A belt can be marked Held even when price briefly dips beyond it, as long as the close respects the belt and the excursion stays within the Hold Tolerance band. This matches how institutional levels actually react in live markets.
🔹 METHODOLOGY
1. Impulse Qualification: A bar qualifies as an impulse when its body magnitude exceeds Impulse Threshold × ATR AND its body-to-range ratio is at least Min Body / Range Ratio. Both gates must pass — this filters out long-wick bars that look decisive but are not.
2. Belt Construction: On a qualifying impulse, a belt is drawn using the selected Width Mode. In ATR Scaled mode (default), the belt is centered on the impulse body midpoint and spans ±ATR Width Half-Span × ATR. A mid-line is drawn through the belt center.
3. Cooldown: A minimum bar gap (Cooldown Between Belts) is enforced between consecutive belt formations, preventing rapid clustering in extended trends.
4. Lifecycle Tracking: On every confirmed close, each active belt is evaluated:
• If close breaches the belt with excursion beyond Reject Tolerance → Broken
• If close recovers but excursion exceeded Hold Tolerance → Rejected
• If close respects the belt after a qualifying touch → Held
• If no resolution within Belt Max Lifetime bars → Expired
5. Active Cap: A maximum number of concurrent active belts is enforced (Max Active Belts). When the cap is reached, the oldest active belt is auto-expired to keep the chart focused on the current narrative.
🔸 SIGNALS & ALERTS
On-chart visuals:
• Bull/Bear belt zones with ATR-scaled width and mid-line
• Impulse origin markers (small triangles) anchoring each belt to its source bar
• State-colored labels at resolution: Held OK (state color), Broken X (opposite state color), Rejected (neutral, shown only in Detailed label mode)
• Faded rendering for resolved belts so the active story stays visually dominant
Top-right status panel:
• Active belt count
• Current belt context (side, position, held flag)
• 50-bar directional bias (Bull UP / Bear DN / Neutral)
• 50-bar outcome counts (Held / Rejected / Broken)
Alert conditions:
• Repricing Belt Formed
• Belt Touched (first qualifying revisit)
• Belt Held
• Belt Rejected
• Belt Broken
🔹 KEY INPUTS
Engine
• Impulse Threshold (x ATR) — impulse size gate
• Min Body / Range Ratio — decisive-close gate
• ATR Length — volatility normalization period
• Cooldown Between Belts — anti-clustering filter
Belt
• Width Mode — ATR Scaled / Auto (Body) / Body 70%
• ATR Width Half-Span — belt half-width in ATR units
• Belt Max Lifetime — auto-expiry age
• Max Active Belts — concurrent belt cap
State Thresholds
• Min Touch Depth (x ATR) — qualifying penetration
• Hold Tolerance (x ATR) — clean-hold excursion ceiling
• Reject Tolerance (x ATR) — rejected-vs-broken threshold
Visuals
• Label Mode — Clean / Detailed
• Panel Font Size, Label Font Size
• Show Impulse Markers toggle
🔸 HOW TO USE
1. Apply to any symbol and timeframe. The engine is timeframe-agnostic and self-calibrates via ATR.
2. Watch for new belt formations on displacement impulses. The impulse marker confirms the origin bar.
3. When price returns, observe the lifecycle resolution: Held reactions often mark continuation points; Broken reactions frequently signal structural shifts.
4. Use the 50-bar Bias readout for directional context — sustained one-sided belt formation suggests an active trend.
5. Combine with structure tools (swing highs/lows, trendlines) for confluence. The belt is a reaction zone, not a standalone entry system.
6. Tune Impulse Threshold per timeframe: lower values (1.5–1.7) for intraday, higher (1.8–2.2) for swing.
🔹 LIMITATIONS & TRANSPARENCY
• This indicator is not a strategy and does not generate buy/sell signals. It is an analytical visualization tool.
• Belt outcomes are historical observations, not predictions. Past Held/Broken patterns do not guarantee future reactions.
• Performance varies by symbol, timeframe, and market regime. Always test parameter settings on the instruments you trade.
• Very low-liquidity or gappy symbols may produce noisy impulses. Increase Impulse Threshold or Min Body Ratio for cleaner selection.
• The Max Active Belts cap intentionally limits chart information to keep focus on the current context — raise it only if your workflow benefits from longer belt history.
⚠️ RISK DISCLOSURE
This script is provided for educational and analytical purposes only. It is not financial advice and does not constitute a recommendation to buy, sell, or hold any asset. Trading involves substantial risk of loss. Always conduct your own analysis, manage risk responsibly, and never trade with capital you cannot afford to lose. Past performance of any pattern or setup is not indicative of future results.
Published as Public / Open-source under Mozilla Public License 2.0. Indicator

Mean Reversion Corridors [AGPro Series]Mean Reversion Corridors
🔹 Overview
Mean Reversion Corridors is a volatility-adaptive deviation framework that maps how far price has stretched from a chosen fair-value center and classifies that stretch into two actionable zones. An inner corridor marks the early reversion band where price is meaningfully extended but not yet extreme; an outer corridor marks statistical exhaustion where continuation becomes less probable under normal conditions. A higher-timeframe trend filter separates controlled mean reversion from failure-continuation expansions, so traders can tell fading the edge from respecting a real break — all from a single clean overlay.
🔸 Unique Edge
Most band systems (Bollinger, Keltner, ATR channels) offer a single width engine and a single band pair, leaving the trader to guess whether a tag is an exhaustion or a breakout. Mean Reversion Corridors is built around three ideas that work together:
- A dual-engine width unit that linearly blends ATR (range-based) and Standard Deviation (dispersion-based) so the corridor is stable on both gap-heavy and low-dispersion regimes.
- A two-layer corridor with distinct roles — inner for early stretch, outer for exhaustion — rendered as transparent zones you can read at a glance.
- A regime-aware state machine that uses a higher-timeframe trend filter to reclassify outer tags as either reversion candidates or failure-continuation, tracked as explicit REV and FAIL states with a bounded confirmation window.
🧠 Methodology
- Center Model — user choice of EMA, VWMA (volume-aware, default) or HMA (responsive), calculated on chart closes.
- Width Unit — the current volatility unit is a linear blend: (1 − blend) × ATR + blend × StDev, protected against empty volatility periods.
- Corridors — inner band at ±(width × inner multiplier), outer band at ±(width × outer multiplier). Stretch is reported in width-unit sigma.
- Trend Filter — the same center model is evaluated on a higher-timeframe via request.security with lookahead off, and its slope is normalized by ATR so the "strong" threshold is volatility-aware, not symbol-specific.
- State Machine — tracks the most recent outer-band extreme with a rolling 20-bar confirmation window. A reversion is confirmed only when price closes back inside the inner corridor and the trend filter is not strongly aligned with the original stretch. When the trend is strongly aligned, the outer break is reclassified as corridor failure (continuation).
- All conditions evaluate on confirmed bars to avoid repainting behavior.
⚡ Signals & Alerts
On-chart markers:
- REV — reversion confirmed back through the inner band after an outer extreme, trend-filtered.
- FAIL — corridor failure / trend-aligned continuation beyond the outer band.
Six bar-close alert conditions:
- Inner corridor entered — upside stretch
- Inner corridor entered — downside stretch
- Outer corridor hit — upside exhaustion
- Outer corridor hit — downside exhaustion
- Reversion confirmed
- Corridor failure (continuation)
⚙️ Key Inputs
- Center Model — EMA / VWMA / Hull
- Center Length and Volatility Length — independent lookbacks
- ATR ↔ StDev Blend — balance between range and dispersion engines
- Inner Corridor Width and Outer Corridor Width — in volatility units
- Trend Filter — enable, timeframe, length, strength threshold
- Visuals — outer-only mode, center line, fills, edge tags, state labels, label size
- Info Panel — show/hide, position (six options), font size
- Alerts — individually toggleable for each of the six events
📖 How to Use
- Start with the defaults on your main chart timeframe. The 34-period VWMA center, balanced blend and 1.0 / 2.2 inner/outer multipliers are chosen to work as a neutral starting point across liquid markets.
- Inner corridor tags are early stretch cues — they flag that price is extended, not that a turn is due. Use them as context for setups, not as standalone signals.
- Outer corridor tags with the trend filter neutral or opposed are the primary mean reversion setup; wait for a REV confirmation back inside the inner band before acting.
- When FAIL appears, the stretch is trend-aligned; treat the outer band as continuation, not resistance. This is the signal to stop fading.
- Use the Info Panel to read current state, reversion bias, trend regime and stretch magnitude in sigma at a glance.
⚠️ Limitations & Transparency
- This is an analytical tool, not a trading strategy or financial advice. It does not predict future price.
- Band-based classification assumes statistical behavior; during shocks, news events or illiquid sessions the width engine can lag.
- The trend filter uses a higher-timeframe slope — it reacts slower than short-term momentum by design, which is the intended behavior.
- Signals are evaluated on confirmed bars; intrabar crosses are not counted as events.
- Past behavior of any indicator does not guarantee future results. Always apply your own risk management. 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

Liquidity Void Navigator [AGPro Series]Liquidity Void Navigator
🔹 OVERVIEW
Liquidity Void Navigator identifies impulsive price displacements that were produced with disproportionately low volume participation — the institutional footprint of a true liquidity void. Unlike geometric gap concepts that rely purely on wick-to-wick imbalance, this engine measures the efficiency of each impulsive bar: how much price moved relative to how much volume was transacted. When price travels faster than the order book justifies, a magnet zone is born. These zones frequently act as high-probability retest and mean-reversion targets for SMC and ICT traders.
🔹 UNIQUE EDGE
Most gap-based tools on PulseWire detect Fair Value Gaps using a 3-bar geometric pattern. This indicator uses a fundamentally different signature:
- Volume Efficiency Ratio (core innovation): efficiency = (volume / avgVol) / (range / ATR). Values below the threshold reveal bars where price displacement outpaced volume effort — the statistical definition of a liquidity void.
- Body-based zones, not wick-to-wick: the void box spans the impulsive candle body, excluding wicks that represent liquidity sweeps.
- Dynamic lifecycle management: zones are tracked from birth through mid-line mitigation, with configurable trigger modes (close cross, wick touch, or full fill).
- Strongest-void emphasis: the lowest-efficiency active void automatically receives a bold neutral-colored border, giving traders an at-a-glance view of the most reliable magnet on the chart.
🔹 METHODOLOGY
Each completed bar is evaluated against four quality filters:
1. Range Expansion — bar range must exceed ATR × configurable multiplier (default 1.3).
2. Volume Efficiency — the efficiency ratio must fall below the configurable cap (default 0.85).
3. Minimum Height — void must be at least a fraction of ATR to filter micro-noise (default 0.5×).
4. Body Dominance — the candle body must represent at least 50% of the total range, confirming directional conviction rather than indecision.
Qualifying bars create a directional void zone spanning the body. An optional next-bar gap confirmation adds stricter FVG-style filtering. Active zones are continuously evaluated against the selected mitigation mode and updated in real time. Oldest active voids are pruned when the per-side cap is exceeded, keeping the chart focused on recent, actionable structure.
🔹 SIGNALS & ALERTS
Four alert conditions are available:
- New Bullish Liquidity Void — an upward impulsive void is detected.
- New Bearish Liquidity Void — a downward impulsive void is detected.
- Bull Void Mitigated — closing price crosses the mid-line of an active bullish void from above.
- Bear Void Mitigated — closing price crosses the mid-line of an active bearish void from below.
Each alert fires only on bar close to eliminate repainting concerns. Alert messages include the ticker and timeframe for multi-chart workflows.
🔹 KEY INPUTS
Void Detection
- Volume Baseline Lookback — window for average volume and range calculations.
- Min Range Expansion (×ATR) — minimum impulsive bar size.
- Max Volume Efficiency Ratio — core void qualification threshold.
- Min Void Height (×ATR) — filters micro-voids.
- Require Gap with Next Bar — optional strict confirmation.
- Mitigation Trigger — choose between Close Cross (institutional default), Wick Touch (strict), or Full Fill (swing).
Lifecycle
- Max Active Voids per Side — visual cap to prevent chart clutter.
- Zone Right Extension — how far zones project to the right.
- Show Mitigated Voids — optionally display filled zones in gray.
Visuals
- Bullish / Bearish / Mitigated colors, mid-line toggle, projection arrow toggle, label size.
Panel
- Show / position / font size.
🔹 HOW TO USE
Trend-aligned reversion entries: When price returns to an unmitigated void in the direction of the higher-timeframe trend, watch for rejection at the mid-line or far edge as a potential long (bull void) or short (bear void) trigger.
Breakout continuation context: Newly formed voids in the direction of a breakout often indicate institutional participation. Waiting for a retest of the void zone can provide improved risk-to-reward compared to chasing the breakout bar.
Strongest-void bias: The yellow-bordered void on the chart represents the lowest-efficiency (statistically strongest) active zone. Traders can treat it as the highest-probability magnet for price revisits.
Fill Rate context: A persistently high fill rate on a given symbol or timeframe indicates that voids fill rapidly — more suitable for scalping. A lower fill rate suggests that unfilled voids accumulate meaningfully, offering swing-style opportunities.
Multi-timeframe workflow: Identify voids on a higher timeframe (4H or 1D) as strategic bias zones, then use a lower timeframe (15m or 1H) for tactical execution when price approaches those higher-timeframe voids.
🔹 LIMITATIONS & TRANSPARENCY
- This indicator is built for liquid markets with reliable volume data. Thinly traded symbols or instruments without accurate volume feeds (some spot FX, certain indices) will produce unreliable results.
- Not every detected void will be retested or filled. Voids are statistical zones of interest, not guarantees.
- The indicator is a visualization and analytical tool, not a trading strategy. It does not generate buy or sell recommendations.
- Fill rate statistics are computed over the visible history of active and mitigated voids and are approximate; they are intended as a relative gauge of symbol behavior, not as a backtested performance metric.
- Mitigation triggers are bar-close based to avoid repainting. Intrabar signals may appear and disappear until the bar confirms.
- Zones have a fixed right extension from their birth bar; the indicator does not extend zones infinitely.
🔹 RISK DISCLOSURE
Trading financial markets involves substantial risk of loss and is not suitable for all investors. Past performance of any technical indicator, including this one, is not indicative of future results. This tool is provided for educational and analytical purposes only and does not constitute financial advice, investment recommendations, or solicitation to trade. Users are solely responsible for their own trading decisions, risk management, and outcomes. Always conduct independent analysis and consult with a qualified financial advisor before making investment decisions. Indicator

Cumulative Volume Delta Flow [AGPro Series]Cumulative Volume Delta Flow
🔹 **Overview**
Cumulative Volume Delta Flow is a hybrid CVD engine designed to expose order-flow imbalances without requiring footprint charts or exchange-native buy/sell data. It reconstructs cumulative delta using lower-timeframe breakdown when available, with intrabar polarity as a universal fallback — making it work on every symbol and every timeframe. On top of this engine, a triple-layer divergence detector identifies Regular, Hidden, and statistical Exhaustion signals, and every signal is scored by its own statistical strength with a ★/★★/★★★ rating system printed directly on the label.
The indicator is built for traders who want smart-money context at a glance: when buyers are absorbing, when a rally is losing real participation, and when a climactic flush is likely to reverse — with an immediate visual cue of how strong each signal is relative to the recent flow regime.
🔹 **Unique Edge**
Most CVD indicators are single-mode: either they plot cumulative delta, or they call a Regular divergence. This script combines four layers that rarely appear together in one tool:
- Hybrid engine with transparent fallback (no silent failure on high TFs)
- Exhaustion detection based on standard-deviation of CVD change, not price — catches reversals that price-only divergence misses
- Per-signal ★/★★/★★★ strength rating using type-specific statistical metrics (pivot-gap σ for Regular/Hidden, change σ for Exhaustion), so traders instantly know which signals deserve attention
- Optional reaction zones anchored at flow-driven pivots, behaving as dynamic support/resistance born from real participation events rather than pure price structure
🔹 **Methodology**
- The engine computes two parallel delta streams every bar: an intrabar polarity stream (weighted by wick balance for neutral/doji candles) and a lower-timeframe stream that iterates sub-bars and signs each by its close-vs-open direction
- In Hybrid mode, the LTF stream is preferred when it yields a non-zero value; the intrabar stream is used as fallback so the indicator never goes blank on exotic tickers or high timeframes
- A session/daily/weekly reset prevents long-run drift and keeps the cumulative counter meaningful across regime changes
- Pivots are detected on both price and CVD with a shared lookback window; the last two price pivots and their paired CVD values are tested for all four classical divergence relationships
- Exhaustion is a separate statistical trigger: the single-bar CVD change is compared against a 50-bar standard deviation; a σ breach in the direction opposite to the candle body is flagged as climactic absorption
- Each divergence label is rated with stars based on its type: Regular and Hidden use the CVD-pivot gap normalized by 50-bar CVD level stdev (how far apart the two flow pivots are), while Exhaustion uses the σ multiple of the current CVD change (how extreme the climactic event is)
- A cooldown window suppresses signal clustering in chop, and labels are offset by ATR-scaled distance with a leader line so they never collide with candles
🔹 **Signals & Alerts**
On-chart labels with star rating:
- Reg Bull / Reg Bear ★-★★★ — classical reversal divergence (price exhausts, flow refuses)
- Hid Bull / Hid Bear ★-★★★ — continuation divergence (pullback inside an active trend)
- Exh Bull / Exh Bear ★-★★★ — statistical flow climax above the σ threshold
Star thresholds for Regular/Hidden: ★★★ ≥ 2.0σ gap, ★★ ≥ 1.0σ gap, ★ < 1.0σ.
Star thresholds for Exhaustion: ★★★ ≥ 3.0σ, ★★ ≥ 2.0σ, ★ < 2.0σ (minimum trigger is 1.75σ).
Each signal carries its own color code and a leader line connecting the label back to the source candle for fast visual reading. Six discrete alertcondition slots are exposed plus three proactive alert() calls grouped by divergence family, so traders can route regular, hidden, and exhaustion signals to different channels.
🔹 **Key Inputs**
- Calculation Method: Hybrid, LTF Only, or Intrabar Only
- LTF Resolution: Auto (adaptive by chart TF) or fixed 1 / 3 / 5 / 15m
- CVD Reset: Session, Daily, Weekly, or None
- Pivot Length: 2–15 bars
- Toggles for Regular / Hidden / Exhaustion layers independently
- Exhaustion Threshold (σ): 1.0–4.0, default 1.75
- Min Bars Between Signals: anti-clustering cooldown (default 15)
- Reaction Zones: optional, with ATR width, extend length, and max active cap
- Label Size + Label Offset (ATR) for visual tuning
- Info Panel: 5 positions, 4 text sizes, full hide toggle
🔹 **How to Use**
- On the 4H timeframe, run the defaults on liquid instruments: BTCUSDT, ETHUSDT, SPX, ES, major FX pairs
- Treat ★★★ signals as the highest-priority reads of the chart — these are statistical outliers
- Treat ★★ signals as the normal tradeable population — the bulk of decision-making happens here
- Treat ★ signals as background context — use them for bias confirmation, not as primary entries
- Regular divergences are reversal warnings at structural highs/lows; they are most reliable when aligned with a key horizontal level or trendline
- Hidden divergences are trend-continuation entries during pullbacks inside a confirmed trend
- Exhaustion signals mark participation climaxes and often coincide with short-term reversals even when no classical pivot has formed yet
- Check the Info Panel's Last Signal row for the most recent event type and its star rating without scanning the chart
- Enable Reaction Zones when you want persistent S/R context from flow events; keep them off for minimal, label-only use
- Consider combining with a structure tool from the AGPro Series (SFP, Breaker, Unicorn) for confluence
🔹 **Info Panel**
The compact info panel on the chart surfaces seven live metrics: the current cumulative CVD value, the CVD trend classification (Up/Down/Flat based on price relative to its own EMA 21), the last signal's full name and star rating in color, the rolling divergence count over the last 200 bars (Bull / Bear), and the bar-age of the most recent bullish and bearish events. This gives a full situational snapshot without scrolling.
🔹 **Limitations & Transparency**
- CVD from intrabar polarity is an approximation, not true tick-level order flow. Exchange-native buy/sell volume is only available through footprint data
- On very high timeframes (Daily+), LTF breakdown may return partial data; Hybrid mode is recommended
- Divergence signals appear only after both pivot legs are confirmed; the second pivot needs `pivotLen` bars of right-side confirmation, so signals print with that lag
- Exhaustion requires at least 50 bars of CVD history for the standard-deviation baseline
- Star ratings are statistical descriptors of signal strength relative to recent flow, not trade-quality guarantees
- Past performance of any divergence pattern does not guarantee future results; this tool surfaces probabilistic context, not guaranteed reversals
🔹 **Risk Disclosure**
This indicator is an analytical framework, not a trading system or financial advice. Signals are technical observations intended to support decision-making; they do not account for fundamentals, news, liquidity, or your risk tolerance. Always use proper position sizing, stop-loss placement, and risk management. Test the tool on historical data and in a simulated environment before deploying it on live capital. Trading carries risk of substantial loss. Indicator

Swing Failure Pattern (SFP) Engine [AGPro Series]Swing Failure Pattern (SFP) Engine
────────────────────────────────────────────────────────────
OVERVIEW
────────────────────────────────────────────────────────────
Swing Failure Pattern (SFP) Engine detects high-probability liquidity sweep
events at prior swing highs and lows. An SFP occurs when price pierces a
recent swing level with a long wick but closes back inside the prior range,
signalling failed continuation and potential mean reversion. Each event is
scored on four components, drawn as a mid-sized support/resistance reaction
zone, and tracked through its live cycle — with panel statistics on MFE,
MAE, and hit rate. Designed for visual pattern reading and confluence;
not a buy/sell system.
────────────────────────────────────────────────────────────
UNIQUE EDGE
────────────────────────────────────────────────────────────
Most SFP indicators mark the sweep candle and stop there. This engine treats
each SFP as a living support/resistance band: the zone extends to the right
every bar and only freezes when the swept level is actually broken on close.
That preserves the SR context that traders use in real decisions, without
cluttering charts with zones that never die. A composite score (0-100),
confluence grouping of nearby events within 0.5 ATR, and live MFE/MAE
tracking in ATR units turn a common pattern into a measurable framework.
────────────────────────────────────────────────────────────
METHODOLOGY
────────────────────────────────────────────────────────────
Swing detection uses pivot highs and lows confirmed by a configurable
lookback. An SFP is confirmed on bar close when four conditions are met:
1. The bar wicks beyond a prior unswept swing high (bearish) or swing low
(bullish) within the active lookback window.
2. The close reclaims the prior range by at least the user-defined ATR
distance (default 0.25 ATR).
3. The sweep-side wick represents at least the minimum wick ratio of total
bar range (default 55 percent).
4. Bar volume exceeds its 20-period SMA by the configured multiplier
(optional, default 1.15x).
Composite score (0-100) weights wick ratio (40), reclaim distance in ATR
(30), volume confirmation (15), and swing age (15). Only events above the
minimum score threshold are drawn. Each confirmed SFP removes its swept
swing from the active array to prevent re-triggering on the same level.
Confluence grouping merges same-side events within 0.5 ATR into a single
labelled zone with an x2, x3 count.
────────────────────────────────────────────────────────────
SIGNALS & ALERTS
───────────────────────────────────────────────────────────
Visual signals on chart:
- State-coloured label at the sweep bar reading Bull SFP or Bear SFP with
the composite score (e.g., Bull SFP 74). Confluence-grouped events are
suffixed with the merge count (e.g., Bear SFP 81 x2).
- Rectangular zone spanning the swept level and the SFP close, with a
small ATR buffer. The zone extends right each bar while active and
freezes in neutral grey when the swept level breaks.
- Dotted horizontal line marking the swept swing level.
- Dashed projection line indicating the reversal direction.
Alert conditions:
- Bullish SFP: fires on the confirmation bar of a bullish event above
the score threshold.
- Bearish SFP: same, for bearish events.
- Zone Invalidation (optional): fires when an active zone's swept level
is broken on close.
────────────────────────────────────────────────────────────
KEY INPUTS
────────────────────────────────────────────────────────────
Detection:
- Swing Pivot Length - bars each side of a pivot (default 5).
- Swing Lookback - how far back active swings are tracked (default 120).
- Min Wick Ratio - minimum sweep wick as fraction of bar range (0.55).
- Min Reclaim Distance (ATR) - how far close must reclaim (0.25 ATR).
- Require Above-Average Volume and Volume Multiplier (default 1.15x).
- ATR Length (default 14).
Scoring & Filters:
- Min SFP Score (default 55 of 100).
- Max Active Zones retained on chart (default 8).
- Stats Timeout - bars after which an unresolved event is counted in
averages (default 30). Does not affect zone visibility.
Visuals:
- Zone transparency (default 80), confluence grouping distance (0.5 ATR),
label size, and toggles for zones, swing lines, and reversal projections.
Panel:
- Location (8 options), Dark/Light theme, text size.
Alerts:
- Independent toggles for bullish, bearish, and invalidation alerts.
────────────────────────────────────────────────────────────
HOW TO USE
────────────────────────────────────────────────────────────
Apply the indicator to any chart and timeframe. Higher timeframes (1h and
above) produce cleaner swings; lower timeframes require a higher Min Wick
Ratio and Min Score to filter noise.
Read SFPs as liquidity sweep events, not standalone entries. A bullish SFP
below a prior swing low indicates that sellers failed to extend the move —
often a location where larger participants accumulate. The score reflects
sweep quality; higher scores (70+) generally correspond to cleaner
rejections. Use the zone as a support/resistance reference until it is
invalidated.
Panel statistics describe the observed sample on the loaded chart, not a
backtested system. MFE Hit Rate is the percent of resolved zones that
reached 1 ATR in the SFP direction before the swept level broke — it is a
quality reference, not a win rate for any trading strategy.
────────────────────────────────────────────────────────────
LIMITATIONS & TRANSPARENCY
────────────────────────────────────────────────────────────
- Signals confirm on bar close; intrabar conditions may change until close.
- Pivot detection introduces a natural bars-of-right-context lag equal to
the Pivot Length. This is intrinsic to any pivot-based approach.
- Panel statistics reflect events visible on the current chart load and
will vary with timeframe, symbol, and bar range.
- MFE Hit Rate is not a profit expectation. It measures whether price
moved 1 ATR in the SFP direction before the swept level broke.
- Volume confirmation uses chart volume and may behave differently on
symbols with inconsistent volume data.
- The indicator uses standard Pine Script drawing objects. Chart reload
may reset ephemeral visual states of resolved zones.
────────────────────────────────────────────────────────────
RISK DISCLOSURE
────────────────────────────────────────────────────────────
This indicator is a visualisation and analysis tool. It is not a trading
system, not financial advice, and not a signal service. It does not
predict future price movement. All trading decisions carry risk of loss
and are the sole responsibility of the user. Historical pattern behaviour
does not guarantee future results. Test thoroughly on your instruments
and timeframes before making any decisions. Indicator

Fractal Liquidity Map [JOAT]Fractal Liquidity Map
Introduction
The Fractal Liquidity Map renders the complete institutional liquidity landscape through six non-overlapping visual systems that each occupy their own visual lane: Williams Fractal markers, cluster support/resistance zones, equal highs/lows liquidity pool lines, sweep detection signals, multi-length pivot levels, and a Hann FIR trend ribbon. Every element is designed to coexist without visual clutter — cluster zones are thin dual-line bands, liquidity pools are dashed lines, sweeps are plotshape arrows that require no screen space accumulation.
The core problem this solves: most liquidity tools accumulate dozens of overlapping boxes that become unreadable over time. This indicator uses a clean-redraw architecture for zones — all drawing objects are deleted and recreated on each bar using only current price-level arrays, preventing any stacking, overlap, or ghost boxes from persisting.
Core Concepts
1. Williams Fractal Detection
A fractal high is a bar whose high is the highest in a configurable N-bar window on both sides; a fractal low is the lowest in the same window. Fractals are confirmed on bar close — the center bar's status is only registered after the right-side confirmation bars have closed:
bool frac_hi = high == ta.highest(high, i_frac_len * 2 + 1)
bool frac_lo = low == ta.lowest (low, i_frac_len * 2 + 1)
Fractal marks are rendered as small diamond shapes above and below the relevant bars, providing the foundational structural pivot map from which all other elements derive.
2. Cluster S/R Zones
When N or more fractals converge within a price band of 1x ATR, they are classified as a cluster zone — an area where price has pivoted multiple times, indicating persistent institutional interest. These are rendered as thin dual-line bands (solid top edge + dotted bottom edge) rather than filled boxes:
// Clean-redraw architecture: all lines deleted and recreated on barstate.islast
if barstate.islast
for each level in clust_res_lvls
line.new(start_bar, level, bar_index + 10, level,
color = i_res_col, style = line.style_solid, width = 2)
line.new(start_bar, level - atr_14 * 0.3, bar_index + 10, level - atr_14 * 0.3,
color = color.new(i_res_col, 60), style = line.style_dotted)
Only the price levels are stored between bars (as float arrays). The drawing objects are fully recreated on last bar, guaranteeing zero accumulation or overlap regardless of how many bars the zone has existed.
3. Equal Highs/Lows Liquidity Pools
When two or more swing highs (or lows) within a lookback window fall within a tolerance band of each other (default 0.15x ATR), they form an Equal Highs (EQH) or Equal Lows (EQL) liquidity pool. These levels are targets for stop-hunt sweeps by institutional participants because retail stop orders cluster above EQH and below EQL:
float pool_tol = i_pool_tol * atr_14
bool near_hi = math.abs(_pool_hi - _prev_pool_hi) < pool_tol
bool near_lo = math.abs(_pool_lo - _prev_pool_lo) < pool_tol
Pools render as thin dashed lines with compact EQH/EQL labels. Like cluster zones, they use the clean-redraw architecture — no boxes, no accumulation, no stacking.
4. Sweep Detection
A sweep occurs when price breaks through a known liquidity pool level (above EQH or below EQL) and then closes back inside the prior range — confirming a stop-hunt without follow-through:
bool sweep_hi = high > pool_hi_ref and close < pool_hi_ref
bool sweep_lo = low < pool_lo_ref and close > pool_lo_ref
Sweeps are displayed as plotshape arrows (upward triangle below bar for bullish sweep, downward triangle above bar for bearish sweep). Because plotshape markers occupy zero screen real estate compared to boxes, sweeps cannot overlap or accumulate. An optional single-bar background flash draws attention to sweep bars.
5. Multi-Length Pivot Levels
Three configurable pivot lengths (default: 10, 30, 75 bars) generate independent sets of support and resistance levels. Each set uses its own resolution and color gradient encoding distance from current price — nearby levels are opaque, distant levels are transparent. Deduplication logic prevents levels from multiple pivot lengths from overlapping if they fall within ATR proximity.
6. Hann FIR Trend Ribbon
A three-layer Hann Window FIR filter ribbon provides directional bias in the background. The ribbon is fully described in the Adaptive Spectral Bands indicator. Here it serves as a trend filter — when the ribbon is bullish (fast layer above slow), resistance zones are more likely to hold; when bearish, support zones are the focus. Ribbon crossover events flash the background briefly.
Features
Williams Fractal Marks: Configurable lookback diamond markers at confirmed fractal highs and lows
Cluster S/R Zones: Dual-line thin bands at price areas where multiple fractals converge, with full deduplication
Liquidity Pool Lines: Dashed lines at equal highs/lows with EQH/EQL labels — no boxes, no stacking
Sweep Detection: plotshape arrows at confirmed liquidity sweep bars plus optional background flash
Multi-Length Pivots: Three independent pivot resolutions with distance-opacity gradient
Hann FIR Ribbon: Three-layer trend ribbon with crossover signals and background flash
Zero-Overlap Architecture: Clean-redraw system for all zone elements eliminates accumulated drawing object clutter
Dashboard: Active cluster zones, active pool lines, sweep count, ribbon direction, and ATR value
Alerts: Bullish sweep, bearish sweep, ribbon crossover bullish, ribbon crossover bearish
Input Parameters
Fractal Detection:
Fractal Length: Lookback bars on each side for fractal confirmation (default: 5). Larger = fewer, more significant fractals.
Show Fractal Marks: Toggle diamond marker rendering (default: on)
Cluster Zones:
Min Fractals for Cluster: Minimum fractal count within ATR band to qualify as a cluster (default: 3)
Max Cluster Zones: Maximum simultaneous cluster zones rendered (default: 6)
Show Cluster Zones: Toggle cluster zone rendering (default: on)
Liquidity Pools:
Pool Tolerance (x ATR): Price proximity for equal high/low classification (default: 0.15)
Pool Lookback (bars): Window for equal high/low detection (default: 50)
Max Pool Lines: Maximum pool lines displayed (default: 8)
Show Liquidity Pools: Toggle pool line rendering (default: on)
Sweep Detection:
Show Sweep Signals: Toggle sweep arrows (default: on)
Flash Background on Sweep: Single-bar background highlight on sweep bar (default: on)
Multi-Length Pivots:
Pivot 1 / Length: First pivot resolution (default: enabled, 10 bars)
Pivot 2 / Length: Second pivot resolution (default: enabled, 30 bars)
Pivot 3 / Length: Third pivot resolution (default: enabled, 75 bars)
Trend Ribbon:
Show Hann Ribbon: Toggle ribbon visibility (default: on)
Ribbon Length: Base FIR filter length (default: 20)
Ribbon Spacing: Gap between ribbon layers (default: 8)
Colors:
Resistance / Support / Pool / Sweep: Independent color selection for each element type
How to Use This Indicator
Step 1: Build the Liquidity Map
Zoom out to a 1-4 hour timeframe and let the cluster zones and pool lines populate. These are your primary reference levels. The cluster zones (multiple fractal convergences) are the highest-confidence levels. Pool lines (equal highs/lows) are the stop-hunt targets.
Step 2: Watch for Sweeps
A sweep arrow above a pool line indicates a stop-hunt of sellers above EQH. A bullish sweep (price broke above EQH but closed back inside) is frequently a reversal signal — institutions cleared the sell-side liquidity and may now push price higher. The background flash marks exactly which bar this occurred on.
Step 3: Use the Ribbon for Direction
Trade cluster zone bounces only in the direction of the Hann ribbon. If the ribbon is bullish (green), focus on support cluster zones for long entries. Resistance zones in a bullish ribbon context are areas to manage position, not reverse.
Step 4: Stack with Multi-Pivot Levels
Where a multi-length pivot level aligns with a cluster zone, the confluence is significant. A 75-bar pivot and a cluster zone at the same price level is a major institutional reference that warrants tighter risk and larger position sizing consideration.
Originality Statement
This indicator is original in its integration of fractals, volume-derived cluster zones, equal highs/lows pools, sweep detection, and Hann FIR ribbon into a single zero-overlap visual system. Its publication is justified because:
The clean-redraw architecture (storing only price levels in arrays, recreating all drawing objects on last bar) is a fundamental departure from the standard approach of accumulating box arrays — it solves the overlap and clutter problem at the architectural level, not with cosmetic band-aids
Cluster zones derived from fractal convergence within ATR tolerance provide an objective, quantitative method for identifying price areas with multiple structural pivots — avoiding the subjectivity of manual zone drawing
Sweep detection using pool levels as reference (not arbitrary lookback highs/lows) creates a directional signal directly tied to the liquidity context in which the sweep occurred
All six visual layers are designed for simultaneous display without interference — fractal marks at bar tops/bottoms, cluster zones as thin lines, pool lines as dashed lines, sweeps as arrows, ribbon below price, pivots as semi-transparent overlays
Limitations
The clean-redraw system recreates all line objects on every bar close (barstate.islast). On charts with very long history, this processes large arrays. Performance degrades gracefully but is slower than static object creation.
Fractal confirmation requires N bars on each side, meaning fractals always lag behind current price by the fractal length. Fresh structural pivots will not appear until confirmed.
Equal highs/lows detection uses ATR-relative tolerance. On instruments with irregular volatility (news events, halts), temporary ATR spikes may cause pools to merge or split unexpectedly.
Ribbon direction is a trend approximation, not a prediction. Sweep signals against the ribbon trend should be weighted less than those in the ribbon direction.
Disclaimer
This indicator is provided for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any instrument. All trading involves risk of loss. Liquidity zones and sweep signals do not guarantee price direction. Always use proper risk management.
-Made with passion by jackofalltrades
Indicator

Indicator

EQH/EQL Liquidity Zones [LuxAlgo]The EQH/EQL Liquidity Zones indicator automatically detects and tracks Equal Highs (EQH) and Equal Lows (EQL) to identify significant areas of resting liquidity. It provides a visual framework for understanding where market participants have placed stop-orders, offering dynamic targets for price action to gravitate toward and eventually "sweep."
🔶 USAGE
Equal Highs and Equal Lows are key structural patterns used in Smart Money Concepts (SMC) to represent liquidity. When price forms two or more peaks or troughs at approximately the same price level, it creates a "retail" resistance or support line. The script highlights these as zones, as price often seeks to move beyond these levels to activate the liquidity (stop-orders) residing there.
🔹 Identifying Liquidity
The script scans historical pivots to find matching prices within a user-defined threshold. When a match is found, a zone is drawn from the original pivot point and extended until the level is "swept" (price moves above an EQH or below an EQL).
🔹 Volume and Clusters
To help traders prioritize zones, the indicator displays the volume associated with the specific pivot points forming the liquidity. If multiple liquidity zones are situated very close to one another, the script dynamically merges their labels to show a "cluster" count (e.g., 2x EQH) and the total accumulated volume at that level.
🔹 Sweep Behavior
Once price breaches the maximum high or minimum low of a zone, the zone is considered "swept." Users can choose to have these zones deleted immediately or kept on the chart with a greyed-out visual style to study historical price reactions.
🔶 DETAILS
The indicator uses a pivot-based detection system combined with a percentage-based threshold. This ensures that even if two highs are not exactly equal to the decimal point, they can still be classified as Equal Highs if they are within a tight proximity (the "Equality Threshold").
The script tracks "Active Zones" up to a configurable limit. For high-volatility environments or lower timeframes (like the 1m chart), users can increase the maximum active zones to ensure all relevant resting liquidity is accounted for during fast-moving market conditions.
🔶 SETTINGS
🔹 Liquidity Detection
Pivot Left/Right Length: Determines the number of bars required to confirm a structural high or low.
Equality Threshold (%): The maximum percentage difference allowed between two pivots to classify them as "Equal."
Max Active Zones: Controls the maximum number of unswept zones tracked simultaneously.
🔹 Visuals
Bullish/Bearish Zone Color: Sets the colors for EQL (supportive liquidity) and EQH (resistance liquidity).
Zone Transparency: Adjusts the opacity of the liquidity boxes.
Show Midline: Toggles a dashed line at the average price of the equal pivots.
Show Volume: Displays the volume captured at the specific pivot points.
Delete on Sweep: If enabled, removes the zone from the chart immediately once price breaches the level.
Indicator

AG Pro Displacement Quality Finder [AGPro Series]AG Pro Displacement Quality Finder
Overview / What It Does
AG Pro Displacement Quality Finder is designed to identify displacement candles that stand out for structural intent rather than simple size alone. Instead of highlighting every large bar on the chart, the script evaluates whether a candle shows the type of directional expansion that traders often associate with meaningful repricing. The goal is to help separate ordinary volatility from displacement events that may deserve closer attention.
The core logic focuses on the quality of the candle itself and the context immediately connected to it. A displacement candle can look impressive at first glance while still lacking the characteristics that make it useful in analysis. This script addresses that problem by combining body expansion measurements, marubozu-style pressure assessment, and optional volume confirmation into a single quality framework. The result is a more selective view of bullish and bearish displacement conditions.
Once a valid event is detected, the script does not stop at marking the candle. It also maps a follow-up reclaim zone derived from the displacement structure so the user can monitor whether price revisits, respects, or interacts with that area later. This creates a workflow that is not limited to signal spotting. It extends the idea into post-event tracking, which is often the more practical part of chart analysis.
The visual design is intended to keep the chart readable while still making the key information obvious. Displacement candles can be recolored, quality tags can classify stronger events, and reclaim zones can remain visible long enough to preserve market context. The panel summarizes the latest state and core ratios so the user can quickly understand why the most recent event qualified.
Unique Edge
The distinctive feature of this script is that it treats displacement as a quality problem, not just a range problem. Many tools mark large candles. This script tries to isolate higher-conviction expansion candles by checking whether the body is meaningfully large relative to ATR and average body size, whether the candle shows strong close-to-extreme behavior, and whether optional volume confirmation supports the move.
A second differentiator is the reclaim-zone workflow. Instead of placing a marker and ending the analysis there, the script projects a reclaim area from the detected displacement structure. That makes the tool useful both at the moment of expansion and in the bars that follow. Traders who study impulsive moves often care just as much about what happens after the expansion candle as they do about the candle itself.
The script also uses visual hierarchy to keep stronger and more relevant structures easier to read than older or lower-priority ones. This helps reduce the “everything matters equally” problem that often makes zone-based tools harder to use in practice.
Methodology
The script evaluates bullish and bearish displacement candidates using multiple filters that are designed to work together rather than as isolated checks. At the center of the model is body expansion. The candle body is compared against ATR and against an average-body baseline so that the script can judge whether a bar is unusually forceful for the instrument and timeframe being viewed.
A marubozu-proximity component is then used to assess directional cleanliness. In simple terms, the script looks for candles whose closing behavior suggests genuine directional pressure rather than a wide but indecisive bar. This helps reduce false positives from candles that are large in total range but weak in directional conviction.
An optional volume confirmation layer can be enabled for users who want displacement selection to include participation strength. This does not redefine the script into a volume indicator. It simply acts as an additional confirmation filter for users who prefer more selectivity.
When a displacement event qualifies, the script can recolor the candle and assign a quality tag. The quality tag reflects the combined strength of the measured conditions rather than a single-factor reading. The script then builds a reclaim zone tied to that displacement structure and extends it forward so later interaction can be monitored on the chart.
Signals & Alerts
The script is built around bullish and bearish displacement detection. When the selected conditions are met, the chart can display a quality tag and the displacement candle can be visually emphasized. Reclaim zones are then plotted so the user can follow the area after the impulse.
Bullish and bearish alerts can be used to notify the user when a qualified displacement event appears. These alerts are intended to identify the script’s filtered displacement conditions, not to predict the full future path of price. In practice, they are most useful as chart-review prompts or workflow triggers rather than as stand-alone trade instructions.
Key Inputs
Users can customize the strictness and presentation of the model through inputs such as:
- Body expansion sensitivity relative to ATR
- Body expansion sensitivity relative to average candle body
- Marubozu proximity threshold
- Optional volume confirmation
- Candle recoloring
- Quality tag visibility
- Reclaim zone visibility and extension length
- Panel font size
- Label font size
- General visual display preferences
These controls allow the script to be tuned for more aggressive discovery or more selective filtering depending on instrument behavior and timeframe.
Limitations & Transparency
This script does not claim to identify every important move, nor does it assume that every qualified displacement event will lead to continuation. Some valid expansion candles can fail quickly, while some useful moves may be excluded if the filters are set too strictly. That trade-off is part of any selective model.
Reclaim zones are analytical reference areas, not guarantees of support or resistance. Price may react, ignore the zone, briefly interact with it, or invalidate it entirely. The script is designed to visualize these areas in a structured way, but interpretation remains with the user.
Results can vary materially across assets, sessions, volatility regimes, and timeframes. Thresholds that work well on one instrument may be too loose or too strict on another. Users should expect to calibrate settings rather than assume one configuration is universally optimal.
As with most chart tools, visual density can increase if many qualifying events occur in the same region. The script includes hierarchy-oriented visual handling, but it is still best used with sensible chart context and reasonable parameter choices.
Risk Disclosure
This script is an analytical charting tool. It is not financial advice, not a promise of performance, and not a guarantee of future results. It does not know the user’s objectives, risk tolerance, execution quality, or portfolio constraints.
Displacement, momentum expansion, and reclaim behavior can all be useful concepts in market analysis, but none of them remove uncertainty. Users should apply their own process, risk controls, and independent judgment before acting on any chart observation generated by this script.
Indicator

AG Pro Liquidity Heatmap [AGPro Series]AG Pro Liquidity Heatmap
Overview / What it does
AG Pro Liquidity Heatmap is a visual liquidity-mapping tool designed to project areas where resting stop interest is more likely to be concentrated. Instead of focusing on a single pattern or a one-bar signal, this script builds a forward-looking heatmap from clustered pivot behavior and displays that information as persistent horizontal liquidity bands on the chart.
The core idea is simple: repeated reactions around similar price levels often create zones where traders place stops, breakout orders, or defensive exits. When those levels begin to cluster, they can become structurally important. This script converts that clustering behavior into a heat score and renders it as layered Fire / Ice bands so traders can quickly identify where liquidity concentration may be building above or below current price.
The script is not built as a prediction engine, and it does not attempt to claim where price must go next. Its purpose is to help traders organize the chart, monitor the nearest active liquidity bands, and understand which nearby levels appear more saturated, more persistent, or already mitigated. In that sense, it is best used as a market-structure context tool rather than as a standalone entry model.
This script is also intentionally different from traditional support/resistance overlays, breakout detectors, and liquidity sweep labels. It does not merely mark recent highs and lows. It clusters pivot-derived levels, weights them into a dynamic heat score, extends them cleanly to the right side of the chart, and then updates or extinguishes them as price interacts with those zones.
Unique Edge
The unique edge of this script is that it treats liquidity as a developing field rather than a static line. A normal horizontal level script may show one prior high or one prior low. AG Pro Liquidity Heatmap instead tracks repeated pivot concentration, merges nearby levels into composite zones, scores those zones, and then visualizes the result as a layered heat structure.
A second differentiator is the lifecycle logic. Once a band has been interacted with, the script does not leave every level unchanged forever. Depending on the selected behavior, a zone can fade or be removed after liquidity is taken. This helps reduce visual clutter and keeps the chart focused on currently relevant liquidity structures rather than a permanently accumulating archive of old levels.
A third differentiator is presentation. The script is designed to produce a clean forward projection area with right-extending heat bands, readable labels, Fire / Ice theme control, a functional heatmap panel, and an optional EQ Magnet line that tracks the balance area between the nearest active upper and lower liquidity bands. The goal is not only analytical clarity, but also a chart layout that remains readable during live use.
Methodology
1) Pivot detection
The script first identifies pivot highs and pivot lows using user-defined left and right pivot lengths. These pivots are treated as candidate liquidity reference points.
2) Cluster merging
If a new pivot forms close enough to an existing level, based on an ATR-driven merge distance, the script merges that information into the existing zone rather than creating unnecessary duplication. This allows nearby pivots to accumulate into a stronger composite band.
3) Heat scoring
Each zone receives a heat score. Repeated clustering increases that score. When volume weighting is enabled, pivots formed with relatively stronger volume can contribute more heavily to the final score. This does not reveal actual order book liquidity, but it can provide a useful proxy for where market attention and stop concentration may be stronger.
4) Layered rendering
Each active zone is rendered as a multi-layer horizontal band. The band thickness and saturation scale with heat score, which makes stronger zones visually heavier than weaker ones. This helps the chart communicate intensity without requiring the user to read every value manually.
5) Liquidity lifecycle
When price reaches a zone, the script can either fade it or remove it depending on the selected extinguish mode. Optional mitigation tracking can leave a visual reminder of where liquidity was taken. This behavior is important because it keeps the heatmap adaptive rather than static.
6) Balance tracking
When both upper and lower active liquidity bands are available, the script can display an EQ Magnet line between the nearest bands. This is not a target call. It is a contextual balance reference that can help visualize the midpoint of the currently nearest active liquidity field.
States & Visual Elements
- Fire bands represent upper liquidity concentration derived from pivot highs.
- Ice bands represent lower liquidity concentration derived from pivot lows.
- Stronger zones become visually denser and more prominent as heat score rises.
- Zone labels display side, heat score, and price information in either compact or detailed mode.
- The Heatmap Panel summarizes active band count, nearest zones, strongest zones, heat balance, last sweep information, and the current extinguish behavior.
- The EQ Magnet line highlights the midpoint between the nearest active upper and lower bands when enabled.
- Optional mitigation tracks can remain on the chart after liquidity is taken.
How to use it
This script is generally most useful as a context layer.
Many traders may choose to use it in one of three ways:
- to map where price may interact with nearby liquidity concentration,
- to judge whether the closest active field is above or below current price,
- to avoid taking impulsive decisions directly into dense opposing liquidity.
The script can also be useful for chart organization. Traders who already use trend tools, structure tools, or trigger models may use the heatmap as a location filter. For example, a setup forming directly into a strong opposing liquidity band may deserve more caution than a setup developing in cleaner space.
Key Inputs
Pivot Left / Right Bars
Controls how pivots are detected. Smaller values can produce more frequent zones; larger values can make the structure more selective.
Cluster Merge Distance (ATR)
Defines how close pivots must be to merge into the same liquidity band. Lower values keep zones more separated; higher values create broader clustering.
Volume-Weighted Mode
Allows higher-volume pivots to contribute more strongly to heat score. This is a proxy weighting mechanism, not direct order-flow confirmation.
Minimum Heat Score To Show
Filters out weaker zones from the visual display.
Visual Saturation Score
Controls how quickly the visual intensity reaches its maximum appearance.
Base Band Height and Horizontal Band Density
Shape the visual footprint of each zone and determine how rich or minimal the rendered band structure appears.
Label controls
Allow the user to choose label mode, font size, theme, label offsets, and label density.
Panel controls
Allow the user to change panel visibility, location, theme, and font size.
Liquidity Taken Behavior
Determines whether mitigated zones fade or are removed.
Limitations & Transparency
This script does not access order book data, exchange liquidation feeds, or hidden liquidity information. The displayed heatmap is derived from chart-based pivot clustering and optional volume weighting. For that reason, the bands should be understood as technical liquidity proxies rather than direct measurements of real resting orders.
The heat score is also relative to the script's own internal logic. It is a ranking mechanism inside this model, not an absolute market-wide score. A higher score means a zone has accumulated more structural weight within the selected settings; it does not guarantee a reaction.
Like any chart tool based on pivots, the behavior of the script depends on the chosen timeframe, the selected sensitivity inputs, and the structure of the instrument being analyzed. Lower timeframes can create more noise, while higher timeframes can produce fewer but broader zones.
The EQ Magnet line is a contextual midpoint reference only. It should not be interpreted as a fixed target, a required destination, or a directional forecast.
Risk Disclosure
This script is a visual analysis tool for chart study and trade planning. It is not financial advice, not an execution system, and not a promise of future price behavior. Liquidity zones can fail, be overrun, or be ignored by price entirely.
No indicator should be used in isolation. Traders should consider market structure, volatility, risk management, execution quality, and their own process before making trading decisions. Always test settings carefully and use position sizing appropriate to your own risk tolerance.
Indicator

AG Pro Auto Supply & Demand Zones [AGPro Series]AG Pro Auto Supply & Demand Zones
Overview / What it does
AG Pro Auto Supply & Demand Zones is an overlay that automatically detects supply and demand areas by combining compact base structures with directional displacement. The script is designed to help traders track where price left an area with enough urgency to justify keeping that zone on the chart for future reference, while also showing how that zone evolves over time.
Instead of plotting every possible reaction area, the script applies a structured lifecycle model. A newly created zone begins as Fresh, can transition to Tested after a qualifying retest, and can later become Expired when it no longer meets the active criteria selected by the user. This state-based approach makes the chart easier to interpret because zones are not treated as static drawings. They are continuously re-evaluated as price interacts with them.
The script also distinguishes between proximal and distal boundaries so users can see both the near edge and the full depth of each zone. A built-in active-zone limit helps keep the chart under control, and older zones gradually fade through time-based opacity reduction. This allows recent and decision-relevant areas to remain visually stronger while historical context becomes lighter.
A light higher-timeframe overlay is included for users who want broader context without turning the chart into a dense multi-timeframe map. The goal is not to overwhelm the screen with background structure, but to add a subtle layer of alignment when higher-timeframe supply or demand remains relevant to the current price area.
Unique Edge
The distinctive feature of this script is that it does not stop at zone creation. It manages the full visual and logical lifecycle of a zone. Fresh, Tested, and Expired states are tracked in an explicit way, which makes the output more practical than a simple box-drawing tool.
A second differentiator is the same-side merge logic. When a newly detected zone forms too close to an existing zone on the same side, the script can refresh or merge that area instead of stacking nearly identical layers on top of one another. This helps reduce redundancy and produces a cleaner, more readable structure map.
Another important edge is the visibility architecture. Users can choose between All, Balanced Focus, and Smart Focus modes. This allows the chart to stay informative without becoming overloaded. Nearest active zones can be emphasized, distant context can be softened, and labels can be kept minimal, balanced, or fully expanded depending on the preferred workflow.
Methodology
The script uses a base-plus-displacement framework.
1. Base detection
A candidate zone begins with a compact base cluster. The script evaluates the total base range relative to ATR and can also apply a clean-wick filter so that noisy or overly volatile bases are filtered out.
2. Displacement confirmation
After the base, the script looks for directional expansion. The displacement candle must satisfy body-size conditions relative to ATR and must close with sufficient directional conviction. This is intended to avoid weak breaks that do not clearly separate from the base.
3. Zone construction
For demand zones, the script builds the area using the base body high as the proximal reference and the base low as the distal boundary. For supply zones, it uses the base body low as the proximal reference and the base high as the distal boundary. This gives the user both the near decision line and the full zone range.
4. Lifecycle tracking
A zone is initially Fresh. Once price revisits it under the selected confirmation mode, it can become Tested. If retests exceed the permitted limit, or if the user enables distal close-break invalidation, the zone can transition to Expired.
5. Zone maintenance
The script can merge overlapping same-side zones, cap the total number of active zones, reduce opacity as zones age, and selectively hide distant context based on the selected visibility profile.
6. Light higher-timeframe context
When enabled, the script projects a restrained higher-timeframe supply and demand layer onto the current chart. This is intended as context, not as a replacement for the active zones detected on the chart timeframe.
Signals & Alerts
This script includes alert support for key state events:
- New Demand Zone
- New Supply Zone
- Fresh Demand Touched
- Fresh Supply Touched
- Demand Zone Expired
- Supply Zone Expired
These alerts are designed to follow the script's zone-state logic rather than subjective interpretation. Users can enable or disable zone-creation alerts, fresh-touch alerts, and expiration alerts independently.
Key Inputs
Detection
Base Bars controls how many candles are used to form the base.
Base Range ATR Factor defines how compact the base must remain relative to ATR.
Max Single Base Candle ATR Factor limits oversized candles inside the base.
Displacement Body ATR Factor controls the minimum strength required for displacement.
Displacement Close Location checks whether the displacement candle closes with directional commitment.
Use Clean Base Wick Filter helps reduce noisy base formations.
Zone Management
Merge Nearby Same-Side Zones helps avoid repeated stacking of almost identical zones.
Minimum Same-Side Separation ATR defines how close a new zone can be to an existing same-side zone before merge logic becomes relevant.
Minimum Zone Overlap Ratio requires stronger overlap before two nearby zones are treated as one structure.
Lifecycle
Max Active Zones limits how many active zones remain on the chart.
Max Tests Before Expire controls how many qualified retests a zone can absorb before it expires.
Test Confirmation offers Touch, Penetration, and Close Inside modes.
Min Test Penetration Ratio refines how deep price must move into a zone when Penetration mode is selected.
Expire On Distal Close Break can invalidate a zone when price closes beyond the distal boundary.
Visuals
Show Proximal Line and Show Distal Line let users control boundary visibility.
Zone Visibility allows All, Balanced Focus, or Smart Focus workflows.
Keep Nearest Active Zones Per Side helps preserve immediate context.
Highlight Nearest Zones strengthens the most decision-relevant zones.
Label Mode, Label Size, Label Right Offset Bars, and Label Spacing ATR control how zone labels are displayed.
Light MTF View
Enable Light MTF View activates higher-timeframe context.
MTF Timeframe selects the higher timeframe.
MTF Fill Transparency and MTF Context Bars help keep the overlay subtle.
Panel
The summary panel can be shown or hidden.
Panel Theme, Panel Location, and Panel Font Size allow adaptation to different chart layouts and visual preferences.
How to use it
Many users will treat this script as a context and reaction map rather than as a standalone entry model.
A common workflow is:
- identify the nearest active demand and supply zones,
- check whether the zone is Fresh or already Tested,
- observe whether current price is approaching the proximal boundary or already trading deeper inside the zone,
- use the light higher-timeframe layer for context,
- then combine the zone information with personal confirmation tools such as structure, momentum, candle behavior, or risk rules.
Fresh zones may be more interesting when they align with trend context or with a relevant higher-timeframe area. Tested zones can still matter, but their interpretation should usually be more selective because the zone has already been revisited.
Limitations & Transparency
This script detects supply and demand zones through a rules-based base and displacement model. It does not claim to identify every meaningful reaction area on a chart, and it does not attempt to label institutional intent, order flow, or smart-money behavior as a certainty.
The quality of a zone depends on the selected settings, the volatility profile of the market, and the timeframe being analyzed. A more permissive configuration will naturally surface more zones, while a stricter configuration will produce a cleaner but narrower map. No single setting profile is optimal for every instrument.
The higher-timeframe overlay is intentionally lightweight. It is designed to provide context, not to replace full top-down analysis. Likewise, a Fresh or Tested label should not be treated as a guarantee of reaction. It is simply the script's state classification based on the selected confirmation logic.
This tool is best understood as a structured charting aid. It helps organize zone detection, lifecycle tracking, and visual prioritization. It does not remove the need for trade selection, confirmation, execution discipline, or risk management.
Risk Disclosure
This indicator is for chart analysis and educational use only. It does not provide financial advice, investment recommendations, or guaranteed outcomes. Markets can move through supply and demand zones without reacting, can partially react and fail, or can produce false confirmations. Always test settings carefully, evaluate the script in the context of your own process, and use proper risk management before making trading decisions.
Indicator

AG Pro Kill Zone Session Engine [AGPro Series]AG Pro Kill Zone Session Engine
Overview / What it does
AG Pro Kill Zone Session Engine is a session-based overlay designed to map the internal range behavior of selected intraday kill zones and preserve the most relevant reference levels after each zone has ended.
Instead of treating London, New York, Asia, and London Close as simple background highlights, this script organizes each enabled zone as a structured session event. During an active zone, it tracks the developing high, low, and optional midpoint. After the zone closes, it can carry those levels forward as clean horizontal references so traders can study how price interacts with prior session liquidity.
The script is built for users who want more context than a basic session coloring tool. It helps visualize where a session range formed, how wide it was relative to recent history, whether the session expanded or stayed narrow, and whether later price action interacted with that session through sweep-style behavior.
This is not a prediction engine and it does not attempt to forecast the next directional move. Its purpose is to structure session information into a cleaner analytical framework so traders can evaluate intraday context with more consistency.
Unique Edge
What makes this script different from a standard session indicator is that it does not stop at showing when a session is active.
Its core focus is session range formation plus post-session interaction. Each enabled kill zone can build a live range while active, then leave behind reference levels that remain usable after the session ends. This allows the chart to show not only where a session occurred, but also how later price responded to that session.
The script also adds session-width context. A zone can be classified relative to recent comparable zones so traders can quickly see whether the session was narrow, balanced, or expanded. That extra layer helps separate passive session activity from zones that created a more meaningful range.
Another important distinction is the sweep engine. Rather than only drawing static levels, the script can evaluate whether later price action interacts with prior session highs or lows in a sweep-oriented manner. This makes the tool more useful for traders who study liquidity behavior around specific intraday windows.
In short, this script is intended to function as a session behavior map, not as a simple background painter.
Methodology
The script works in four main steps.
1) Session detection
The user can enable or disable the supported kill zones individually and define session windows using a UTC offset and custom time settings. This keeps the script flexible across instruments, broker feeds, and local chart preferences.
2) Range construction
While a kill zone is active, the script updates the developing session high and low. Optional midpoint logic can also be shown. These values form the core session range for that specific zone.
3) Post-session reference mapping
When the zone ends, the completed high and low can remain on the chart as forward reference levels. This allows later price interaction to be evaluated against a completed session range rather than only during the active zone itself.
4) Sweep and width analysis
The script can evaluate reference-level interactions using its sweep logic and can also classify the completed width of a zone relative to prior zones of the same type. This helps the user distinguish between narrow, balanced, and expanded sessions.
Signals & Alerts
This script is primarily an analytical overlay, but it also supports alertable events around session activity and sweep behavior.
Depending on the enabled options, the script can be used to monitor:
- when a new kill zone becomes active,
- when price interacts with a prior session high,
- when price interacts with a prior session low,
- when sweep-oriented behavior is detected relative to a carried-forward reference range.
These events are designed to describe chart conditions, not to deliver standalone trade calls.
The visual outputs can include:
- session background shading,
- current and completed session high/low levels,
- optional midpoint levels,
- compact session summary labels,
- sweep markers,
- an information panel showing active zone status, width context, reference zone, and sweep status.
Key Inputs
The script includes a focused but flexible input set so users can adapt it without overcomplicating the chart.
Core controls include:
- UTC offset and custom session timing,
- individual enable/disable controls for Asia, London, New York, and London Close,
- high/low visibility,
- midpoint visibility,
- projection length for completed session levels,
- label density and summary behavior,
- panel visibility, placement, and text sizing,
- sweep mode and alert controls,
- visible session memory so the chart can stay cleaner on higher timeframes.
These controls allow the tool to be used in a more detailed mode on lower intraday charts or in a more compressed mode on higher timeframes.
Limitations & Transparency
This script is designed as a context tool. It does not define trade entries, stop placement, or risk management for the user.
Session behavior can vary across instruments and feeds, so identical settings may not produce equally meaningful output on every market. Some assets respond more clearly to session-based reference levels than others.
Sweep logic is also a chart-interpretation aid, not a certainty model. A detected sweep does not imply immediate reversal, continuation, or trade validity on its own. It simply highlights a specific type of interaction with a prior session reference.
The script is best suited to intraday analysis. While it can still display useful information on higher timeframes, the underlying logic is rooted in session behavior, so lower intraday charts will usually provide more direct visual relevance.
As with any visual overlay, increasing history depth or label density may add chart clutter. For that reason, the script includes controls to compress memory and reduce label load when needed.
Risk Disclosure
This script is provided for educational and analytical use only.
It is not financial advice, not a signal service, and not a promise of outcome. It does not guarantee reversals, breakouts, continuations, or profitable execution. Any trading decision should be made within the user's own process, risk model, and market understanding.
The intended use of this script is to help organize session structure, liquidity references, and post-session interaction on the chart so that traders can make more informed observations with a clearer visual framework.
Indicator

AG Pro Order Block Reaction Quality [AGPro Series]AG Pro Order Block Reaction Quality
OVERVIEW / WHAT IT DOES
AG Pro Order Block Reaction Quality is an overlay tool designed to organize how price interacts with displacement-origin order block zones. The script identifies the last opposite candle before a strong impulsive move, projects that candle as a bullish or bearish order block, and then tracks whether price later respects, reacts to, or invalidates that zone.
The goal is not to treat every order block as equally important. Instead, the script focuses on reaction quality. When price revisits a tracked zone, the script evaluates the behavior around that revisit and converts the response into a structured quality score. This helps separate zones that produce cleaner reactions from zones that fail, weaken, or transition into breaker behavior.
The indicator is built as a chart-organization tool, not as a prediction engine. It is intended to help users study where impulsive moves originated, how later revisits behaved, and whether those revisits showed clean rejection, weak response, or invalidation. In that sense, the script is less about drawing boxes and more about mapping reaction structure around previously important displacement areas.
Because order block concepts are often displayed in a highly subjective way, this script uses deterministic conditions to reduce ambiguity. Impulse detection, order block selection, reaction-window scoring, and breaker conversion all follow rules-based logic. The objective is to make price interaction around those zones easier to inspect, compare, and review across different market conditions.
UNIQUE EDGE
Many order block tools focus mainly on detection. They draw a bullish or bearish block, then leave the interpretation to the user. This script adds an evaluation layer on top of that detection process. Rather than only asking where an order block exists, it also asks how convincingly price reacted when that zone was revisited.
That difference matters. Two zones may look similar at first glance, but the quality of the revisit can be very different. One revisit may reject cleanly and preserve the zone, while another may penetrate deeply, stall, or fully invalidate. By assigning reaction scores and grade-style labels, the script helps organize those differences visually.
The script also distinguishes active order blocks from breaker behavior. If a previously tracked zone is invalidated, the visualization shifts from standard order block context into breaker context. This adds structural continuity to the chart and helps users see when an old reaction area has lost its original character.
In practical use, the unique edge is the combination of three layers: impulsive-origin zone detection, revisit-based reaction scoring, and breaker-state continuity. Together, those layers aim to give traders a cleaner framework for studying order block behavior than a simple box-drawing approach.
METHODOLOGY
1) Impulse detection
The script first searches for strong directional candles whose range is large relative to ATR and whose move exceeds a recent breakout threshold. This is used as a rules-based approximation of displacement or impulsive participation.
2) Order block definition
Once an impulsive move is detected, the script searches backward for the last opposite candle inside a configurable lookback window. That candle becomes the source order block. Depending on settings, the zone can be projected using the full candle range or the candle body only.
3) Zone persistence and revisit tracking
After a zone is created, the script tracks whether price later trades back into it. That first interaction is important because it provides the data needed to evaluate how the revisit behaved.
4) Reaction quality scoring
When price revisits the zone, the script measures the behavior inside a reaction window. The score is based on factors such as entry precision into the zone, the magnitude of rejection away from the zone, structural integrity of the zone during the test, and the strength of the originating impulse. Those components are combined into a normalized score.
5) Grade translation
The raw score is then translated into a visual grade tier. This is meant to improve chart readability and allow faster comparison between zones that produced stronger versus weaker reactions.
6) Breaker conversion
If price invalidates a zone after it has been engaged, the script can treat that structure as a breaker block. This keeps prior structural context on the chart instead of simply removing it.
7) Visual organization
Bullish zones, bearish zones, and breaker structures are displayed with separate color families so users can distinguish standard order block context from post-invalidation context more quickly.
SIGNALS & ALERTS
The script includes alerts for newly detected bullish and bearish order blocks. These alerts are event-based and are intended to mark when a new candidate zone has been identified according to the script’s internal impulse and source-candle rules.
In addition, the visual state of the chart provides three broad categories of information:
- Active bullish or bearish order blocks that remain structurally valid.
- Breaker blocks that represent previously tracked zones after invalidation.
- Quality-scored reactions that help compare the strength of revisits.
These states should be interpreted as structural context, not as standalone trade instructions. A bullish order block on the chart does not guarantee a long setup, and a bearish order block does not guarantee a short setup. The script is designed to help users study reaction behavior around important zones, not to replace execution rules, risk management, or broader market context.
KEY INPUTS
ATR Length
Controls the volatility baseline used in impulse sizing and reaction calculations.
Impulse Size (x ATR)
Defines how large a move must be, relative to ATR, before it is treated as an impulsive displacement event.
OB Search Bars Back
Controls how far back the script looks for the last opposite candle that becomes the source order block.
Zone Mode
Lets the user choose whether zones are based on the full candle range or the candle body only.
Max Zones Tracked
Limits how many zones remain in memory and on the chart.
Zone Max Age (Bars)
Removes older zones after a defined number of bars so the chart does not grow indefinitely cluttered.
Reaction Window (Bars)
Defines the number of bars used to evaluate how price behaves after a zone is revisited.
Zone Extend (Bars)
Controls how far zones project into the future for chart visualization.
Show 50% Midline
Displays an internal midpoint inside the zone for users who want an additional internal reference.
Show Impulse Markers
Shows or hides impulse-origin markers on the chart.
Label Size
Controls the size of chart labels.
Panel Theme / Panel Font Size / Panel Position
These settings control the visual appearance and placement of the information panel.
LIMITATIONS & TRANSPARENCY
Order block analysis is inherently interpretive, and any script that formalizes it must impose strict rules. That means the script’s logic is intentionally selective. It will not match every discretionary order block definition used by every trader.
The script uses a specific rules-based approximation of impulse, source candle selection, revisit handling, and reaction scoring. As a result, some zones that a discretionary analyst might manually highlight will not appear, while some zones shown by the script may not align with every subjective framework.
Reaction quality is also dependent on the configured reaction window and the selected volatility context. Changing settings can change how aggressive or conservative the script becomes. For that reason, the indicator should be treated as a structured analytical model rather than an objective statement of market truth.
Breaker behavior shown by the script reflects the script’s invalidation logic only. It does not imply that a breaker block will necessarily act as support or resistance in the future. It simply preserves structural history after the original order block state is lost.
This indicator does not use volume profile, order flow, DOM data, or external market microstructure feeds. All calculations are derived from chart data available inside Pine Script.
RISK DISCLOSURE
This script is for chart analysis, research, and educational use. It does not provide financial advice, investment recommendations, or guaranteed outcomes.
No indicator can reliably predict future price movement on its own. Order block reactions may fail, clean-looking zones may break, and high scores do not ensure continuation or reversal. Market context, liquidity conditions, volatility regime, timeframe selection, and execution quality all matter.
Users should test settings carefully, apply independent judgment, and use appropriate risk management. This script should be treated as a decision-support tool for studying price interaction around displacement-origin zones, not as a standalone trading system.
Indicator

Psych Level Mirror - Futures <-> CashPsych Level Mirror — Futures ↔ Cash
See the hidden levels that move your market.
Futures and cash/CFD instruments trade at different prices due to the spread (carry, funding, roll). A round number on the cash index — like NAS100 20,000 or SPX500 5,600 — doesn't land on a round number on the futures chart. But cash traders are still reacting to those levels. This indicator makes them visible.
WHAT IT DOES
Psych Level Mirror draws two layers of psychological price levels on your chart:
Native psych levels — The round numbers of whatever you're charting (e.g. ES 5650, 5700). These are drawn as full zones with support/resistance state tracking: green when acting as support, red when resistance. Zones flip color when price breaks through and retests — exactly how institutional levels behave in practice.
Mirrored companion levels — The round numbers from the other side of the pair, projected onto your chart using the live spread. On an ES chart, you'll see where SPX500 cash round numbers (5,600, 5,650, 5,700) actually sit on the futures price scale. These are marked with a dashed center line and dotted green/red borders so they're visually distinct from your native levels.
WHY THIS MATTERS
Large portions of the market trade the cash index (CFDs, spot, options on SPX). When NAS100 hits 20,000 or SPX500 hits 5,600, that triggers activity from cash traders — but on your NQ or ES futures chart, that level shows up at an odd number like 20,034 or 5,628. Without this indicator, you'd never know why price stalled or reversed at a seemingly random level.
FEATURES
Auto-detection — Drop it on any supported chart and it identifies the correct pair. Works on NQ, MNQ, ES, MES, YM, MYM, RTY, M2K, GC, MGC, and their cash/CFD counterparts (NAS100, SPX500, US30, US2000, XAUUSD).
Live spread calculation — The futures-cash spread shifts throughout the session. Mirror levels update automatically as the spread moves.
State tracking on all levels — Both native and mirrored zones track whether price is above (support/green) or below (resistance/red), and change color on confirmed breaks and retests.
Major & minor levels — Major round numbers (e.g. every 1000 on NQ, every 100 on ES) and minor levels (half-steps) are drawn separately with different visual weight.
Auto-scaling — Level intervals adjust automatically based on the instrument's price. Works correctly on everything from Russell 2000 (~2,100) to NQ (~20,000) to Gold (~3,000).
Manual override — Set a fixed spread offset or force a specific pair via the dropdown if needed.
Info table — Shows detection mode, chart side (futures/cash), companion symbol, live spread, and level intervals at a glance.
HOW TO READ IT
Colored zone (green/red box) = Native psych level — your instrument's own round numbers
Dashed center line through zone = Exact round number of the native level
Dashed/dotted colored line with tag = Mirrored companion level projected onto your chart
Green dotted border (mirror) = Top of the mirrored zone
Red dotted border (mirror) = Bottom of the mirrored zone
Dark green tag box = Companion level acting as support (price above)
Dark red tag box = Companion level acting as resistance (price below)
SUPPORTED PAIRS
NQ1! / MNQ1! ↔ NAS100
ES1! / MES1! ↔ SPX500
YM1! / MYM1! ↔ US30
RTY1! / M2K1! ↔ US2000
GC1! / MGC1! ↔ XAUUSD
Custom ↔ Custom
SETTINGS
Instrument Pair — Auto (recommended), named preset, or Custom with your own symbols
Native Psych Levels — Toggle major/minor, adjust intervals and zone widths, set number of levels above/below
Mirrored Levels — Toggle on/off, major-only option
Spread — Auto (live) or manual fixed offset
NOTES
The spread between futures and cash is not constant. It narrows into expiry and fluctuates with funding/carry. Auto mode handles this — levels shift slightly throughout the session, which is accurate to reality.
Best used on intraday timeframes (1m–15m) where the spread offset matters most. On daily+ charts the spread becomes negligible relative to the level intervals.
This indicator is an overlay — it works alongside your existing setup without conflict.
ORIGIN
This indicator is built from concepts taught by Student Alpha (Shawn) , who describes the relationship between correlated instruments with a simple but powerful idea: "The tail wags the dog."
The cash index and the futures contract are tethered together, but they don't move tick-for-tick in lockstep. When the cash market reacts to a psychological round number, that reaction ripples into the futures — and vice versa. The "tail" (the correlated instrument you're not charting) wags the "dog" (the one you're trading). Understanding where those hidden levels sit on your chart gives you an edge that most traders never see.
Psych Level Mirror was built to make that concept visual and automatic — no more manual math, no more guessing where the cash 20,000 lands on your NQ chart. Indicator

AG Pro CCI Reversion Quality [AGPro Series]AG Pro CCI Reversion Quality
Overview
AG Pro CCI Reversion Quality is a chart-based analysis framework designed to evaluate the quality of potential mean reversion conditions after meaningful CCI displacement. The script is not built around the simplistic idea that every overextended reading should immediately reverse. Instead, it focuses on whether a stretch condition begins to mature into a more structured, readable, and context-aware reversion environment.
The core objective is to separate raw CCI extremes from higher-quality reversion candidates. In many conventional oscillator workflows, a high positive or negative CCI reading is treated as a direct trigger. This script does not follow that approach. A strong stretch may still reflect healthy continuation, trend persistence, or unstable counter-trend conditions. For that reason, the script evaluates the quality of the reversion setup rather than the existence of a threshold breach alone.
The indicator is built for users who want a more selective framework around mean reversion. It examines whether price has deviated enough from an EMA-based reference mean, whether the reversion path remains meaningful, whether trend pressure is working against the setup, and whether recent structure suggests a cleaner or more crowded return path. The output is a contextual quality view rather than a one-dimensional overbought or oversold label.
This means the script should be understood as a decision-support tool for chart study and workflow organization. It is intended to help users distinguish between conditions that are immature, weak, blocked, developing, or stronger within a mean reversion context. It does not guarantee that price will reverse, and it does not assume that every stretch condition deserves a fade.
What the script does
The script monitors CCI displacement and then evaluates whether that displacement is beginning to convert into a more credible reversion environment. In practical terms, the workflow asks a sequence of questions. First, is there a meaningful stretch? Second, is the move beginning to lose directional quality or show reversion readiness? Third, is there enough room back toward the mean to matter? Fourth, is dominant trend pressure still strong enough to reduce the attractiveness of fading the move? Fifth, is nearby structure relatively clean, or is the path crowded by congestion and repeated mean interaction?
By combining those layers, the script attempts to reduce the noise associated with raw oscillator threshold logic. A positive stretch does not automatically imply a short setup. A negative stretch does not automatically imply a long setup. The script instead checks whether the overall reversion context is becoming more coherent.
This framework can be useful in discretionary workflows where users want to prioritize cleaner mean reversion candidates over mechanically reacting to every extreme oscillator reading. It is also useful for users who prefer a visual structure that summarizes context rather than one that continuously emits aggressive directional prompts.
Unique edge
The unique edge of this script is that it treats CCI as the starting point of the analysis, not the end point. Many oscillator-based studies stop at the detection of an extreme value. AG Pro CCI Reversion Quality continues beyond that stage and asks whether the extreme is maturing into a higher-quality reversion environment.
This makes the tool different from a basic CCI threshold script, a classic overbought/oversold marker, or a simple cross-based reversal detector. The script is not designed to label every extreme. It is designed to grade the environment around the extreme.
The indicator also keeps a clear distinction between stretch direction and stretch intensity. A market may be in a positive stretch or a negative stretch, but the degree of that stretch can still vary between mild, extended, and extreme conditions. In parallel, the script separately estimates reversion quality, trend pressure against the reversion idea, distance back to the reference mean, and structural friction. This multi-layered structure is meant to help users avoid treating all extreme readings as equivalent.
Another important difference is that the script explicitly accounts for context that can weaken a counter-trend reversion idea. Strong directional pressure, repeated interactions with the mean, and crowded local structure can all reduce the clarity of a fade. Instead of ignoring those conditions, the model reflects them in the displayed quality state.
Methodology
The script begins with a CCI calculation and identifies whether price is in a neutral regime, a positive stretch regime, or a negative stretch regime. It then classifies stretch intensity according to threshold-based displacement logic. The purpose of this stage is to define whether the market is extended enough for reversion analysis to become relevant.
From there, the indicator evaluates reversion readiness. This layer looks for signs that the stretch may be beginning to lose directional quality. Rather than relying on one isolated condition, the readiness component blends several pieces of information, such as directional change in CCI behavior, body structure, wick behavior, and simple stalling characteristics. This is meant to produce a broader view of whether reversion conditions are starting to organize.
The model then evaluates distance to mean. This matters because a reversion concept is less meaningful if price is already too close to the reference mean, while a more meaningful opportunity may exist when displacement remains materially extended. The reference anchor used here is an EMA-based mean, and the script also visualizes an ATR-based reversion zone around that mean.
Trend pressure is treated as a separate contextual penalty. This is a key design choice. A mean reversion idea that opposes strong directional pressure may be materially weaker than a similar stretch in a less forceful trend environment. The script therefore estimates how much prevailing directional pressure works against the reversion idea and reduces the effective quality view accordingly.
Structure friction is also included. This component is intended to reflect whether the recent path is relatively clean or crowded. Repeated interaction with the mean, compression, and congestion can reduce the clarity of a reversion path. Instead of assuming that all distance from the mean is equally attractive, the script attempts to reflect when the path back toward the mean is noisy or structurally inefficient.
All of these elements are combined into a composite Reversion Quality view. The final output is then expressed through panel information, chart labels, the zone display, and state logic.
State model
The state model is intentionally selective. It is meant to help users read context, not flood the chart with constant directional calls.
NEUTRAL indicates that there is no active stretch regime currently qualifying for reversion analysis.
WATCH indicates that a stretch exists and some reversion characteristics are forming, but the overall quality remains in an earlier or less mature stage.
READY indicates that the reversion quality has advanced enough to meet the preferred threshold defined by the user inputs. This does not imply certainty or guaranteed reversal. It simply means that the model sees a stronger monitored reversion context than it did at lower-quality states.
WEAK indicates that a stretch may exist, but the quality remains below the preferred threshold. This state is intentionally treated with caution.
BLOCKED indicates that the environment is materially impaired by elevated opposing pressure or structural friction. In other words, the stretch may exist, but the model does not consider the reversion context clean enough.
These states are designed to provide a workflow hierarchy rather than a promise hierarchy. The purpose is to help users prioritize and interpret, not to replace judgment.
Visual structure
The reference mean is displayed as an EMA-based mean line. Around it, the script plots an ATR-based reversion zone. This zone is intended to help users see the region surrounding the mean that is being used as the reversion anchor. The zone becomes more visually expressive when an active stretch context is present and more neutral when no active stretch is in focus.
The on-chart labels are designed to show the dominant local state when relevant. Depending on user settings, the script can display WATCH, READY, BLOCKED, and optionally WEAK labels. The label system is filtered by spacing logic so the chart remains more readable and does not endlessly repeat the same message on adjacent bars.
The information panel summarizes the active context. It is designed to show state, current reversion side, stretch direction, stretch intensity, reversion quality, trend pressure versus reversion, distance to mean, structure friction, setup bias, and a short risk note. The panel can also be repositioned from the settings, allowing the user to adapt placement to chart layout and personal preference.
The chart guide labels are included to make the mean and zone easier to identify visually. Their role is descriptive, not predictive.
Signals and alerts
The alert structure is built around monitored reversion states rather than trading promises. The available alert conditions include Ready Long Reversion, Ready Short Reversion, Watch Long Reversion, Watch Short Reversion, Reversion Quality Upgrade, and Reversion Quality Breakdown.
These alerts are designed to notify the user that the modeled reversion environment is changing. They should not be interpreted as guaranteed turning points. The script does not know future price behavior and does not claim to identify all reversals. It only identifies conditions that fit its internal reversion-quality logic.
Because different assets, sessions, and volatility structures behave differently, users should always validate whether the alert behavior matches their own chart-reading process and timeframe preference.
Key inputs
The script includes inputs for CCI length, reference mean length, multiple stretch thresholds, READY and WATCH thresholds, trend pressure filter strength, structure friction lookback, reversion zone width, label spacing, background highlight transparency, and visual display controls.
These inputs are intended to let users adapt the framework to different instruments and chart conditions. The script is not presented as universally optimal out of the box for all markets or all styles. Some users may prefer a more selective threshold structure, while others may prefer earlier WATCH states. Similarly, different assets may respond differently to the same mean length or zone width.
The visual controls are included to help users keep the chart readable. Users can enable or disable signal labels, WATCH labels, WEAK labels, background highlights, guide labels, and the information panel. Label size and panel text size are also configurable.
How to interpret the tool
A useful way to interpret the script is to think of it as a contextual filter around reversion conditions. A high stretch value alone is not enough. The quality concept becomes more meaningful when stretch, readiness, distance to mean, and contextual penalties begin to align.
If the script is neutral, it is signaling that no active stretch regime is currently in focus. If it is in WATCH, the script sees an emerging reversion environment, but one that may still be early or incomplete. If it reaches READY, the model is identifying a stronger monitored reversion context according to its current thresholds. If the state is BLOCKED, the model is emphasizing that pressure or structure is reducing the attractiveness of the reversion idea.
The panel is especially helpful for separating why a setup is weak. In some cases, quality may be limited because distance to mean is too thin. In other cases, trend pressure may still be high. In others, structure friction may be elevated even if displacement exists. This decomposition is intentional because it gives the user a more transparent framework than a single opaque signal.
What this script is not
This script is not a simple CCI threshold indicator. It is not designed to mark every move above or below a fixed level as a reversal opportunity.
It is not a guaranteed turning-point detector. Markets can remain extended for longer than expected, and strong trends can continue even after oscillator readings become extreme.
It is not a standalone execution system. The script does not account for all trade management variables, liquidity considerations, news catalysts, slippage, or user-specific risk parameters.
It is not a substitute for independent chart reading. It is intended to support analysis, not replace it.
Limitations and transparency
Like any chart-based model, this script has limitations. CCI extremes can persist, and a stretch can remain extended longer than a reversion-focused framework may prefer. In strong continuation phases, what appears to be a mature stretch can still fail to revert meaningfully.
The reversion-quality approach is also sensitive to the interaction between volatility, price structure, and trend behavior. Different markets can produce different behavior profiles. A configuration that feels balanced on one asset or timeframe may feel too early or too conservative on another.
The structure friction layer is an estimate, not an objective statement of future path quality. The trend pressure component is likewise a contextual model, not a certainty model. The script uses observable chart information to organize conditions, but it does not predict future order flow.
Users should also understand that visualization choices are meant to improve readability, not imply certainty. The mean line, reversion zone, state labels, and background highlights are interpretive aids.
Risk disclosure
This script is provided for chart analysis, research, and workflow support. It does not provide financial, investment, legal, or tax advice. Nothing displayed by the script should be interpreted as a promise of outcome or a guarantee of reversal.
All markets involve risk. Mean reversion concepts can fail, continuation can persist, and volatility conditions can change rapidly. Users should apply independent judgment, appropriate risk controls, and broader market context before acting on any chart-based interpretation.
The script should be used as one analytical layer among many, not as a self-sufficient decision engine.
Summary
AG Pro CCI Reversion Quality is a selective mean reversion quality framework built around CCI displacement, EMA-based mean reference logic, distance-to-mean context, trend pressure, and structure friction. Its purpose is not to say that every extreme should fade. Its purpose is to help identify when an extreme begins to organize into a more structured reversion environment.
The model is intended for users who want a cleaner, more context-aware interpretation of stretch conditions than a traditional threshold-only oscillator can provide. By separating stretch direction, stretch intensity, reversion quality, and contextual penalties, the script aims to make mean reversion analysis more structured, more transparent, and more selective.
Indicator

AG Pro VWAP Reclaim Quality [AGPro Series]AG PRO VWAP RECLAIM QUALITY
OVERVIEW
AG Pro VWAP Reclaim Quality is a chart-first tool built to evaluate whether a move back above VWAP is clean, weak, delayed, or structurally fragile.
This script does not treat every recovery above VWAP as equally meaningful. Instead, it grades the reclaim event itself and then follows what happens next: whether price can hold above VWAP, whether the retest is constructive, and whether the reclaim deteriorates shortly after recovery.
The objective is simple: separate efficient VWAP reclaims from noisy or late recoveries that may look promising at first glance but fail to show durable acceptance.
This makes the script useful for traders who want more context than a basic VWAP cross. A standard cross can show that price moved from one side of VWAP to the other. This script is designed to evaluate the quality of that transition.
UNIQUE EDGE
The focus here is not generic VWAP direction bias and not a simple above/below state model.
The main edge of the script is its reclaim-quality framework. It evaluates the reclaim as a sequence rather than as a one-line event:
1) reclaim strength,
2) post-reclaim acceptance,
3) retest behavior,
4) timing quality,
5) failure risk.
That structure is what differentiates it from ordinary VWAP cross tools.
A reclaim that closes back above VWAP with a strong bar, holds acceptance, and survives a disciplined retest should not be treated the same as a reclaim that occurs late, stalls immediately, or fails after a shallow recovery. This script is designed to reflect that distinction visually and systematically.
In practical terms, the script attempts to answer a more specific question:
Is this reclaim simply back above VWAP, or is it actually behaving like a higher-quality recovery?
METHODOLOGY
The script starts by tracking session VWAP and identifying reclaim attempts after price has spent time below it.
Once a reclaim is detected, the script evaluates several components:
1) Reclaim strength
The reclaim bar is assessed using distance from VWAP, body efficiency, and close location within the bar. This helps distinguish decisive recoveries from marginal crosses.
2) Acceptance above VWAP
After the reclaim, the script measures whether price is actually holding above VWAP over the next bars. Stable acceptance is treated differently from mixed or poor acceptance.
3) Retest behavior
The script checks whether price revisits VWAP inside a defined tolerance area and whether that test is held constructively. A confirmed retest is handled as separate information rather than being merged blindly into the initial reclaim.
4) Timing quality
Reclaims that occur after an extended stay below VWAP, or later in the intraday session, can be penalized. This allows the script to separate timely recoveries from delayed ones.
5) Failure logic
A reclaim can later be downgraded if price loses structure below VWAP after the recovery. This failure layer is intentionally more selective so that minor noise is not treated as a meaningful reclaim breakdown.
The result is a compact grading model that produces a readable chart-first output instead of a large diagnostic dashboard.
HOW TO READ THE OUTPUT
Main chart labels:
- CLEAN: reclaim quality is strong and structurally healthy
- LATE: reclaim occurred, but timing quality is weaker or delayed
- RT HOLD: VWAP retest was revisited and held constructively
- FAILED: reclaim lost quality and broke down after recovery
Panel fields:
- VWAP Reclaim: current reclaim classification
- Reclaim: strength of the reclaim move itself
- Acceptance: quality of post-reclaim holding behavior
- Retest: whether a constructive retest is confirmed
- Bias: summary interpretation of the current reclaim state
- Quality: compact score representation
The chart is intentionally designed to stay visual and readable. The panel provides state context, while the labels highlight the important transition points.
SIGNALS AND ALERTS
The script includes alert conditions for:
- Clean Reclaim
- Late Reclaim
- Retest Hold
- Failed Reclaim
These alerts are intended to map to the reclaim lifecycle rather than to every minor VWAP interaction.
For more conservative usage, bar-close confirmation is generally preferable when evaluating reclaim quality, especially on volatile instruments or during rapid intrabar movement.
KEY INPUTS
Some of the main controls include:
- VWAP source
- ATR length
- reclaim distance normalization
- minimum prior bars below VWAP
- late reclaim thresholds
- acceptance lookback
- retest tolerance and retest window
- failure delay bars
- panel text size and panel theme
- label visibility and label discipline controls
The script also includes label filtering logic to reduce clustering and keep the chart cleaner by default.
WHAT THIS SCRIPT IS DESIGNED FOR
This script is designed for traders who want to evaluate reclaim quality around VWAP, not merely track whether price is above or below it.
Typical use cases may include:
- reviewing whether a recovery above VWAP has enough structural follow-through
- filtering weak reclaims from stronger continuation candidates
- identifying retest discipline after reclaim
- spotting delayed or fragile recovery behavior
- keeping a cleaner visual workflow around VWAP-based chart reading
LIMITATIONS AND TRANSPARENCY
This script is not a prediction engine and should not be interpreted as a guaranteed continuation model.
A reclaim labeled as clean can still fail.
A reclaim labeled as late can still continue.
A failed reclaim label does not automatically imply a larger bearish trend.
The tool is designed to classify reclaim behavior around VWAP, not to replace broader market structure analysis.
Like all chart-based tools, outputs can vary depending on instrument, volatility regime, timeframe, and user settings.
VWAP-based behavior is also context-dependent. Market environment, liquidity, trend phase, and volatility expansion can all influence reclaim behavior beyond what a single script can capture.
This script is therefore best used as a structured interpretation tool, not as a standalone decision framework.
RISK DISCLOSURE
This indicator is for chart analysis and research use only. It does not provide investment advice, portfolio advice, or trade guarantees.
Always evaluate signals within broader market context, risk management, and your own execution process.
No single indicator should be relied upon in isolation.
NOTES
This publication focuses on reclaim quality around VWAP rather than generic VWAP crosses.
The aim is to keep the logic interpretable, the visuals readable, and the methodology transparent. Indicator

Price Memory Heatmap [BullByte]Price Memory Heatmap - Dynamic Support & Resistance Through Market Memory
Price Memory Heatmap visualizes where markets remember. It identifies price levels where repeated reactions have occurred, measures their intensity through a proprietary heat system, and displays them as dynamic zones that strengthen with each new reaction and naturally fade when the market moves on.
This is not a combination of existing indicators. It is a unified analytical framework built around one original concept: price levels accumulate heat from confirmed reactions and lose heat through exponential decay when untouched. The result is a self-organizing, self-cleaning map of historically significant price zones that evolves with every bar.
---
WHAT THIS INDICATOR DOES
Price Memory Heatmap tracks price levels where significant market reactions have occurred. Each level is treated as a living entity with memory:
→ Gains heat when price reacts at it (confirmed pivots and wick rejections)
→ Loses heat over time when untouched (exponential decay)
→ Displays visual intensity proportional to accumulated reaction history
→ Gets removed automatically when its heat falls below a minimum threshold
→ Classifies real-time price behavior at each zone (Rejection, Sweep, Break, Retest, Absorption)
The indicator tracks up to 20 memory levels simultaneously and displays only the most significant ones based on heat intensity and reaction count. Zones are color-coded from cool (low activity) to hot (high activity), giving instant visual hierarchy of level importance.
Key outputs:
→ Heat-mapped zones showing historical reaction intensity
→ Classification labels (Developing, Active, Strong, Dominant)
→ Hit count showing total confirmed reactions at each level
→ Relative volume multiplier showing conviction behind reactions
→ Level age tracking (Fresh, Seasoned, Veteran)
→ Real-time behavior detection integrated into zone labels
→ Summary dashboard ranking all active levels by heat
---
WHY THIS INDICATOR EXISTS
Traditional support and resistance tools draw static lines. They cannot tell you whether a level was tested once or ten times, whether reactions were backed by strong volume or weak, whether the level was formed yesterday or months ago, or how price is currently interacting with that level.
Price Memory Heatmap addresses each of these gaps through a single cohesive system:
PROBLEM: "Is this level significant?"
→ SOLUTION: Heat intensity and classification tier tell you immediately. A Dominant zone with 8 hits is far more significant than a Developing zone with 2 hits.
PROBLEM: "Was there conviction behind reactions at this level?"
→ SOLUTION: Relative volume multiplier shows whether reactions attracted above-average volume (e.g., 2.3x means 2.3 times the average bar volume).
PROBLEM: "Is this level still relevant?"
→ SOLUTION: Exponential decay naturally fades untouched levels. If the market has forgotten a level, the indicator forgets it too.
PROBLEM: "How is price interacting with this level right now?"
→ SOLUTION: Real-time behavior detection classifies the current interaction as Rejection, Sweep, Break, Retest, or Absorption.
PROBLEM: "How old is this level?"
→ SOLUTION: Age tracking categorizes each level as Fresh (recently formed), Seasoned (survived multiple decay cycles), or Veteran (persistent structural significance).
---
HOW PRICE MEMORY WORKS
The lifecycle of a memory level:
BIRTH - A confirmed pivot swing (high or low) creates a new memory level, or merges into a nearby existing level if one exists within the merge distance.
REINFORCEMENT - Each subsequent reaction at the level adds heat. Reactions with above-average volume add proportionally more heat. The level's price adjusts as a weighted average of all reactions.
DECAY - Every bar without a reaction, the level's heat is multiplied by the decay rate (default 0.992). This creates a natural half-life where untouched levels gradually lose prominence.
DEATH - When heat falls below the death threshold (default 0.08), the level is permanently removed. This keeps the chart clean and focused on relevant levels.
The heat value drives everything:
→ Zone color intensity (hotter = more prominent visual)
→ Classification tier (Dominant, Strong, Active, Developing)
→ Dashboard ranking (sorted by heat, hottest first)
→ Glow effect intensity (stronger glow on high-heat zones near price)
Additionally, wick rejections are detected as secondary reaction sources. When a candle wicks into an existing level and rejects (closes away), it adds heat at half the rate of a confirmed pivot, preventing over-weighting of intrabar noise while still capturing meaningful reactions.
---
WHY THIS IS NOT A MASHUP
This indicator uses pivot detection, ATR, and volume data internally, but it does not combine or display existing indicators. The distinction is fundamental:
A mashup displays independent indicators together on one chart.
This indicator uses standard calculations as INPUT MECHANISMS feeding a completely original processing engine whose output cannot be replicated by any combination of existing tools.
→ Pivots = Detection mechanism only (identifies where reactions occur)
→ ATR = Scaling parameter only (normalizes distances across any asset)
→ Volume = Weighting modifier only (amplifies high-conviction reactions)
→ Heat Accumulation + Decay = ORIGINAL (no existing indicator does this)
→ Dynamic Level Lifecycle = ORIGINAL (birth, reinforce, decay, death)
→ Behavior Detection at Levels = ORIGINAL (classifies interaction patterns)
No component is displayed independently. Everything feeds the central price memory concept.
---
HOW TO READ THE ZONES
ZONE COLORS (Dark Theme - default):
→ Purple/Blue tones = Low heat, Developing level (fewer reactions)
→ Red tones = Medium heat, Active or Strong level
→ Orange/Yellow/Gold tones = High heat, Dominant level (many confirmed reactions)
ZONE COLORS (Light Theme):
→ Gray/Steel tones = Low heat
→ Red/Dark Red tones = Medium to high heat
ZONE COLORS (Classic S/R Theme):
→ Green = Level currently acting as support (price above the zone)
→ Red = Level currently acting as resistance (price below the zone)
ZONE THICKNESS:
Zones expand slightly as heat increases and pulse larger when price approaches (proximity effect). The glow effect adds a soft outer halo that intensifies on high-heat levels near current price, providing immediate visual emphasis on the most important nearby zones.
ZONE LIFESPAN:
Each zone extends from its birth bar to a configurable number of bars into the future (default 15). This visual extension is purely for display - it helps identify where zones project ahead of price. Older zones with maintained heat indicate structural levels where the market has shown persistent memory.
---
HOW TO READ THE LABELS
Each visible zone displays a label with key information. The label format depends on the selected Label Mode. When behavior is detected, it is appended to the end of the label.
MINIMAL MODE EXAMPLE:
"STR 5 2.3x SEA REJ↑"
→ STR = Classification (Strong)
→ 5 = Hit count (5 confirmed reactions)
→ 2.3x = Relative volume (2.3 times average per reaction)
→ SEA = Age (Seasoned - 50 to 200 bars old)
→ REJ↑ = Current behavior (Bullish Rejection detected)
STANDARD MODE EXAMPLE:
"Strong | 5 hits | 2.3x | SEA | Rejection ↑"
→ Full classification name
→ Hit count with label
→ Relative volume multiplier
→ Age abbreviation
→ Full behavior name with direction
DETAILED MODE EXAMPLE:
"Strong | Resistance | 5 | 2.3x | 1.2345 | Seasoned | Sweep ↓"
→ Classification
→ Current support/resistance status
→ Hit count
→ Relative volume
→ Exact price
→ Full age name
→ Full behavior name
LARGE MODE:
Same information as Standard but rendered in larger text for visibility.
When no behavior is currently detected, the behavior portion is simply omitted from the label.
CLASSIFICATION TIERS:
→ Developing = Heat below 40% of max OR fewer than 3 hits
→ Active = Heat above 40% AND 3 or more hits
→ Strong = Heat above 60% AND 4 or more hits
→ Dominant = Heat above 80% AND 5 or more hits
AGE CATEGORIES:
→ Fresh (NEW) = Less than 50 bars since first detection
→ Seasoned (SEA) = Between 50 and 200 bars old
→ Veteran (VET) = More than 200 bars old
A Veteran level with high heat indicates deep structural significance - a price where the market has reacted repeatedly over an extended period and continues to hold relevance.
RELATIVE VOLUME EXPLAINED:
The volume shown is NOT raw volume. It is a normalized multiplier showing how much volume reactions attracted compared to the average bar:
→ 1.0x = Average volume at reactions
→ 2.0x or higher = Above-average conviction behind reactions
→ Below 0.5x = Below-average conviction
→ "-" = Volume data unavailable for this asset
Volume is calculated using attributed notional value: only the fraction of bar volume proportional to the zone width is counted, preventing large-range bars from inflating readings.
---
HOW TO READ THE DASHBOARD
The dashboard provides a ranked summary of all active memory levels. It appears as a table overlay on the chart (position configurable).
COLUMN-BY-COLUMN:
# → Rank by heat intensity. An asterisk (*) marks the highest-heat level. Numbers rank the rest.
PRICE → The exact price of the memory level, formatted to the asset's tick precision. This is the weighted-average price across all reactions at this level.
CLASS → Classification tier (Developing, Active, Strong, Dominant). In Classic S/R theme, a suffix "S" (Support) or "R" (Resistance) is appended based on whether price is above or below the level.
HEAT → Visual heat bar using 8 segments.
→ "||||||||" = Maximum heat (hottest level)
→ "||||...." = Moderate heat
→ "|......." = Low heat (may decay out soon)
HITS → Total number of confirmed reactions at this level. This includes both pivot-confirmed reactions and qualified wick rejections.
RVOL → Relative volume multiplier averaged across all reactions at this level. Higher values indicate stronger volume conviction behind the reactions that built this level.
STATUS → A dynamic field showing one of three things:
→ Behavior pattern name if currently detected (e.g., "REJ↑", "SWP↓", "BRK↑")
→ "At level" if price is within 0.15% of the zone (highlighted in green)
→ Distance as percentage if price is away (e.g., "1.25% above")
AGE → How long the level has existed (NEW, SEA, VET).
FOOTER → Shows total memory levels being tracked, how many are currently visible, and the current decay rate setting.
---
BEHAVIOR DETECTION
When price approaches a memory zone, the indicator analyzes real-time price action to classify how the market is interacting with that level. The detected behavior is displayed as part of the zone label and in the dashboard STATUS column.
Behaviors are checked in priority order. Only the highest-priority match is displayed.
BREAK (Highest Priority):
→ Price opens on one side of the zone and closes decisively on the other
→ Requires strong body (more than 50% of candle range)
→ Close direction must match candle direction (bullish close for Break ↑)
→ Indicates the level has failed and may flip from support to resistance or vice versa
→ Once a Break is detected, the level is marked internally so future Retest detection becomes possible
SWEEP:
→ Price extends significantly beyond the zone (1.5x zone height past the edge) then reverses
→ The extended wick must be larger than the body and more than 35% of total range
→ Close must be back near or inside the zone
→ This pattern often represents a liquidity grab - price pushes through to trigger stops then reverses
REJECTION:
→ A prominent wick touches or enters the zone, and the body closes away
→ Wick must exceed 45% of the candle's total range
→ Body must have meaningful size (more than 25% of range) confirming conviction
→ Indicates the level is actively defending - buyers or sellers are stepping in
RETEST:
→ Price returns to a level that was previously broken
→ Requires all lookback bars to have been on one side (away from zone)
→ Current bar must touch the zone
→ This is the classic "support becomes resistance" or "resistance becomes support" confirmation
ABSORPTION (Lowest Priority):
→ Multiple consecutive bars with bodies inside the zone
→ Average body size is small relative to average range (less than 45%)
→ Indicates accumulation or distribution is occurring within the zone
→ Often precedes significant directional moves
Behaviors persist in the label until a new behavior is detected. When price moves away from the zone, the last detected behavior remains visible, giving context about the most recent significant interaction.
---
RECOMMENDED TIMEFRAMES AND SETTINGS
SCALPING (1-minute to 15-minute charts):
→ Pivot Sensitivity: 2 to 4
→ Decay Rate: 0.980 to 0.985 (faster fade for fast markets)
→ Min Hits: 2
→ Focus on Fresh and Seasoned levels
DAY TRADING (15-minute to 1-hour charts):
→ Pivot Sensitivity: 5 to 8
→ Decay Rate: 0.990 to 0.992 (default range)
→ Min Hits: 2 to 3
→ Balanced mix of age categories
SWING TRADING (4-hour to daily charts):
→ Pivot Sensitivity: 10 to 15
→ Decay Rate: 0.994 to 0.996 (slower fade)
→ Min Hits: 3
→ Focus on Seasoned and Veteran levels
POSITION TRADING (daily to weekly charts):
→ Pivot Sensitivity: 15 to 25
→ Decay Rate: 0.997 to 0.999 (very slow fade)
→ Min Hits: 3 to 4
→ Focus on Veteran levels with high heat
GENERAL TIPS:
→ Higher timeframes benefit from increased Pivot Sensitivity
→ Volatile assets benefit from increased Merge Distance
→ For cleaner charts, increase Min Hits to Display
→ For more context, increase Max Memory Slots and Show Top N Levels
---
PRACTICAL EXAMPLES
EXAMPLE 1 - IDENTIFYING HIGH-PROBABILITY REACTION ZONES:
A Dominant-classified zone (gold/yellow) showing 7 or more hits with Veteran age tells you this is a deeply embedded structural level. The market has reacted here many times over hundreds of bars and the level continues to maintain high heat. When price approaches this zone, the probability of a meaningful reaction is elevated compared to a Developing zone with 2 hits.
EXAMPLE 2 - CONFIRMING A BREAKOUT:
Price approaches a Strong resistance zone. The label updates to show "Break ↑" as price closes decisively above. The dashboard STATUS column changes from "0.5% below" to "BRK↑". If price later returns to this zone and the label shows "Retest ↑", this confirms the classic resistance-to-support flip pattern. The zone's wasBroken flag ensures Retest detection only activates after a confirmed Break.
EXAMPLE 3 - SPOTTING LIQUIDITY SWEEPS:
A high-heat zone sits above price. Price spikes through the zone with a long upper wick but closes back inside or below. The label displays "Sweep ↓" indicating a potential stop-hunt pattern. The wick exceeded 1.5 times the zone height beyond its edge and the upper wick dominated the candle's body - both requirements for Sweep classification.
EXAMPLE 4 - READING VOLUME CONVICTION:
Two zones appear near current price. Zone A shows "2.8x" relative volume while Zone B shows "0.6x". The reactions that built Zone A attracted nearly 3 times the average bar volume, suggesting strong institutional interest. Zone B's reactions occurred on below-average volume, suggesting less conviction. This context helps prioritize which zone is more likely to produce a meaningful reaction.
EXAMPLE 5 - USING LEVEL AGE FOR CONTEXT:
A Veteran level (more than 200 bars old) that still maintains high heat has survived hundreds of decay cycles. Each cycle multiplies its heat by 0.992 (default). After 200 bars of decay without any new reactions, heat would fall to roughly 20% of its peak. For a Veteran level to remain Dominant, it must have received consistent reinforcement over time - indicating genuine structural significance rather than a one-time event.
---
Chart Example
1. Price on the S&P 500 E-mini Futures 15-minute chart is consolidating within a tight range between two heavily-tested Veteran zones, with the gold Dominant level acting as a persistent floor and an orange 22-hit Veteran zone overhead cycling through live behaviors as price repeatedly tests it from below. A structured ladder of purple Developing and red Active zones extends well below current price, with a Retest ↓ pattern visible at a mid-range level indicating a previously broken area is now being revisited from above. The dashboard confirms 17 memory levels tracked with 8 visible, the top-ranked Dominant zone holding a full heat bar and Break ↑ in its STATUS column throughout the session.
2. Price on the Nifty 50 Index 5-minute chart surged strongly through a cluster of high-heat gold zones during the session, reaching a peak at a thin Developing resistance level before pulling back sharply into a contested area between a Dominant zone and a Strong zone sitting just below it. The upper region shows two gold/yellow zones in close proximity - a Dominant and a Strong, both with Sweep behaviors active in their labels, indicating a liquidity grab above followed by a sharp reversal back into the zone cluster. The dashboard shows two Dominant-classified levels in the top two ranks, with a rich mix of Veteran and Seasoned ages confirming this price area carries deep structural memory.
---
SETTINGS REFERENCE
CORE SETTINGS:
→ Pivot Sensitivity - Bars on each side to confirm a swing. Lower = more sensitive, more levels.
→ Merge Distance - How close two reactions must be (in ATR multiples) to merge into one level.
→ ATR Period - Period for volatility normalization (default 14).
MEMORY SETTINGS:
→ Decay Rate - Per-bar multiplier for heat decay. 0.992 = balanced default.
→ Heat Per Reaction - Base heat added per confirmed reaction. Modified by volume weighting.
→ Death Threshold - Minimum heat to survive. Below this, the level is removed.
→ Max Memory Slots - Maximum simultaneous levels tracked (default 20).
→ Min Hits to Display - Reactions required before a zone becomes visible (default 2).
→ Show Top N Levels - Maximum zones rendered on chart (default 8).
DETECTION SETTINGS:
→ Wick Rejections - Enable wick-based reaction detection (adds heat at half rate of pivots).
→ Min Wick Ratio - Required wick percentage for wick reactions (default 55%).
→ Volume-Weighted Heat - Weight reactions by relative volume.
→ Behavior Detection - Enable real-time pattern classification at zones.
→ Behavior Lookback - Bars analyzed for behavior patterns (default 3).
APPEARANCE SETTINGS:
→ Color Theme - Dark (purple to gold gradient), Light (gray to red), Classic S/R (green/red).
→ Zone Thickness - Visual height of zones as ATR fraction.
→ Glow Effect - Soft outer halo that intensifies near price.
→ Proximity Radius - Distance at which proximity effects activate.
LABEL SETTINGS:
→ Show Zone Labels - Toggle zone information labels.
→ Label Mode - Information density (Minimal, Standard, Detailed, Large).
→ Show Hit Count - Include reaction count in labels.
→ Show Relative Volume - Include volume multiplier in labels.
→ Reaction Dots - Show dots at exact reaction prices (off by default for chart clarity).
DASHBOARD SETTINGS:
→ Show Dashboard - Toggle the summary table.
→ Position - Screen position (8 options).
→ Text Size - Font size (Tiny, Small, Normal).
→ Rows - Number of levels shown in dashboard (default 5).
---
ALERTS
Three alert conditions are available:
"Price entered hot zone" - Triggers when price enters a high-heat zone with 3 or more hits and heat above 50% of maximum. Useful for monitoring approaches to significant levels.
"New behavior detected" - Triggers when a new behavior pattern (Rejection, Sweep, Break, Retest, Absorption) is classified at any visible level. Useful for real-time event notification.
"New reaction" - Triggers when a new pivot is confirmed. Useful for tracking all reaction events across all levels.
All alerts describe observed events. They do not predict future price movement or generate buy/sell signals.
---
IMPORTANT NOTES
RETROACTIVE ANCHORING:
Pivot-based levels are confirmed after the Pivot Sensitivity number of bars have passed. The level is drawn at the true swing bar but only becomes known after confirmation. This is standard pivot behavior used across all pivot-based indicators and does not constitute future data usage.
VOLUME DATA AVAILABILITY:
Some assets, particularly certain forex pairs, may not report volume data. When volume is unavailable, relative volume displays show "-" and volume weighting is automatically disabled. The indicator functions fully without volume data.
EARLY CHART BEHAVIOR:
Zones and behavior labels may be sparse early in chart history. The indicator needs sufficient bars to detect pivots, accumulate heat, and meet the minimum hit count. Allow at least 100 bars for the system to populate meaningfully.
PERFORMANCE:
Reaction dots (when enabled) are only rendered within the most recent 500 bars to maintain chart performance. All memory calculations remain unaffected regardless of dot visibility.
---
DISCLAIMER
This indicator is provided for educational and analytical purposes only. It visualizes historical price reaction zones and does not predict future price movement, generate buy/sell signals, or constitute financial advice.
Past reactions at specific price levels do not guarantee future behavior. Market conditions change and levels that held previously may fail in the future. Always conduct your own analysis, use proper risk management, and never risk more than you can afford to lose.
The author assumes no liability for any trading decisions made using this tool. Trading involves significant risk of loss. Use this indicator as one component of a comprehensive trading approach, not as a standalone decision-making system.
---
BullByte Indicator

Volume Defense Zones [MarkitTick]💡 The Volume Defense Zones is a professional-grade liquidity analysis engine designed to identify institutional interest by isolating ultra-high volume transactions and mapping them as dynamic support and resistance zones. Unlike standard volume indicators that merely plot vertical bars, this script utilizes a sophisticated heatmap engine and a multi-timeframe (MTF) overlay to provide a three-dimensional view of market participation. By calculating the Volume Weighted Average Price (VWAP) specifically for high-intensity bars, the indicator creates "Defense Zones"—price levels where large-scale players have historically committed significant capital.
● ✨ Originality and Utility
This indicator distinguishes itself from the vast library of open-source tools through its unique "Search Depth" logic and automated zone merging capabilities. While many scripts identify volume spikes, they often clutter the chart with overlapping lines that lose relevance over time. This system solves that problem by:
• Dynamic Zone Consolidation
The script includes a proprietary merge threshold algorithm. If two high-volume defense levels are within a user-defined percentage of each other, the script automatically merges them into a single "Defense Box." This reflects the reality of market "zones" rather than surgical price points.
• Multi-Timeframe Institutional Benchmarking
By integrating a built-in MTF overlay, traders can visualize 4-hour or Daily volume defense zones while trading on a 5-minute chart. This ensures that the user is always aware of the "Big Picture" liquidity levels that are likely to hold during intraday volatility.
• Historical Ghosting and Breakout Analysis
The script tracks whether a zone is "active" or "broken." When price breaches a defense level, the zone doesn't simply disappear; it transforms into a "Ghost Zone" (dotted line), allowing traders to analyze S/R flips and historical retests of previously defended levels.
● 🔬 Methodology and Concepts
The core logic of the Volume Defense Zones is rooted in the identification of "Abnormal Volume" relative to a historical lookback period.
• Peak Volume Identification
The script maintains a rolling window of volume data defined by the "Comparison Length" input. A bar is classified as "Ultra High Volume" only if its volume exceeds the maximum volume recorded in that lookback window. This ensures that the signals adapt to changing market regimes (e.g., high-volatility sessions vs. low-volume holidays).
• The Defense Calculation
For every identified volume peak, the script calculates a localized VWAP using the internal formula:
Accumulated (Volume * Bar Body Center) / Total Volume.
This price level represents the "Average Cost Basis" of the participants during that specific high-intensity event. If the price remains above this VWAP, the level is treated as a Bullish Defense (Support). If price stays below it, it is a Bearish Defense (Resistance).
• Multi-Timeframe (MTF) Security
Using the request.security function with barmerge.lookahead_on (and appropriate offsets to prevent repainting), the script fetches high-volume levels from higher timeframes. This provides a top-down liquidity map that identifies where large institutions are "defending" their positions.
● 🎨 Visual Guide
The visual output is divided into three primary categories to ensure maximum clarity and actionable data visualization:
• The Volume Heatmap (Bottom Pane)
Instead of standard green and red bars, this script uses a professional 5-color heatmap gradient:
- Deep Blue (HM_C0): Low interest / baseline volume.
- Teal/Cyan (HM_C1/HM_C2): Rising interest.
- Gold (HM_C3): High participation.
- Bright Red (HM_C4): Ultra-High Volume.
These bars are framed with thicker borders when a new peak is detected, making the "Ultra Vol" events immediately visible.
• Defense Zones and Labels
- Green Boxes (ZONE_BULL_COL): Represent active bullish defense zones where buyers are currently in control of the high-volume level.
- Red Boxes (ZONE_BEAR_COL): Represent active bearish defense zones where sellers are successfully defending the level.
- Blue/Neutral Boxes (ZONE_INSIDE_COL): Represent zones where the price is currently trading inside the defense range, indicating a period of consolidation or "battle."
- Dotted Lines/Boxes: These are "Broken" or "Ghost" zones. They indicate levels that were previously significant but have been breached.
• Trend Climax Indicators
The script plots specific triangles on the volume bars:
- Green Up Triangle (▲): Bullish Climax. Occurs when price is trending down but a high-volume reversal is detected above the VWAP.
- Red Down Triangle (▼): Bearish Climax. Occurs when price is trending up but a high-volume rejection is detected below the VWAP.
• Professional Dashboard
A clean table in the top-right corner displays real-time statistics, including Total Volume, Max Volume, Average Volume, and the total count of analyzed bars.
● 📖 How to Use
Identifying Institutional Support: Look for thick green boxes formed during "Ultra High Vol" events. These are areas where price is likely to bounce upon a retest.
Trading the Breakout: When a red resistance zone is breached and turns into a dotted "Ghost" zone, wait for a retest of that level. If price holds above it, the old resistance has become new support.
Filtering with MTF: Only take long trades when the price is above the Purple MTF lines, which represent the higher-timeframe institutional defense levels.
Exhaustion Signals: Use the Climax Triangles (▲/▼) to identify potential trend reversals. A red triangle at the end of a long uptrend often signals that "smart money" is distributing their positions.
● ⚙️ Inputs and Settings
• Volume Settings
- Time Resolution: Allows you to change the granularity of the volume analysis.
- Comparison Length: Defines the lookback period (default 20) for determining what constitutes a "Peak" volume bar.
• Visual & Analysis
- Search Depth (Levels): Controls how many historical S/R zones are displayed on the chart. Increasing this provides more historical context but may clutter the view.
- Merge Threshold (%): A critical setting that defines how close two price levels must be to be grouped into a single zone.
- Show All Data Labels: Toggles the display of exact volume figures above the bars.
• Multi-Timeframe Overlay
- HTF Timeframe: Set the higher timeframe (e.g., 240 for 4-hour) to see macro defense zones.
- Max HTF Zones: Limits the number of MTF lines drawn to keep the chart clean.
● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The indicator is constructed upon the principles of **Auction Market Theory (AMT)** and **Volume Spread Analysis (VSA)**.
• Auction Market Theory
The fundamental premise is that the market is an ongoing auction where the purpose of price is to find the area where the most volume can be transacted. The "Defense Zones" calculated by this script represent "High Volume Nodes" (HVN). Scientifically, these are levels of high price acceptance. When price moves away from these zones and returns, the script tests whether the "Value" has shifted or if the previous participants are still willing to transact at that level.
• Statistical Outlier Theory
The "Ultra High Volume" detection utilizes a non-parametric approach to identify outliers. By comparing the current volume to the rolling maximum of the previous $N$ periods, the script effectively identifies events that fall outside the standard distribution of market activity. This is mathematically equivalent to identifying "Z-score" spikes in volume, signifying a significant shift in market sentiment or the injection of institutional liquidity.
• Volume Weighted Cost Basis (VWCB)
The use of VWAP within the defense zones is based on the academic concept of the "Volume Weighted Cost Basis." In institutional finance, the execution quality of a large trade is measured against the VWAP. Therefore, these levels act as psychological and financial "anchors" for large participants who need to protect their average entry price to maintain a profitable position.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. I expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Candle DNA Strand█ CANDLE DNA STRAND
A unique lower-panel indicator that visualizes candle structure as a stylized double-helix pattern. One strand represents body dominance (open-close range) while the other represents wick proportion (shadow-to-body ratio). The strands twist around a center axis with color encoding for bullish/bearish bias, revealing candle character patterns over time in an intuitive DNA-inspired format.
█ CONCEPT
Traditional candlestick analysis focuses on individual candle patterns. The Candle DNA Strand takes a different approach by decomposing every candle into two core metrics and plotting them as intertwined waves:
• Body Strand — Measures how much of each candle is "body" (the filled portion between open and close). High body ratios indicate conviction and directional commitment.
• Wick Strand — Measures how much of each candle is "shadow" (upper and lower wicks combined). High wick ratios indicate rejection, indecision, or failed attempts at direction.
These two strands are phase-offset by 180° to create the classic double-helix DNA appearance. As you scroll through the chart, you can visually identify periods of conviction (body-dominant) versus indecision (wick-dominant), and how candle character evolves over time.
█ HOW IT WORKS
The indicator calculates two normalized ratios for each candle:
Body Ratio = |Close - Open| / (High - Low)
Wick Ratio = (Upper Wick + Lower Wick) / (High - Low)
These ratios are smoothed and then modulated onto sine waves that twist around a center axis at the 50 level. The amplitude of each strand reflects the strength of that metric — larger bodies push the body strand further from center, and larger wicks push the wick strand further out.
The strands are color-coded by the current candle's bias:
• Bullish candles (close ≥ open) → Neon green tones
• Bearish candles (close < open) → Neon red tones
█ TRADE ZONES
The indicator includes an optional Trade Zone detection system based on candle character analysis:
◉ LONG ZONE (Green Background)
Triggers when:
• Average body ratio exceeds the Body Dominance Threshold (default 65%)
• Bullish momentum score > 40% (more bulls than bears in lookback period)
• Average wick ratio below the Wick Rejection Threshold (default 55%)
This identifies periods where price is moving up with conviction — strong bullish bodies with minimal rejection wicks.
◉ SHORT ZONE (Red Background)
Triggers when:
• Average body ratio exceeds the Body Dominance Threshold
• Bearish momentum score > 40% (more bears than bulls in lookback period)
• Average wick ratio below the Wick Rejection Threshold
This identifies periods where price is moving down with conviction — strong bearish bodies with minimal rejection wicks.
◉ CHOP/INDECISION
When the average wick ratio exceeds 60%, the market is showing high rejection and indecision. The DNA strands will show wick dominance during these periods.
Triangle markers appear at zone entry points:
• ▲ Green triangle below the helix = Long zone entry
• ▼ Red triangle above the helix = Short zone entry
█ VISUAL ELEMENTS
DNA Strands
Two intertwined lines representing body and wick ratios, twisting around the center axis with a configurable wavelength.
Base Pair Connectors
Vertical lines connecting the two strands at regular intervals, mimicking the "rungs" of a DNA ladder. These help visualize the spread between body and wick metrics.
Nucleotide Nodes
Small circular markers along each strand showing individual data points.
Fill Zone
Subtle gradient fill between the strands for visual depth. The fill color matches whichever strand is currently on top.
Info Label
Displays current values at the right edge of the chart:
• Current bias (BULL/BEAR)
• Body and Wick percentages
• Active trade zone (if any)
█ PATTERN DETECTION
The indicator automatically detects significant candle patterns based on DNA metrics:
DOJI — Body ratio < 15%
Very small body relative to total range. Indicates indecision.
MARUBOZU — Body ratio > 85%
Almost no wicks. Strong conviction candle with price closing near the high (bullish) or low (bearish).
HAMMER — Wick ratio > 60% with lower wick > 2× upper wick
Long lower shadow showing rejection of lower prices.
SHOOTING STAR — Wick ratio > 60% with upper wick > 2× lower wick
Long upper shadow showing rejection of higher prices.
█ SETTINGS
DNA Helix Settings
• Helix Wavelength — Number of bars for one complete DNA twist cycle (default: 20)
• Helix Amplitude — Vertical spread of the strands from center (default: 35)
• Show Base Pair Connectors — Toggle the connecting rungs (default: On)
• Connector Frequency — Draw a connector every N bars (default: 2)
• Data Smoothing — SMA length for smoothing ratios (default: 3)
• Strand Thickness — Line width for the DNA strands (default: 2)
Trade Zone Settings
• Show Trade Zones — Toggle background highlighting and entry signals (default: On)
• Zone Lookback — Bars to analyze for zone detection (default: 5)
• Body Dominance Threshold — Minimum avg body ratio for zone trigger (default: 0.65)
• Wick Rejection Threshold — Maximum avg wick ratio for zone trigger (default: 0.55)
Fluorescent Colors
• Bullish colors — Neon green and electric green variants
• Bearish colors — Neon red and hot pink variants
• Axis, connector, and zone colors are all customizable
Visual Settings
• Show Nucleotide Nodes — Toggle the small circles on strands (default: On)
• Show Info Labels — Toggle the right-side information label (default: On)
• Show DNA Analysis Table — Toggle detailed analysis table (default: Off)
█ ALERTS
Four alert conditions are available:
1. Long Zone Entry
"Entered LONG zone - strong bullish momentum with conviction candles"
2. Short Zone Entry
"Entered SHORT zone - strong bearish momentum with conviction candles"
3. Doji Pattern
"Doji detected - indecision"
4. Marubozu Pattern
"Marubozu detected - strong conviction"
█ INTERPRETATION GUIDE
Reading the DNA:
When body strand dominates (further from center):
• Market is moving with conviction
• Candles have strong bodies, minimal wicks
• Trend is likely to continue
When wick strand dominates (further from center):
• Market is showing rejection/indecision
• Candles have long shadows relative to bodies
• Potential reversal or consolidation
Strand crossovers:
• When strands cross, character is shifting
• Body crossing above wick → increasing conviction
• Wick crossing above body → increasing indecision
Color consistency:
• Long stretches of green → sustained bullish pressure
• Long stretches of red → sustained bearish pressure
• Alternating colors → choppy, mixed market
█ BEST PRACTICES
1. Use with price context — The DNA strand shows candle character, not direction. Combine with price action on the main chart.
2. Adjust wavelength to timeframe — Shorter wavelengths (10-15) for scalping, longer wavelengths (25-40) for swing trading.
3. Trade zones are filters, not signals — Use zone entries as confirmation for your existing strategy, not as standalone signals.
4. Watch for character shifts — When the dominant strand changes, market behavior is changing. This often precedes reversals.
5. Multiple timeframe analysis — Check DNA character on higher timeframes to understand the broader context.
█ CREDITS
Developed by Hash Capital Research
Pine Script™ v6
This indicator is provided for educational and informational purposes. Always conduct your own analysis and manage risk appropriately. Indicator

Institutional Order Zones | ProjectSyndicateInstitutional Order Zones automatically identifies and power-ranks high-probability institutional zones by analyzing market compression events and explosive breakout candles. It filters for quality, calculates a SCORE for every zone based on its formation dynamics and historical interaction, and presents all data on the chart and in a comprehensive dashboard to eliminate clutter and focus on levels that matter.
• 🎯 Proprietary Three-Engine Architecture — the algorithm does not use generic pivots or standard support/resistance detection. Engine 1 (Order Compression) identifies statistically quiet consolidation periods using ATR percentile compression and linear regression slope neutrality. Engine 2 (Institutional Breakout) detects the institutional breakout candle — body and volume must both spike simultaneously above statistical thresholds. Engine 3 (Zone Scoring) assigns every zone a score from 0-100 based on Breakout Strength (40pts), Order Compression Duration (30pts), and Post-Breakout Momentum (30pts).
• 🎨 Score-Based Visuals — zones are color-coded into three tiers based on their 0-100 score. STANDARD (0-34): purple-magenta resistance / bright teal support. STRONG (35-64): dark red resistance / medium teal support. INSTITUTIONAL (65-100): deep pink resistance / dark teal support. Higher-tier zones automatically receive a thicker border and centerline for instant visual priority.
• 🧠 Advanced Zone Management — zones are dynamically updated on every bar. A price rejection adds +10 to the zone score and promotes its status to VALIDATED. A price breach subtracts -20 and marks the zone as VIOLATED. Violated zones can be hidden or shown via a toggle input.
• 📈 Detailed On-Chart Markup — every zone is plotted with a label anchored inside the shaded area: TIER | Sc:xx.x | STATUS | Dis:xx.x% | Dur:nb | Rej:n Brc:n. This shows the zone tier, composite score, current status (NEW / VALIDATED / VIOLATED), the breakout dislocation strength as a percentage, the consolidation duration in bars, and the full rejection and breach history.
• 🧭 Comprehensive Dashboard Display — get a complete market overview without leaving your chart. The Zone Rankings panel shows the nearest Resistance and Support zones ranked by proximity, with price, tier flag, score, and pip distance per row. The Market Stats panel shows the current session, daily range vs 10-day ADR, volatility state (LOW / NORMAL / HIGH), and the total count of active Institutional-grade zones on each side.
• 🔔 Comprehensive Alerts — get an alert whenever price enters proximity of a Standard zone, a Strong zone, or an Institutional zone, with separate alert conditions for resistance and support so you can filter exactly what matters to your setup.
• ✅ Quality Control Filters — user-configurable inputs for ATR percentile threshold, slope neutrality tolerance, minimum compression duration, body multiplier, and volume multiplier allow for deep customization. Tighten the thresholds for fewer, higher-quality zones. Loosen them for broader coverage on lower timeframes.
• 🔧 Fully Customizable — control everything from the max number of zones shown, lookback period, zone width percentage, and extend-right bars to the text size of all labels, dashboard size, and individual zone colors.
• 🎯 Why this algo is unique: Standard supply/demand or FVG indicators rely on simple pattern recognition (gap between candles, pivot highs/lows). This algorithm quantifies the underlying market state that precedes institutional moves. It measures the quality of the compression that created the zone and the statistical significance of the breakout that validates it. Every zone has a score you can trust, not just a visual box.
• 🚀 Apply to Gold (XAUUSD), Forex, Crypto, and Indices on any timeframe. The ATR-based detection and zone width settings allow it to adapt to anything from M5 scalping to D1 swing trading.
• 🎯 How to use this? Use the dashboard to identify the strongest, closest zones. Focus on price action around INSTITUTIONAL-tier zones (Score >= 65) that align with your higher-timeframe bias. Use the alerts to know when price is approaching a key level so you are never caught off guard.
• ⚠️ IMPORTANT NOTICE: This indicator is designed to identify high-probability institutional order zones. It should NOT be used as a standalone signal for entering live trades. Always use it in conjunction with your own trading strategy, price action analysis, and other technical indicators to confirm trade setups and manage risk.
Indicator
