Helios Volatility Forecast [JOAT]Helios Volatility Forecast
Helios Volatility Forecast is a Yang-Zhang volatility estimator with regime classification, a volatility cone (historical percentile bands), an HMA-smoothed forecast line, and a position-size suggestion. Volatility is classified into four regimes (LOW / NORMAL / ELEVATED / EXTREME) by percentile rank against its own history. Cross-pane elements paint a soft regime tint and a position-multiplier suggestion onto the price chart.
What makes it different
Most volatility indicators use a simple close-to-close standard deviation, which discards intraday range information and ignores overnight gaps. The Yang-Zhang estimator combines four components — overnight close-to-open variance, intraday open-to-close variance, and a Rogers-Satchell range term — into a single estimator that is more accurate than close-to-close for instruments that gap.
A 4-band volatility cone (5th, 25th, 50th, 75th, 95th percentile of the past 100 bars) is plotted around the current volatility, with gradient fills bracketing tails and the interquartile range.
A 4-regime classifier (LOW / NORMAL / ELEVATED / EXTREME by percentile thresholds at 25, 65, 90) drives a cross-pane tint on the price chart and a numeric position-size multiplier suggestion. The suggestion scales inversely with realized vol — wider sizes in low-vol regimes, halved sizes in extreme-vol regimes.
An HMA forecast line projects the smoothed vol trajectory ahead. Forecast-crossing-realized alerts fire when expansion or contraction is imminent.
How it works
Yang-Zhang formula combines overnight return, intraday return, and Rogers-Satchell range term, weighted by k = 0.34 / (1.34 + (len + 1) / (len - 1)).
Percentile rank of sigma_yz over a 100-bar history equals vol_pct.
Regime classification: LOW below 25, NORMAL 25 to 65, ELEVATED 65 to 90, EXTREME above 90.
HMA of sigma_yz equals the forecast. Forecast direction equals the sign of (forecast minus current).
Position-size multiplier equals clamp(1.5 minus vol_pct / 100, 0.3, 1.5).
Vol-of-vol (stdev of recent realized vol) feeds a regime stickiness indicator.
Reading the chart
In-pane : regime-tinted volatility line (vivid mint for LOW, neutral white for NORMAL, amber for ELEVATED, vivid red for EXTREME), HMA forecast line with direction-color flow, five vol-cone percentile lines.
Cross-pane : soft regime tint background on the price chart, plus a Size x0.50 EXTREME vol label updating each bar.
A vol-of-vol panel as a sub-strip at the top of the pane.
Five right-edge cone percentile labels (p5 / p25 / p50 / p75 / p95).
A current-vol percentile rank label.
Regime change timeline labels on the price chart at each regime transition.
Cross-pane vol-cone touch markers when vol crosses p95 (breakout) or p5 (contraction).
A regime stickiness indicator (how long the regime has been in its current state).
Forward expected-range lines on the price chart (close plus or minus forecast times ATR scalar).
Signals
Regime up / down (any percentile-bucket transition)
Extreme vol entry
Low vol entry
Vol breakout (sigma crosses above p95 of its own history)
Vol contract (sigma crosses below p5)
Vol Z-shock up / down (when vol z-score exceeds plus or minus 2)
Forecast cross up / down (forecast vs realized)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
Volatility : Yang-Zhang window, regime percentile lookback, forecast HMA length.
Visual : bullish (low vol) color, bearish (extreme vol) color, elevated (amber) color, cone toggle, forecast toggle, cross-pane candles toggle, regime pulse toggle.
Dashboard : position, size.
How traders use this
Position sizing : scale entries inversely with the regime. Full size in LOW, default in NORMAL, half in ELEVATED, third in EXTREME. The multiplier label provides the suggested factor.
Volatility breakouts : vol crossing above p95 historically precedes large directional moves. Tighten trailing stops or reduce holding time.
Volatility contraction : vol crossing below p5 historically precedes range / chop. Reduce directional bias. Consider mean-reversion strategies.
Regime-aware stops : in ELEVATED or EXTREME regimes, ATR-based stops should be wider. In LOW regimes, tighter. The pos-mult label codifies this implicitly.
Limitations
Yang-Zhang assumes log-normal returns and lognormality breaks down during fat-tail events (it under-estimates vol in true crash regimes).
Percentile classification needs sufficient history. The default 100-bar lookback can be lengthened for stable instruments.
The position-size multiplier is a heuristic, not a portfolio-management recommendation. Combine with your own risk-management framework.
The HMA forecast lags slightly behind real-time changes. Treat as smoothed trend, not pinpoint prediction.
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol, any timeframe. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
20-bar Yang-Zhang window, 100-bar regime lookback, 5-bar HMA forecast, mint / red / amber palette, top-right medium dashboard.
Credits
Yang-Zhang estimator from D. Yang and Q. Zhang, Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices , Journal of Business (2000).
Indicator

Anchored VWAP Bands Strategy [Gabremoku]Anchored VWAP Bands Strategy is a context-driven fair value indicator that combines Anchored VWAP, deviation bands, directional bias, and retest/stretch-based entry logic into a single overlay.
The script uses Anchored VWAP as its core reference line, allowing the user to define a custom starting point by time or bars back. Unlike standard VWAP, which resets on a regular session basis, Anchored VWAP starts from a specific event or pivot selected by the trader, making it especially useful for tracking price behavior relative to an important market reference point.
On top of that, the indicator adds sigma-style bands, dynamic fair value coloring, directional state reading, and optional entry signals built around AVWAP retests and band reversals.
What it shows
⚓ Anchored VWAP — the volume-weighted average price from a user-defined anchor point. Anchored VWAP is commonly used to estimate fair value from a specific event and to monitor whether price is trading above or below that reference.
📐 Deviation Bands — up to three upper and lower bands built from either:
anchored standard deviation
or rolling standard deviation
These bands help show how far price has deviated from anchored fair value and can be used to identify balance, expansion, or stretch conditions.
🌈 Dynamic Gradient Bias — AVWAP and its fills change color based on price location and directional pressure relative to the center.
🧭 Directional State — the script classifies price into states such as:
Fair Value
Bullish Balance
Bullish Expansion
Bullish Stretch
Bearish Balance
Bearish Expansion
Bearish Stretch
🎯 Entry and Target Logic — optional long/short signals and dynamic target markers based on AVWAP retests or outer-band reversals.
🪧 Dashboard — displays state, bias, AVWAP slope, distance from fair value, anchor age, and Long-S status.
Core logic
The main idea behind this script is simple:
AVWAP defines fair value from a chosen event
bands define statistical distance from that fair value
slope helps determine directional bias
signals look for retests or stretched reversals
Anchored VWAP is often used to analyze where the market’s volume-weighted average price sits from a meaningful point in time, and many traders use it as a dynamic support/resistance or bias line. Price above AVWAP is often interpreted as relatively stronger positioning, while price below it can imply weaker positioning.
By adding deviation bands, this script gives a clearer structure for distinguishing between:
normal pullbacks,
balanced price action,
and statistically extended moves.
Signal logic
The script supports Both, Long, or Short directional modes, with three signal styles:
Retest AVWAP
Band Reversal
Hybrid
Long ideas
Long signals can trigger when:
price retests AVWAP and closes back above it
or price reacts from the lower band and reclaims it
Short ideas
Short signals can trigger when:
price retests AVWAP from below and closes back under it
or price reacts from the upper band and falls back below it
There is also a Long-S logic tied to reactions around Lower Band 1, with AVWAP used as a potential target when enabled.
This makes the tool useful both for:
trend continuation via AVWAP retests
and mean-reversion or snapback setups from band extremes
Why it matters
One of the biggest strengths of Anchored VWAP is that it adds context.
Instead of asking “is price high or low?” in a generic way, AVWAP asks:
“Is price rich or discounted relative to a meaningful market event and its volume?”
That is why Anchored VWAP is commonly anchored to:
breakout bars
swing highs or lows
earnings events
gaps
major session turning points
In that framework:
AVWAP becomes fair value
slope becomes directional bias
bands become expansion/stretch zones
retests become opportunity areas
Features
✅ Anchored VWAP with time-based or bars-back anchoring
✅ Optional anchor reset logic
✅ Anchored or rolling standard deviation bands
✅ Up to three sigma-style upper/lower bands
✅ Dynamic center-line and fill coloring
✅ Fair value / expansion / stretch state classification
✅ Long / Short / Both strategy modes
✅ Retest AVWAP, Band Reversal, or Hybrid signal modes
✅ Optional slope filter
✅ Optional close-confirmation filter
✅ Dynamic target plotting
✅ Long-S lower-band reaction logic
✅ Bias background shading
✅ AVWAP label and dashboard
✅ Built-in alert conditions
How to use
A practical workflow is:
Choose a meaningful anchor point.
Use AVWAP as the fair value reference.
Read slope for directional bias.
Use the bands to identify balance vs expansion vs stretch.
Trigger entries on:
AVWAP retests in trend
band reversals after extension
In general:
above a rising AVWAP often supports bullish continuation logic
below a falling AVWAP often supports bearish continuation logic
far from AVWAP near outer bands can signal stretch or reaction zones rather than efficient price
Notes
This indicator is designed as a fair value and execution-context tool, not as a full standalone strategy with complete trade management. Anchored VWAP is highly dependent on anchor quality, so the usefulness of the line improves when the anchor is tied to a genuinely meaningful price event.
Author: Gabremoku
Pine Script v6 Indicator

Session VWAP + StdDev Bands [ChartPrime]🔶 OVERVIEW
Session VWAP + StdDev Bands is a professional-grade anchored VWAP system that resets on a user-defined higher timeframe and builds a full standard deviation band structure around it. Unlike a rolling VWAP, this indicator recalculates from the first bar of each new session, giving you a clean, unbiased volume-weighted price reference that reflects exactly where the market has traded relative to volume since the session opened.
The tool goes beyond a simple VWAP line by tracking how many times price has retested each individual band, using that retest count to dynamically intensify the color of each line — the more a level is tested, the more significant it becomes visually. Cumulative volume at each retest is also tracked and displayed, giving traders institutional-grade context directly on the chart.
• Anchored VWAP with configurable higher timeframe reset (Daily, Weekly, Monthly, etc.)
• Three independent standard deviation band pairs (1σ, 2σ, 3σ)
• Per-line retest counter with dynamic color intensity — more retests = brighter line
• Cumulative volume tracking per band displayed in live edge labels
• High/Low wick-based band touch signals with cooldown control
• Clean session break with automatic label and state reset
🔶 CORE CONCEPT — ANCHORED VWAP WITH VOLUME-WEIGHTED STANDARD DEVIATION
Standard VWAP indicators use session time as the anchor. This indicator uses a higher timeframe bar close as the reset trigger, giving you full control over the session definition:
• Anchored Reset: When the selected higher timeframe (e.g. Weekly) closes a new bar, the VWAP and all standard deviation calculations reset from zero. This ensures the VWAP always reflects the current session's volume distribution.
• True StdDev Bands: Bands are calculated using a volume-weighted variance formula — not ATR, not simple standard deviation. This means the bands expand and contract based on how dispersed price has been relative to volume, not just raw price movement.
• Dynamic Color Intensity: Each of the seven lines (VWAP + 6 band lines) tracks its own retest count independently. As price crosses a line more times, its transparency decreases and the line becomes fully saturated — a visual heatmap of the most contested price levels in the session.
🔶 RETEST COUNTING & VOLUME TRACKING
The intelligence of this indicator lives in its per-line memory system:
Independent Counters: Every line — VWAP, 1σ Upper, 1σ Lower, 2σ Upper, 2σ Lower, 3σ Upper, 3σ Lower — has its own retest counter that increments on every close-based cross.
Color Intensity Mapping: Each retest reduces the line's transparency by 10 points. A line with 0 retests starts at 100% transparent (invisible). After 10 retests it reaches full opacity. This creates a natural visual hierarchy where the most-tested levels stand out.
Cumulative Volume: Every time a line is crossed, the bar's volume is added to that line's running total. The edge label displays both the retest count and the total volume that flowed through that level — e.g. "1σ↑ 4 (vol. 2.3M)".
Session Reset: All counters, volumes, and labels reset cleanly at the start of each new session.
🔶 BAND TOUCH SIGNALS
Signal shapes fire when price wicks into a band rather than waiting for a close-based cross, making them more responsive to intrabar reactions at key levels:
Bull Signal (Blue Diamond): The bar's low drops to or below a band line while the previous bar's low was above it — a wick touch from above, indicating potential support reaction.
Bear Signal (Orange Diamond): The bar's high reaches or exceeds a band line while the previous bar's high was below it — a wick touch from below, indicating potential resistance reaction.
Cooldown Filter: A configurable cooldown (default 20 bars) prevents signal clusters at the same level. Once a signal fires, the same direction cannot fire again until the cooldown expires.
🔶 LIVE EDGE LABELS
Each band line carries a floating label anchored to the right edge of the chart that updates every bar:
Labels display the band name, retest count, and cumulative volume in a compact single-line format.
Label text color matches the line's current dynamic color — as the line intensifies, the label text intensifies with it.
Labels reset and reposition automatically on each new session, always staying aligned with the current band price level.
Label size is fully configurable from Tiny to Huge to suit any screen or timeframe.
🔶 HOW TO USE
Identifying Key Levels: Watch which bands accumulate the most retests during a session. A 1σ band with 6+ retests and high cumulative volume is a high-conviction support or resistance zone — treat it like a volume node.
Trend Bias: Price consistently closing above VWAP signals bullish session bias. Price consistently closing below signals bearish bias. Use the VWAP retest count to gauge how contested the mean is.
Breakout Confirmation: When price breaks through a 2σ or 3σ band with a strong close, the band color will begin to intensify on subsequent retests. A bright outer band that holds as support after a breakout is a high-probability continuation signal.
Fading Extremes: Bear signals at 2σ or 3σ upper bands and bull signals at 2σ or 3σ lower bands are mean-reversion opportunities, especially when cumulative volume at those levels is low (few retests, thin volume).
Timeframe Selection: Use Weekly reset on daily charts for swing trading context. Use Daily reset on intraday charts for intraday VWAP analysis. Use Monthly reset on daily or weekly charts for macro-level value area mapping.
🔶 CONCLUSION
Session VWAP + StdDev Bands turns a standard VWAP into a living, session-aware price map. By combining anchored volume-weighted calculations with per-line retest memory and cumulative volume tracking, it gives traders a clear picture of where the market has spent the most energy — and which levels are likely to matter most as the session develops. Indicator

Indicator

Fractional CUSUM Regime Filter [Jamallo]🔹 Intro
The Fractional CUSUM Regime Filter is a quantitative trend and volatility channel indicator designed to identify structural market regimes with high stability. Unlike traditional filters that suffer from lag or whipsaw signals, this indicator applies a dual-layered preprocessor combining Lopez de Prado’s Fixed-Window Fractional Differentiation (FFD) with a classic Cumulative Sum (CUSUM) statistical trigger.
🔹 Break down
Fractional Differentiation (FFD) : Stationarizes pricing input while retaining long-term historical memory (controlled by the "d" parameter).
Classic CUSUM Filter : Accumulates deviations from a rolling baseline relative to current volatility. When cumulative deviation exceeds the threshold multiplier (h), a new regime change is triggered, and the baseline steps dynamically to the new price level.
Vol-Adjusted Percentile Bands : Linear interpolation percentiles of price deviation relative to the stepped baseline. The distances are "locked" and only update on CUSUM regime triggers to prevent wobbly bands.
🔹 Visual Guide: Indicator Anatomy
Here we have the structure of the indicator, including the CUSUM baseline, the 68% inner percentile band, and the 95% outer percentile band.
How to use: Mean Reversion (Pullbacks to the Mean)
The channel boundaries represent statistical extremes. When the price is pushed outside the bands, it is mathematically overextended and highly likely to revert back to the CUSUM baseline.
Long Setup (Pullbacks in Bullish Trend): During a green CUSUM uptrend, watch for price to pull back to the lower bands ("micro pullback") and enter as it heads back up to the baseline mean.
Short Setup (Pullbacks in Bearish Trend): During a red CUSUM downtrend, watch for price to rally into the upper bands ("micro pullback") and enter as it reverts down to the baseline mean.
🔹 How to use: Trend Following & Risk Management
The indicator is designed to capture sustained macro trends while providing clear risk parameters.
Entering on Breakthroughs : Enter when the BUY/SELL signal flags appear (indicating a new CUSUM regime shift).
Stop Loss Placement : Place stop loss orders just below the opposite outer band or below the stepped baseline.
Letting Winners Run : Ride the trend as long as the CUSUM baseline maintains its colored regime state (Green for Long, Red for Short).
🔹 Settings Parameters
d (0.01 - 0.99) : Differentiation order. Lower values retain more historical memory; higher values approach first-difference.
CUSUM Drift & Threshold : Controls baseline sensitivity to regime changes.
Percentile Lookback & Targets : Set the statistical width of the inner and outer boundaries.
Indicator

ATR Exceedance Probability Model [LuxAlgo]The Volatility Exceedance Probability Model (VEPM) indicator is a comprehensive statistical tool designed to quantify the significance of volatility spikes, determine the likelihood of trend continuation, and categorize market environments into specific regimes.
🔶 USAGE
The indicator provides a multi-layered view of volatility, allowing traders to distinguish between standard market noise and statistically significant "exceedance" events.
🔹 Oscillator Interpretation
The main oscillator plots the current exceedance frequency (the rate at which price or range breaches ATR-based thresholds) against a long-term baseline.
Bullish/Significant Glow: When the Z-Score of the frequency exceeds the sensitivity threshold, the oscillator glows green, indicating a high-probability volatility expansion.
Bearish/Normal Glow: When the frequency falls below the baseline, the oscillator shifts toward red, signaling a contraction in volatility.
Frequency Delta: The area between the current frequency and baseline frequency is filled to highlight the momentum of volatility expansion or exhaustion.
🔹 Chart Visuals & Regimes
The script overlays information directly on the price action to provide context:
ATR Bands: Dynamic bands based on the Average True Range act as the "exceedance" barrier.
Regime Boxes: The indicator automatically identifies "Quiet," "Normal," and "High Vol" regimes. These are visualized as colored boxes (defaulting to High Vol) to show the duration and range of specific volatility climates.
Significance Dots: Circles appear at the top of the chart to mark bars that have breached the volatility threshold.
🔹 Dashboard Metrics
A real-time dashboard provides quantitative data:
Exceedance Freq: The percentage of bars in the short-term window that breached the ATR levels.
Serial Break Prob: The historical probability that a breach will be followed by another breach (continuation).
Clustering Edge: The statistical advantage of volatility clustering; a positive value suggests that volatility is currently feeding on itself.
🔶 DETAILS
The VEPM operates on the principle that volatility is not constant but "clusters" in time. It uses the following logic to derive its metrics:
Exceedance Detection: It calculates whether the current price range (True Range) or price levels (High/Low) exceed a user-defined ATR multiplier.
Statistical Z-Score: By comparing the current frequency of these breaches to a long-term baseline (200 bars by default), the model calculates a Z-Score to determine if the current activity is statistically "abnormal."
Continuation Probability: The model looks back at previous breaches and calculates how often they resulted in immediate follow-through, providing a "Serial Break" percentage.
🔶 SETTINGS
🔹 Core Settings
ATR Length: The lookback period used for the Average True Range calculation.
ATR Multiplier: The threshold used to define what constitutes a "breach" or exceedance.
Breach Detection Method: Choose between comparing the bar's total range to ATR or checking if price levels exceed the previous bar's bands.
🔹 Statistical Windows
Short-Term Window: The period used to calculate the current exceedance frequency.
Baseline Window: The long-term period used to establish the "normal" mean of volatility frequency.
Z-Score Sensitivity: Determines the threshold for identifying statistically significant volatility spikes.
🔹 Visuals
Show ATR Bands: Toggles the visibility of the ATR-based levels on the chart.
Bands Mode: Determines if bands are offset from a central basis (SMA/EMA) or from the bar's High/Low.
Regime Box Options: Toggles background boxes for Quiet, Normal, or High Volatility regimes.
🔹 Dashboard
Dashboard: Enables or disables the on-screen information table.
Position/Size: Controls the location and scale of the dashboard UI.
Indicator

Cloud Institutional Bands | Rainbow MatrixGENERAL OVERVIEW
The Cloud Institutional Bands is a statistical price-envelope indicator that maps institutional accumulation and exhaustion zones using deviation channels built on a Log-Normal regression anchored to a dynamic VWAP. Instead of treating the chart as a series of fixed support and resistance levels, the indicator continuously classifies the current price into one of four statistical regimes — and colors the chart accordingly.
The main goal of this indicator is to give traders a clean, automatic read on how stretched price is relative to its own statistical baseline — without having to manually identify trend strength, overextension, or exhaustion zones bar by bar. Every band you see on the chart represents a specific deviation from the volume-weighted regression base, and every color tells you which statistical zone is currently active.
It plots four pairs of deviation bands (eight bands in total: four above the regression base and four below), each calibrated to a Fibonacci-proportioned sigma multiplier. Combined with the dynamic VWAP and the Zone Info Panel, the indicator gives a complete read on directional bias, statistical position, and proximity to extreme zones — all from a single visual.
This indicator was developed for traders who already understand band-based indicators (Bollinger, Keltner, Donchian) and want a statistically corrected envelope that handles asymmetric price distributions properly, particularly during volatility expansion phases.
WHAT IS THE THEORY BEHIND THIS INDICATOR?
Most envelope indicators on PulseWire — Bollinger Bands, Keltner Channels, and their derivatives — share a common architectural choice: they apply standard deviation directly to the price series, using a Simple Moving Average (or similar linear estimator) as the central tendency. This treats price as a symmetric variable.
The problem: price is not symmetric. Price has a hard floor at zero and unbounded upside. Its returns follow a log-normal distribution, not a normal one. Applying linear statistics to asymmetric data introduces a systematic bias — bands that are too wide on one side and too narrow on the other, especially during volatility expansion. This bias becomes most visible at exactly the moments traders need accuracy most: trend climaxes, blow-off tops, capitulation lows.
This indicator addresses that bias by performing the regression in log space. The price series is first transformed via the natural logarithm, the linear regression is fitted on the log-prices, the standard deviation of the residuals is computed, and the resulting deviation bands are exponentiated back to price space. The math is standard — what makes it useful is applying it to a series that actually follows the underlying distribution it assumes.
Why traders use it: each band represents a probabilistic boundary. When price sits between the regression base and the first deviation band, it is statistically inside its normal operating range — equilibrium. When price crosses into the second band, the move has crossed into directional territory. The third band marks the threshold beyond which most of the impulse has already happened — exhaustion. The fourth band marks the tail of the distribution — a Black Swan event in Taleb's sense — where less than 1% of candles reach under normal conditions.
The dynamic VWAP overlay adds a second dimension: directional bias. While the regression bands tell you how stretched price is, the VWAP tells you whether the volume-weighted average favors buyers or sellers. Together they give a two-axis read on every bar: directional bias plus statistical zone.
CLOUD INSTITUTIONAL BANDS FEATURES
The indicator includes 6 main features:
Log-Normal Regression Engine
Fibonacci-Proportioned Deviation Bands
Dynamic VWAP with Glow
Rainbow Zone Fills
Zone Info Panel (HUD)
Black Swan Alerts
Multilingual interface and full customization across all visual layers.
LOG-NORMAL REGRESSION ENGINE
🔹 What It Does
The core of the indicator. Every bar, the engine performs four operations:
◇ Transforms the price series (hlc3) into log space via the natural logarithm.
◇ Fits a linear regression through the log-prices over the configured lookback window.
◇ Computes the standard deviation of the residuals — the gap between actual log-price and the regression line.
◇ Exponentiates the regression line and the deviation bands back to price space.
The result is a statistical baseline (the Base Line) and four pairs of deviation bands that respect the asymmetric nature of price distribution.
🔹 Method
The regression base is calculated using a standard linear regression on the log-price series. This is the classic least-squares fit — every bar in the lookback window contributes equally. The result is a baseline that represents where the market would be statistically if it were tracking its own trend perfectly.
🔹 Period
The Band Period input sets the rolling lookback window for both the regression and the standard deviation calculation. Larger values produce smoother, wider bands that respond slowly to new price action. Smaller values produce tighter, more reactive bands that follow recent volatility more closely. The default is 200 bars, calibrated for the 223-minute Bitcoin chart. For other instruments and timeframes, the period should be adjusted to match the natural cycle length of the asset.
FIBONACCI-PROPORTIONED DEVIATION BANDS
🔹 The Four Sigma Multipliers
Instead of plotting bands at integer multiples of the standard deviation (1σ, 2σ, 3σ), this indicator uses Fibonacci-inspired proportions:
◇ ±1.50σ — Breathing Zone (yellow above, green below)
◇ ±1.85σ — Alert Zone (orange above, teal below)
◇ ±2.75σ — Exhaustion Zone (red above, blue below)
◇ ±3.85σ — Black Swan Zone (purple above, aqua below)
Each multiplier corresponds to a different probabilistic regime:
◇ Breathing Zone: equilibrium. Most candles operate inside this range. Low conviction, no signal.
◇ Alert Zone: directional move in progress. Trend is asserting itself. Watch for follow-through.
◇ Exhaustion Zone: most of the impulse has already happened. Pullback probability rising. New entries in trend direction have unfavorable risk-reward.
◇ Black Swan Zone: statistical extreme. Less than 1% of candles reach this band under normal market conditions. Elevated probability of either mean reversion or volatility regime change.
snapshot
DYNAMIC VWAP WITH GLOW
🔹 What It Does
A Volume-Weighted Moving Average is plotted alongside the regression bands, using the same lookback window. The VWAP renders in teal when price trades above it (bullish bias) and in red when price trades below (bearish bias).
🔹 Glow Effect
The VWAP line carries a proximity-based glow: the closer price gets to the VWAP, the more intense the glow becomes. This visual cue prepares the eye for proximity to a high-liquidity zone, where reactions often occur.
🔹 Why It Matters
The regression bands tell you how stretched price is. The VWAP tells you what bias the volume-weighted average favors. Together they give a complete read on every bar:
◇ Price above VWAP and inside Breathing Zone: healthy uptrend.
◇ Price above VWAP and at +2.75σ: uptrend in exhaustion.
◇ Price below VWAP and at -3.85σ: capitulation or imminent reversal.
RAINBOW ZONE FILLS
🔹 What They Show
The space between adjacent deviation bands is filled with a semi-transparent color matching the zone palette. This makes the current zone immediately visible without having to read the Z-Score number — the chart background tells you the regime at a glance.
🔹 Toggleable
Fills can be turned off for traders who prefer to see only the band lines themselves. The lines alone (with the Base Line and VWAP) still provide all the information; the fills are a visual aid to make zone identification faster.
ZONE INFO PANEL (HUD)
🔹 What It Shows
A compact corner panel reports three live values:
◇ ZONE — the name of the currently active zone (e.g., "ALERT — HIGH RISK ZONE", "EQUILIBRIUM — BASE LINE")
◇ DEV. — the current Z-Score, expressed in standard deviations (e.g., "+2.44σ")
◇ VWAP — the current position relative to the dynamic VWAP ("VWAP: BUY ZONE" or "VWAP: SELL ZONE")
🔹 Why It Helps
The HUD removes the need to interpret colors and band positions visually. It tells you in plain language where price is, how stretched it is, and which direction the volume-weighted bias is leaning. Useful for live trading where decisions need to happen quickly.
🔹 Customization
The HUD can be positioned in any of the four chart corners and rendered in any of five font sizes. The display language is controlled by the System Language input.
snapshot
BLACK SWAN ALERTS
🔹 What Triggers
The indicator fires an alert when price touches the ±3.85σ band — the Black Swan zone. Two separate alerts are available: one for the upper extreme (potential capitulation top), one for the lower extreme (potential capitulation bottom).
🔹 How They Fire
Alerts are gated by barstate.isconfirmed, which means they only trigger on the close of the bar that touched the band — not intra-bar. This prevents false signals from wicks that get rejected before the bar closes.
🔹 Frequency
Each alert uses alert.freq_once_per_bar, ensuring no duplicate firings on the same candle.
MULTILINGUAL INTERFACE
The indicator supports five languages for the HUD display and alert messages: English (default), Português, Español, Русский, and 中文 (Chinese). Code, comments, and configuration tooltips remain in English regardless of the selected language.
For reference, the English text of all multilingual UI strings used in the HUD and alerts:
◇ BLACK SWAN — EXTREME HIGH / BLACK SWAN — EXTREME LOW
◇ BUYING EXHAUSTION / SELLING EXHAUSTION
◇ ALERT — HIGH RISK ZONE / ALERT — LOW RISK ZONE
◇ INSTITUTIONAL BREATHING ZONE
◇ EQUILIBRIUM — BASE LINE
◇ VWAP: BUY ZONE / VWAP: SELL ZONE
◇ ZONE: / DEV.: / VWAP:
◇ Black Swan Alert High: "Price at 4th standard deviation — EXTREME HIGH. High probability of severe reversal."
◇ Black Swan Alert Low: "Price at 4th standard deviation — EXTREME LOW. High probability of explosive reversal."
HOW TO USE
This indicator is not a signal generator. It is a state classifier: it tells you which statistical zone the current price is in, and how that zone relates to the volume-weighted bias.
🔹 Reading the Chart
◇ Identify the current Z-Score from the Zone Info Panel.
◇ Note the active zone color in the panel and on the chart fills.
◇ Combine with VWAP position for directional context.
🔹 Tactical Reading
◇ Z-Score between -1.50 and +1.50: market is in equilibrium. Mean-reversion strategies have higher edge than breakout strategies.
◇ Z-Score crossing ±1.85: breakout in progress. Trend-following entries have higher edge than fade entries.
◇ Z-Score at ±2.75: trend is mature. Trailing stops should be tightened. New entries in trend direction have unfavorable risk-reward.
◇ Z-Score touching ±3.85: Black Swan touch. Statistically the tail. Mean reversion has elevated probability — but Black Swans can also indicate regime change, where volatility expands and a new range opens. Use the Black Swan Alert to catch these events.
🔹 Multi-Timeframe Reading
◇ On lower timeframes (1m, 5m, 15m), the bands react to micro-trends and serve as dynamic support and resistance.
◇ On higher timeframes (1h, 4h, daily), the bands map macro regime — the outer bands at higher timeframes represent multi-day exhaustion zones.
INPUTS EXPLAINED
🔹 System Language
Display language for the HUD and alert messages. Options: English (default), Português, Español, Русский, 中文 (Chinese).
🔹 Band Period (bars)
Rolling lookback for the Log-Normal regression and the VWAP. Range 50–500, default 200. Higher values produce smoother, wider bands; lower values produce tighter, more reactive bands.
🔹 Show Thermal Zone Fills
Toggle for the semi-transparent rainbow fills between adjacent bands.
🔹 Show Black Swan Glow (4th Std Dev)
Toggle for the glow effect on the outermost ±3.85σ bands. The glow intensifies as price approaches the band.
🔹 Show Base Line (Gravitational Center)
Toggle for the regression central line — the statistical baseline around which the bands are computed.
🔹 Show Dynamic VWAP (Macro)
Toggle for the volume-weighted reference line with proximity glow.
🔹 Show Zone Info Panel
Toggle for the corner HUD reporting current zone, Z-Score, and VWAP position.
🔹 Panel Position
Position of the HUD on the chart. Four corners available: Top Right (default), Top Left, Bottom Right, Bottom Left.
🔹 Font Size
HUD font size. Options: Tiny (default), Small, Normal, Large, Huge.
🔹 Black Swan Alert (4th Std Dev touch)
Toggle for the alerts that fire when price touches the ±3.85σ band. Two alerts: one for the upper extreme, one for the lower extreme.
IMPORTANT NOTES
The Cloud Institutional Bands works on any timeframe. The Band Period default of 200 is calibrated for the 223-minute chart and may need adjustment for other timeframes — a good rule of thumb is to set the period to approximately one full daily cycle for the chart timeframe (e.g., 288 bars for 5-minute charts, 96 bars for 15-minute charts).
The indicator works best on instruments with reliable volume data: crypto perpetual contracts, large-cap equities, major forex pairs. On low-volume instruments, the dynamic VWAP component becomes less reliable, though the regression bands continue to function correctly.
Alerts fire once per confirmed bar. Historical bars never repaint after they close. The live bar updates intra-bar as expected for a real-time indicator.
The four sigma multipliers (1.50, 1.85, 2.75, 3.85) are intentionally non-standard. They are Fibonacci-inspired proportions, not arbitrary choices, and they map to four behavioral regimes derived from observation rather than to integer statistical thresholds.
Pine Script v6. Open-source under Mozilla Public License 2.0.
UNIQUENESS
The Cloud Institutional Bands is unique in three ways. First, it performs the regression in log space, addressing the asymmetric nature of price distribution that linear estimators (such as the Simple Moving Average used by Bollinger Bands) fail to account for. This produces bands that behave correctly during volatility expansion phases, where standard envelopes show systematic bias. Second, it uses Fibonacci-proportioned sigma multipliers (1.50, 1.85, 2.75, 3.85) instead of integer steps, mapping the bands to four behavioral regimes — breathing, alert, exhaustion, and Black Swan — that correspond to observable phases of institutional order flow rather than to arbitrary thresholds. Third, it integrates a dynamic VWAP overlay with proximity-based glow alongside the regression bands, giving traders a two-axis read on every bar: how stretched price is statistically, and which direction the volume-weighted bias favors. The combination of log-space regression, Fibonacci sigma calibration, and integrated VWAP context produces a statistical envelope that behaves differently from standard band-based indicators, particularly at trend climaxes and capitulation events where standard envelopes are least reliable. Indicator

VWAP Intraday, Weekly, MonthlyA clean, professional implementation of three anchored VWAPs — Intraday, Weekly and Monthly — with standard deviation bands, cloud fills and candle coloring. Built for futures, stocks and forex traders who use VWAP as a core part of their analysis.
━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IS VWAP?
━━━━━━━━━━━━━━━━━━━━━━━━
Volume Weighted Average Price is the most widely referenced intraday benchmark used by institutional traders, market makers and algorithms. It represents the average price at which all volume has transacted over a given period. Price above VWAP is generally considered bullish, price below is bearish. The standard deviation bands show statistical distance from fair value — the further price extends from VWAP, the more extended and mean-reversion prone the move becomes.
━━━━━━━━━━━━━━━━━━━━━━━━
FEATURES
━━━━━━━━━━━━━━━━━━━━━━━━
▶ Intraday VWAP — resets each session. Band 1 and Band 2 with optional cloud fill.
▶ Weekly VWAP — resets each week. Band 1 and Band 2 with optional cloud fill.
▶ Monthly VWAP — resets each month, correctly anchored to the first session of the calendar month. Band 1 and Band 2 with optional cloud fill.
▶ Candle Coloring — green when price closes above Intraday Band 1, red when below. Neutral inside the bands.
▶ Multiple Anchors — Globex (18:00 ET, best for NQ/ES futures), Midnight (stocks and forex), Market Open (9:30 ET RTH), London session (03:00 ET) and Asia session.
▶ Source Selection — HLC3 (typical price, institutional standard), Close, HL2 or OHLC4.
━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━
Futures traders (NQ, ES, MNQ): use Globex anchor. This anchors VWAP to the 18:00 ET session open, matching institutional platforms like Sierra Chart and Bookmap.
Stock traders: use Midnight or Market Open anchor depending on your preference.
Forex traders: use Midnight anchor for a standard daily reset.
Band 1 (1.0 std dev) is the primary level. Price rejecting from Band 1 and reversing toward VWAP is one of the most reliable setups in VWAP trading. Price closing outside Band 1 signals a strong directional move. Band 2 (2.0 std dev) marks extended moves where mean reversion is statistically more likely.
Weekly and Monthly VWAPs act as macro support and resistance levels. Price above both is a bullish macro structure. Price between them shows a transitional zone. Price below both is bearish.
━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS
━━━━━━━━━━━━━━━━━━━━━━━━
All colors, opacity and line thickness are adjustable by clicking each color swatch — the popup includes color, opacity, thickness and line style in one place.
Each band's standard deviation multiplier is adjustable. The default 1.0 and 2.0 are the most commonly used values but some traders prefer 1.5 / 2.5 depending on their instrument and style.
━━━━━━━━━━━━━━━━━━━━━━━━
NOTES
━━━━━━━━━━━━━━━━━━━━━━━━
- Works on any timeframe and any instrument with volume data.
- For accurate Globex VWAP on NQ/ES, ensure your chart data includes the overnight session.
- Monthly VWAP is anchored to the first Globex session of each calendar month, not midnight of the 1st — this matches the institutional convention for futures. Indicator

Volatility Compression Release Map [AGPro Series]Volatility Compression Release Map
🧠 Core Idea
Is the market quietly building expansion energy, or has the release already failed back into the shelf?
📌 Overview / What it does
Volatility Compression Release Map is a volatility regime and compression shelf visualization tool built to identify quiet range contraction, release attempts, fake releases, and expansion quality.
The script maps a projected compression shelf when volatility rank and range size contract together. It then tracks whether price releases away from that shelf, returns back inside it, or continues to hold expansion pressure.
This script does not predict future price direction, automate trades, or produce guaranteed buy/sell signals. It is designed as a structured chart-reading layer for volatility compression, release quality, and contextual risk.
🎯 Purpose & Design Philosophy
The script was built for traders who care about the transition between quiet markets and expansion phases.
Many charts look calm before movement starts. The challenge is not simply seeing a tight range, but understanding whether that range is still building energy, whether the release is active, or whether the move has already failed back into the shelf.
The design philosophy is simple: reduce volatility noise into a readable map, preserve the important shelf story, and make the current regime understandable at first glance.
⚡ Why This Script Is Different
Most tools focus on breakout arrows, squeeze dots, or raw volatility bands.
This script does NOT treat every contraction as an immediate trade signal and does NOT frame every expansion candle as confirmation.
Instead, it builds a full compression-to-release map: the shelf, volatility rank, range size, release direction, fake-release risk, quality score, right-side state labels, and a compact AG Pro panel all work together.
⚙️ Methodology
1. Context Detection
The script evaluates ATR rank, recent range size, and whether price is still inside a quiet shelf.
2. Shelf Mapping
When compression conditions align, the active range is stored and projected forward as a compression shelf.
3. Release Evaluation
The script checks whether price leaves the shelf with enough candle body expansion to qualify as a release attempt.
4. Failure Tracking
If price quickly returns into the shelf during the fake-release window, the state changes to fake release.
5. Visual Output
The chart displays a projected shelf, dotted rails, a centered shelf-quality label, event labels, right-side state tags, and a compact AG Pro panel.
🗺️ How to Read the Chart
Zones represent the active compression shelf.
The shelf label shows the current shelf quality score using a compact `SHELF | Q` format.
Green/teal visual states generally indicate constructive expansion or defended release behavior.
Pink visual states highlight failed release or adverse volatility behavior.
Indigo/accent visuals represent compression and neutral shelf structure.
The panel summarizes compression state, release direction, volatility rank, range size, quality score, shelf range, and next context.
🚦 Signals & States
• COMPRESSION BUILD → a quiet shelf is forming and volatility is compressed
• RELEASE ACTIVE → price has moved away from the shelf with sufficient body expansion
• FAKE RELEASE → price returned back into the shelf after a release attempt
• SHELF WATCH → a shelf exists but the market has not produced a clean active release
• WAIT COMPRESSION → no valid compression shelf is currently active
🔔 Alerts Logic
Compression Build alert triggers when a new volatility compression shelf is detected.
Compression Release alert triggers when price releases from the active shelf with enough candle body expansion.
Fake Release alert triggers when price returns back into the shelf within the defined fake-release window.
Alerts are attention markers. They are not trade instructions.
🧩 Confluence Logic
The context becomes stronger when low volatility rank, compact range size, a visible shelf, and a strong release candle align.
The context becomes weaker when price fails back into the shelf shortly after release.
📊 When to Use
• Before potential expansion phases
• During quiet range compression
• Around breakout preparation zones
• When evaluating whether a move is expanding or failing
• On liquid markets where volatility structure is meaningful
⚠️ When NOT to Use
• Extremely illiquid symbols
• Very noisy low-timeframe charts
• News shock environments where volatility structure changes suddenly
• Markets with unreliable volume or large gaps
• Situations where a single indicator is being used without broader context
🎛️ Key Inputs
• Compression Lookback → controls the range window used to detect the shelf
• Volatility Rank Lookback → controls how ATR rank is measured
• Compression Rank Max → changes how selective compression detection is
• Range ATR Max → limits how wide a valid shelf can be
• Release Body ATR Min → defines how strong a release candle must be
• Fake Release Window → controls how quickly a release failure is detected
• Visual settings → control shelf projection, labels, panel, theme, and font sizes
🖥️ Interface & Visual Design
The interface is designed to look clean, premium, and publication-ready.
The shelf is the main visual anchor. Event labels are intentionally limited so the chart does not become crowded.
The AG Pro panel uses a merged blue header row and summarizes the state without covering the main chart story.
🧪 Practical Usage Workflow
1. Read the panel state.
2. Locate the active compression shelf.
3. Check whether price is inside, releasing, or failing back into the shelf.
4. Compare the quality score with the visual structure.
5. Use broader market context before making any decision.
🔍 Interpretation Guidelines
Compression is not direction.
A shelf shows where volatility has contracted.
A release shows that price moved away from the shelf with expansion pressure.
A fake release shows that the market rejected the expansion and returned to the compression area.
The strongest interpretations come from combining the shelf, state, quality score, and surrounding market structure.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not guarantee profitable trades.
It does not replace risk management or independent analysis.
⚠️ Limitations & Transparency
Timeframe differences can change how compression and release behavior appears.
High volatility news events may reduce the usefulness of shelf-based interpretation.
Low-liquidity markets can produce misleading shelves and sudden false releases.
The script is rule-based and should always be interpreted within broader market context.
🧠 Market Context Notes
Volatility often contracts before expansion, but compression alone does not define direction.
The shelf helps identify where the market has stored recent range energy.
Release quality helps separate stronger expansion attempts from weak movement outside the range.
🧾 Use Case Examples
When price remains inside a shelf while volatility rank is low, the market may still be building energy.
When price leaves the shelf with strong body expansion, the script marks release behavior.
When price returns into the shelf quickly, the script flags a fake-release context.
🧱 System Philosophy
AGPro Series tools are built to turn complex market behavior into structured visual maps.
The goal is not to simplify markets into certainty, but to make important context easier to read.
🔐 Non-Promise Statement
No script can know the future.
No signal is certain.
No visual state should be treated as a guaranteed outcome.
📉 Risk Disclosure
Trading involves risk.
Markets can move unexpectedly.
Users are responsible for their own decisions, risk management, and trade execution.
This script does not provide financial advice.
📚 Educational Note
This tool is intended for educational and analytical use. It can help traders study volatility compression, release behavior, fake-release risk, and shelf-based market context.
Indicator

Iterative Epanechnikov ChannelThe Iterative Epanechnikov Channel is a kernel-based smoothing and state estimation framework that applies an Epanechnikov kernel regression to price data, combined with a rolling standard deviation envelope to construct adaptive dynamic channel boundaries.
Unlike kernels with infinite support that allow distant historical observations to influence the estimate, the Epanechnikov kernel uses a compact weighting structure that strictly limits influence to a finite window. This ensures that only relevant, recent price information contributes to the regression, resulting in a more localized and structurally responsive estimate of price behavior.
The resulting channel is structurally responsive while remaining statistically efficient, making it particularly effective for tracking short-to-intermediate trend development, identifying localized overextension, and adapting quickly to evolving conditions.
Its primary utility is as a state estimation and structural tracking tool for price behavior, rather than a persistence-weighted regime model.
TRADING USES
The Epanechnikov Channel is best interpreted as a localized structural filter; within a multi-model framework, it captures the immediate structural state of price, helping distinguish early transitions, active trends, and short-term disequilibrium relative to slower, memory-weighted estimators.
Trend Detection
The channel basis line (Epanechnikov smoothed price) provides a responsive representation of underlying market direction. Sustained movement above or below the basis reflects directional continuation, while rapid shifts in the basis can indicate emerging changes in trend.
Structural Responsiveness
Due to the compact support of the Epanechnikov kernel, only recent price data contributes to the estimate. This produces sharper turning points and faster adaptation to new information, allowing the channel to respond efficiently to changes in market structure.
Mean Reversion Context
Because the estimator is more localized, price interacts with the channel boundaries more frequently. These interactions represent short-term deviations from the estimated state:
- Upper band: localized overextension
- Lower band: localized underextension
This makes the channel well-suited for mean reversion frameworks and volatility-based entry timing.
State Estimation
The channel functions as a continuous estimator of market state:
- The basis represents the inferred local price state
- The envelope represents dynamic volatility dispersion around that state
Compared to heavy-tailed kernels, the Epanechnikov-based state estimate is more sensitive to current conditions and less influenced by distant history, providing a clearer view of present market structure.
Volatility & Risk Context
The rolling standard deviation envelope expands and contracts based on realized volatility, providing a contextual risk framework. Wider channels indicate increased uncertainty and dispersion, while tighter channels indicate compression and lower variance conditions.
THEORY
The Epanechnikov kernel is a quadratic, compact-support kernel used in Nadaraya–Watson nonparametric regression, introduced by V. A. Epanechnikov (1969, Non-Parametric Estimation of a Multivariate Probability Density, Theory of Probability & Its Applications) as the mean squared error–optimal bounded kernel; in this implementation it is applied causally (non-repainting) and centered at the current bar using only historical data, with the original startAtBar offset removed to maintain proper kernel alignment with the estimation point.
It is defined as:
K(u) = 3/4 (1 − u²), for |u| ≤ 1
Where:
---> u represents normalized distance from the current observation
---> ℓ (lookback) defines the window over which the kernel operates
Unlike Gaussian kernels, which apply exponentially decaying weights over an infinite range, the Epanechnikov kernel assigns zero weight to all observations outside its finite support. This produces a strictly localized estimator that is both computationally efficient and statistically optimal in a mean squared error sense among bounded kernels.
Because the kernel is centered on the current observation and evaluated using only past data, the implementation remains causal and non-repainting while preserving the essential structure of kernel regression.
The rolling standard deviation complements this by measuring dispersion around the estimated state, forming a volatility-adaptive envelope. Rather than acting as a strict statistical confidence interval, it provides a dynamic representation of market expansion and contraction. The Epanechnikov kernel is a localized smoothing estimator rather than a structural similarity model, thus dispersion is defined using price-based volatility rather than kernel-weighted variance, providing a stable and interpretable envelope consistent with its role as a reactive state estimator.
The iterative implementation processes data sequentially (bar-by-bar), ensuring computational efficiency and making the indicator suitable for real-time use without repainting.
CALIBRATION
Calibration determines the balance between responsiveness, noise, and structural clarity.
Length (Lookback)
- Lower (8–16): More responsive, increased sensitivity to short-term structure
- Medium (20–40): Balanced for swing trading and intermediate regimes
- Higher (50–64+): Smoother output, reduced noise, slower response to turning points
Smoothing Mode (Single vs Double Pass)
Controls the tradeoff between responsiveness and stability:
Single Pass:
- Pure Epanechnikov regression
- Maximum responsiveness
- Faster detection of structural changes
- Increased sensitivity to noise
Double Pass:
- Applies the kernel regression twice
- Reduces variance and smooths fluctuations
- Produces cleaner structural output
- Introduces additional lag
This parameter allows users to tune the indicator based on whether early signal detection or stability is preferred.
MARKET USAGE
Stock, Forex, Crypto, Commodities, and Indices. Indicator

Anchored VWAP Risk Ladder [AGPro Series]Anchored VWAP Risk Ladder
🧠 Core Idea
After an important market event, is price trading close to fair value or becoming extended relative to the anchored VWAP?
📌 Overview / What it does
Anchored VWAP Risk Ladder builds a volume-weighted average price from a selected anchor event and turns the distance from that anchor into a structured risk ladder.
The script displays anchored VWAP, volume-weighted deviation bands, right-side ladder tags, reclaim and lose labels, extension context, and a compact AG Pro panel with distance, score, risk ladder, and action state.
It does not predict price direction, automate trades, or claim that anchored VWAP will hold as support or resistance. It organizes event-based volume-weighted context into a readable chart framework.
🎯 Purpose & Design Philosophy
Anchored VWAP is often useful after a meaningful event, but raw AVWAP alone can be difficult to interpret without context.
This script was built to answer a practical question: how far is price from the anchored value area, and is that distance becoming useful, balanced, or risky?
The design supports traders who think in terms of anchored fair value, risk distance, reclaim behavior, and extension zones.
⚡ Why This Script Is Different
Most VWAP tools show a line and leave interpretation fully manual.
This script does NOT stop at plotting anchored VWAP.
Instead, it builds a complete risk ladder around the anchor, adds deviation context, scores reclaim or lose behavior, and summarizes the current state in a clean dashboard.
⚙️ Methodology
1. Anchor Detection
The script can anchor from manual time, high-volume events, swing pivots, session open, week open, or month open.
2. AVWAP Calculation
From the active anchor, the script accumulates volume-weighted price and volume-weighted variance to calculate anchored VWAP and deviation bands.
3. Risk Ladder Mapping
Distance from anchored VWAP is measured in ATR and deviation terms to classify whether price is near value, inside Band 1, inside Band 2, or extended.
4. Visual Output
The script plots AVWAP, upper/lower deviation bands, ladder fills, event labels, right-side tags, bar state color, and a dashboard.
🗺️ How to Read the Chart
The AVWAP rail represents the volume-weighted average price from the active anchor.
Deviation bands represent the ladder around anchored value.
Labels mark anchor events, AVWAP reclaim events, AVWAP lose events, and optional extension-risk conditions.
The panel shows:
• Anchor → current anchor type and age
• Distance → price distance from AVWAP in ATR
• Risk Ladder → current ladder zone and risk score
• Score → current context score and direction state
• Action → READY / MONITOR / WAIT / BLOCKED
🚦 Signals & States
• Anchor Locked → a new event anchor has been selected
• Ready Reclaim → price has reclaimed anchored VWAP with enough context score
• Ready Lose → price has lost anchored VWAP with enough context score
• Near AVWAP → price is close to anchored value
• Band 1 / Band 2 → price is moving away from anchored value
• Extended → distance from AVWAP is elevated
🔔 Alerts Logic
Alerts can trigger when a new anchor is locked, when price reclaims AVWAP, when price loses AVWAP, or when extension-risk conditions appear.
Alerts are attention markers only. They do not represent trade instructions or guaranteed outcomes.
🧩 Confluence Logic
The context becomes stronger when anchored VWAP reclaim or lose behavior aligns with relative volume, acceptable distance, and a clear ladder state.
The risk ladder helps separate balanced conditions from extension conditions.
📊 When to Use
• After high-volume market events
• Around earnings, news, breakout, or liquidation-style candles
• During trend continuation pullbacks
• When studying institutional average price context
• On liquid symbols with meaningful volume data
⚠️ When NOT to Use
• Very low-liquidity symbols
• Markets with unreliable or synthetic volume
• Extremely choppy conditions where anchors reset too often
• Situations where the selected anchor is not meaningful
• When using AVWAP as a standalone trading signal
🎛️ Key Inputs
• Anchor Mode → controls how AVWAP is anchored
• Manual Anchor Time → user-defined anchor timestamp
• High Volume Anchor Threshold → controls automatic high-volume anchors
• Deviation Band 1 / 2 → controls ladder width
• Extension Risk ATR → controls when distance becomes elevated
• Minimum Ready Score → controls reclaim or lose strictness
• Visual Settings → control bands, labels, tags, panel, and bar colors
🖥️ Interface & Visual Design
The interface is built for fast visual hierarchy.
AVWAP is the central reference, deviation bands define the risk ladder, right-side tags make the ladder readable, and the panel summarizes state without forcing the user to inspect every line manually.
🧪 Practical Usage Workflow
1. Choose the anchor mode
2. Read the active anchor and distance in the panel
3. Check whether price is near AVWAP or extended
4. Watch reclaim or lose labels around AVWAP
5. Use broader structure and risk context before making any decision
🔍 Interpretation Guidelines
Price near AVWAP often represents a balanced value area relative to the anchor.
Price far from AVWAP may represent stronger trend behavior, but it may also carry extension risk.
READY states mark meaningful reclaim or lose behavior, not certainty.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not an automated trading system.
It does not guarantee support, resistance, continuation, reversal, or profit.
It is not financial advice.
⚠️ Limitations & Transparency
Anchored VWAP quality depends heavily on anchor selection.
Different timeframes may produce different anchor timing and visual structure.
Volume data quality may vary between symbols, brokers, and exchanges.
Deviation bands are statistical references, not fixed market boundaries.
🧠 Market Context Notes
Anchored VWAP works best when the anchor represents a meaningful market event.
High-volume displacement, swing pivots, session opens, weekly opens, and monthly opens may each tell a different story.
The user should choose the anchor mode that best fits the market question.
🧾 Use Case Examples
When a high-volume candle creates a new anchor, the script tracks whether price remains near the anchored value area or begins to extend away from it.
When price reclaims AVWAP with enough score, the script marks a READY reclaim context.
When price loses AVWAP with enough score, the script marks a READY lose context.
🧱 System Philosophy
AGPro Series tools are built as decision-support engines.
The purpose is to structure market context into readable zones, states, scores, and risk references without turning analysis into blind signal-following.
🔐 Non-Promise Statement
No script can provide certainty.
No AVWAP level guarantees a reaction.
No signal guarantees continuation, reversal, or profit.
📉 Risk Disclosure
Trading involves risk.
Users are responsible for their own analysis, decisions, risk management, and execution.
This script is for educational and analytical purposes only and does not provide financial advice.
📚 Educational Note
Use this tool to study how anchored value, volume-weighted distance, deviation bands, reclaim behavior, and extension risk interact across different market conditions.
Indicator

UCY-VWATR (live)═══════════════════════════════════════
UCY-VWATR — Volume Weighted ATR Bands with Supertrend
═══════════════════════════════════════
▸ OVERVIEW
A volatility-band indicator that combines a Volume Weighted
Moving Average (VWMA) center line with ATR-based deviation
bands and a Supertrend overlay for trend direction.
The indicator visualizes how far price extends from its
volume-weighted mean in units of Average True Range, while
the Supertrend acts as a dynamic trend filter.
═══════════════════════════════════════
▸ HOW IT WORKS
- VWMA forms the central reference band (default: 20 period),
giving more weight to bars with higher volume than a standard
moving average.
- ATR (default: 14 period) generates three pairs of upper and
lower deviation bands at ±1, ±2, and ±3 multiples — mapping
volatility expansion zones around the mean.
- Supertrend (default: 10 period, factor 3.0) determines the
prevailing trend direction. Green = uptrend, Red = downtrend.
- Body-middle (the midpoint of each candle's open and close)
is compared against each band. When the body crosses beyond
a band in the direction of the active trend, a colored fill
appears — darker fills indicate stronger displacement from
the mean.
═══════════════════════════════════════
▸ HOW TO READ THE FILLS
In an UPTREND (green Supertrend):
- Body above VWMA → light green fill (mild momentum)
- Body above +1 ATR → medium green
- Body above +2 ATR → strong green
- Body above +3 ATR → extreme green (potential exhaustion)
In a DOWNTREND (red Supertrend):
- Body below VWMA → light red fill
- Body below -1 ATR → medium red
- Body below -2 ATR → strong red
- Body below -3 ATR → extreme red (potential exhaustion)
The intensity of the fill provides an at-a-glance read of
how stretched price is relative to its volume-weighted mean.
═══════════════════════════════════════
▸ POTENTIAL USE CASES
- Trend-following: Enter in the direction of the Supertrend
when price pulls back to VWMA or ±1 ATR band.
- Mean reversion: Look for exhaustion signals when price
reaches ±3 ATR bands against the prevailing trend.
- Breakout confirmation: A break and hold above/below ±1 ATR
in the direction of a fresh Supertrend flip can act as
trend confirmation.
- Volatility context: Wider band spacing signals high
volatility regimes; narrow bands indicate compression.
═══════════════════════════════════════
▸ SETTINGS
- VWMA Length: 20 (medium-term balance)
- ATR Length: 14 (classic Wilder period)
- ATR Multipliers: 1.0 / 2.0 / 3.0
- Supertrend ATR Length: 10
- Supertrend Factor: 3.0
All parameters are user-adjustable to fit different timeframes
and instruments. Lower multipliers suit ranging markets;
higher multipliers suit trending or volatile assets.
═══════════════════════════════════════
▸ NOTES
- Works on all timeframes and instruments (stocks, futures,
forex, crypto).
- VWMA requires volume data — best results on instruments
with reliable volume feeds (avoid forex spot pairs without
aggregated volume).
- Designed as a visual decision-support tool, not a
standalone signal generator.
═══════════════════════════════════════
⚠️ DISCLAIMER
This indicator is published for educational and analytical
purposes only. It does not constitute financial advice or a
recommendation to buy or sell any asset. All trading decisions
and their outcomes are the sole responsibility of the user.
Past performance does not guarantee future results. Indicator

Lumina Trend Channels & Bands [Pineify]Pineify - Lumina Trend Channels & Bands
Lumina Trend Channels & Bands is an overlay indicator that builds a volatility-adjusted trend channel around a Volume-Weighted Moving Average (VWMA). VWMA forms the baseline, while ATR bands define how far price must move before trend state changes.
Key Features
VWMA midpoint weighted toward higher-volume closes.
ATR-based upper and lower bands that adapt to current range.
Persistent trend state while price remains inside the channel.
Triangle markers on the first cross above the upper band or below the lower band.
How It Works
The script calculates a VWMA of close, then adds and subtracts ATR multiplied by the Band Multiplier. A close above the upper band sets bullish state; a close below the lower band sets bearish state. Between the bands, the prior state is preserved.
Compute the VWMA baseline.
Measure ATR and scale it by the Band Multiplier.
Plot upper and lower channel bands around the VWMA, then mark the first crossover or crossunder.
How the Components Work Together
VWMA supplies the directional anchor, while ATR decides how much evidence price needs before a breakout is treated as meaningful. In high volatility the bands widen and demand a stronger close; in quiet conditions the channel tightens and reacts sooner. The cloud fill emphasizes the active side of the trend.
Trading Ideas and Insights
A bullish triangle may indicate continuation after price clears the upper boundary.
A bearish triangle may flag downside momentum when price loses the lower band.
Inside-channel movement is a drift zone. Wait for bar close on live bars; fast reversals can lag, and ranges can whipsaw.
Unique Aspects
Trend state is retained inside the ATR channel, reducing flip-flopping around the VWMA.
The asymmetric cloud emphasizes the active trend side while keeping the opposite band visible.
How to Use
Add the indicator to a clean price chart.
Use the midline and channel to judge bullish, bearish, or undecided territory.
Treat triangles as potential breakout starts, then look for confirmation.
No built-in alert conditions are included in this version.
Customization
Trend Baseline Length (default: 50) - VWMA lookback. Higher values smooth the channel but add lag.
Volatility (ATR) Length (default: 14) - ATR lookback for band width.
Band Multiplier (default: 2.0) - Channel distance. Higher values reduce breakouts; lower values are more sensitive.
Bullish/Bearish Trend Colors - Adjust line, cloud, and marker colors.
Conclusion
Lumina Trend Channels & Bands is for traders who want a clean VWMA trend channel with volatility-aware breakout markers. Use it as context alongside structure, volume, and risk management rather than as a standalone system.
Indicator

ATC Bollinger Band Percentile v1.1What It Is
The ATC Bollinger Band Percentile (ATC BBP) is a dual-layer oscillator that tells you two things simultaneously: where price sits inside its Bollinger envelope right now, and whether the current volatility environment is compressing, neutral, or expanding — measured against real historical data, not a hardcoded threshold.
Most Bollinger Band tools give you the bands. This one gives you the context behind the bands.
________________________________________
Who It's Built For
ATC BBP is designed for retail traders who already use Bollinger Bands or have tried them but found the raw %B reading too noisy or too vague to act on. If you've ever looked at a squeeze setup and wondered whether the bands were actually tight or just tighter than yesterday, this indicator was built to answer that question directly.
It works best for traders who use volatility as a filter before entering trend or breakout trades, want a cleaner and less reactive version of %B, or are building toward understanding normalized, statistically-grounded indicators.
________________________________________
Core Concept
Bollinger Bands place price in a dynamic envelope built from a moving average and standard deviation. The %B reading converts that envelope into a 0–100 scale: 100 means price is sitting on the upper band, 0 means price is on the lower band, and 50 means price is at the midpoint.
That's useful, but the raw reading is noisy and the bands themselves don't tell you whether they're wide or narrow relative to history. A band can look visually compressed on your chart and still be wider than it's been 75% of the time — or vice versa.
ATC BBP solves both problems. It smooths %B with a Hull Moving Average to reduce reactive noise, and it scores the current bandwidth as a percentile against a rolling window of its own history — so you always know objectively whether compression is real.
________________________________________
ATC Upgrades Over Standard %B
HMA Smoothing on %B The raw %B line reacts sharply to every candle. ATC BBP applies a Hull Moving Average to %B before it's plotted, cutting noise while preserving responsiveness. The raw %B is still available in the data window for comparison, but the smoothed version drives everything you see. You can adjust the smoothing length or disable it entirely.
Bandwidth Percentile Scoring This is the core ATC enhancement. Instead of asking "are the bands narrow?", ATC BBP asks "are the bands narrow relative to the last 125 bars of bandwidth history?" The bandwidth percentile is computed by ranking the current bandwidth against every value in the lookback window. A reading of 8% means the bands are tighter right now than they've been on 92% of recent bars. That's a real squeeze signal — not an eyeball call.
Empirical Zone Thresholds with Hysteresis The %B zone boundaries are not hardcoded round numbers. The defaults are set at empirically sensible levels and are fully adjustable. More importantly, every state transition — both the squeeze state and the %B zone — uses a configurable hysteresis band so the indicator doesn't flicker at the edges. Once a state is entered, it takes a meaningful move to exit it.
________________________________________
What's on the Chart
ATC BBP plots in a separate pane below your price chart.
The %B Line The smoothed %B oscillator on a 0–100 scale. The line changes color dynamically to reflect the current zone: green shades when price is in the lower portion of the bands, red shades in the upper portion, neutral grey for mid-range. When price tags or exceeds either band, the color deepens to full intensity. A fill between the %B line and the 50-level midline gives an immediate read on whether price is in the upper or lower half of the range.
Horizontal Reference Lines Five levels mark the key zones: lower extreme (0), lower quartile (20), midline (50), upper quartile (80), and upper extreme (100). Low-opacity colored background shading tints each zone — red above the upper quartile, green below the lower quartile, neutral in the middle.
Squeeze Pressure Bar Along the bottom of the pane, a colored bar marks the current squeeze state. Amber indicates a tight squeeze — bandwidth in the lowest percentile tier. Light yellow indicates a developing or loose squeeze. Blue indicates active volatility expansion. When no state is active, the bar disappears — the absence of color is meaningful. Diamond markers appear at the bar when a squeeze begins and again when expansion starts, so state transitions are never missed on a busy chart.
________________________________________
HUD Breakdown
The corner HUD (top right by default) gives you a live read of both indicator layers without having to inspect chart values:
Volatility — current squeeze state label: Tight Squeeze, Loose Squeeze, Expansion, or Neutral, color-coded to match the pressure bar
BW %-ile — the bandwidth percentile as a number, followed by a 10-block progress bar showing where current bandwidth sits on a visual scale from fully compressed to fully expanded
%B Zone — a text label for where price is in the envelope: Below Lower Band, Lower Quartile, Mid Range, Upper Quartile, or Above Upper Band
%B Reading — the smoothed %B value as a number
The HUD supports dark and light themes and can be repositioned to any corner of the pane.
________________________________________
Logic Layers
The indicator runs two independent state machines, each with its own hysteresis logic.
Squeeze State Machine Four states: Tight Squeeze (bandwidth percentile below the tight threshold), Loose Squeeze (between tight and loose thresholds), Neutral (mid-range bandwidth), and Expansion (above the expansion threshold). State transitions require the bandwidth percentile to move beyond the threshold by the hysteresis amount before the state flips. This prevents toggling at the boundary on marginal readings.
%B Zone State Machine Five zones tracking price location within the envelope: Below Lower Band, Lower Quartile, Mid Range, Upper Quartile, and Above Upper Band. The same hysteresis logic applies — once price enters a zone, it stays classified there until it moves decisively into the next zone.
The two machines run independently. You can be in a tight squeeze while price is in the upper quartile — which is a very different setup than a tight squeeze with price at the midline. The HUD shows both readings simultaneously so you always have the full picture.
________________________________________
Alerts
Seven alert conditions are built in.
BBP: Tight Squeeze Started — fires when the squeeze state first enters the tight tier. Use this to monitor compression setups across instruments before they break.
BBP: Tight Squeeze Released — fires when the tight squeeze breaks. This is the exit from compression, which may precede expansion or resolve back to neutral — both are meaningful.
BBP: Expansion Started — fires when bandwidth percentile crosses above the expansion threshold, confirming that volatility is breaking out of compression.
BBP: Price Above Upper Band — fires when %B reaches or exceeds 100, meaning price has tagged or broken through the upper band.
BBP: Price Below Lower Band — fires when %B reaches or falls below 0, meaning price has tagged or broken through the lower band.
BBP: %B Cross Above 50 — fires when smoothed %B crosses above the midline. Price location bias has shifted to the upper half of the envelope.
BBP: %B Cross Below 50 — fires when smoothed %B crosses below the midline. Price location bias has shifted to the lower half.
________________________________________
How to Trade With It
ATC BBP is a context indicator, not a signal generator. It tells you the volatility environment and price location so you can filter and frame your setups — it does not issue buy or sell signals on its own.
Step 1 — Check the Squeeze State First Before anything else, look at the HUD Volatility row and the pressure bar. Tight Squeeze means the market is coiling. Expansion means it's already moving. Neutral means neither is happening. This single read tells you what kind of market you're in before you look at anything else.
Step 2 — Use Squeeze Context to Filter Breakout Setups A tight squeeze is the setup condition for a potential expansion — it does not tell you which direction. When bandwidth is in the lowest 8–10 percentile of its history, start watching price action for the break, but wait for directional confirmation from your primary setup criteria before trading it. The squeeze tells you energy is building. Your edge tells you which way it breaks.
Step 3 — Use %B to Read Location Within the Setup Once you have a directional bias, %B tells you where price currently sits in the envelope. If you're looking for a long entry and %B is already above 80, price is extended toward the top of the range — it may be better to wait for a pullback toward the 50 midline. If %B is mid-range or lower quartile heading into a long setup, there's more room to run before hitting band resistance.
Step 4 — Look for Squeeze-Plus-Zone Confluence The highest-value reads come when both layers line up. A tight squeeze with %B at mid-range or lower quartile means compression is present and price has room to move higher if the break is bullish — watch for expansion to confirm with %B rising through 50. Expansion with %B crossing above 50 means volatility is moving and location bias is shifting bullish simultaneously — often the clearest confirmation that a breakout is real. Expansion with %B above 100 means price is already through the upper band in an expanding environment — valid in strong trends, a caution flag in range conditions.
Step 5 — Use Alerts for Multi-Instrument Monitoring If you're running ATC BBP across multiple instruments or timeframes, set the Tight Squeeze Started and Expansion Started alerts. These fire the moment a state changes so you're never watching the wrong chart while a setup develops elsewhere.
________________________________________
Settings Reference
Bollinger Bands BB Length (default 30) — period for the moving average and standard deviation calculation. Optimized default for QQQ. Increase for slower, more structural readings; decrease for more reactive readings on faster instruments.
BB StdDev Multiplier (default 1.6) — number of standard deviations for the band width. Optimized default for QQQ. Lower values tighten the bands and will increase the frequency of upper/lower extreme readings.
BB Source (default Close) — price source for the band calculation.
Smoothing %B HMA Smoothing (default 8) — Hull Moving Average length applied to %B. Set to 1 to disable smoothing and plot the raw %B line.
Squeeze Quality Bandwidth Percentile Window (default 125) — rolling lookback used to rank the current bandwidth. Larger windows produce more stable percentile readings against longer historical context.
Tight Squeeze Threshold (default 8) — bandwidth percentile below this level is classified as a tight squeeze.
Loose Squeeze Threshold (default 25) — bandwidth percentile between the tight threshold and this level is classified as a developing squeeze.
Expansion Threshold (default 75) — bandwidth percentile above this level is classified as active expansion.
State Hysteresis (default 3.0) — neutral band around each threshold. A state must be exceeded by this amount before the classification changes, preventing flicker on marginal readings.
%B Zones Upper Quartile (default 80) — %B above this is classified as Upper Quartile zone.
Lower Quartile (default 20) — %B below this is classified as Lower Quartile zone.
Upper Extreme (default 100) — %B at or above this is classified as Above Upper Band. Lower
Extreme (default 0) — %B at or below this is classified as Below Lower Band.
Visuals Shade %B Zones — toggles the background zone tinting on the oscillator pane. Show Squeeze Pressure Bar — toggles the colored state bar and diamond markers at the bottom of the pane. Color inputs for all states are fully adjustable if you prefer a different palette.
________________________________________
Recommended Instruments and Timeframes
ATC BBP is tested and validated on ES, NQ, CL, GC, SPY, QQQ, major equities, and major FX pairs. Recommended timeframes are 5m, 15m, 1h, 4h, and 1D. Default settings are optimized for QQQ. When applying to other instruments, the BB Length, StdDev Multiplier, and Bandwidth Percentile Window are the primary settings to adjust for the instrument's typical volatility profile.
________________________________________
Indicator

Segmented Pressure Bands [JOAT]Segmented Pressure Bands
Introduction
Segmented Pressure Bands (SPB) is an open-source, institutional-grade regression channel system that computes a linear best-fit line and deviation bands from scratch using manual Ordinary Least Squares (OLS) mathematics — no built-in regression functions used. The channel operates in distinct segments: it builds over a dynamic lookback window, freezes all parameters at a minimum length threshold, extrapolates forward using the frozen slope and intercept, and resets automatically when price closes beyond the outer deviation band. Gradient linefill layers between the basis and outer bands communicate channel pressure visually. A volume regime tint adjusts visual weight based on relative volume activity, and ATR-based TP/SL visualization is drawn on each breakout reset.
The core problem SPB solves is that standard regression channels repaint continuously as new bars add to the calculation window, making historical channel boundaries unreliable for reference. SPB's freeze-and-extrapolate architecture locks the regression parameters at a fixed point in time, then projects the channel forward. Price that deviates far enough from that projection triggers a segment reset — the channel is redrawn from the breakout point. This creates a clear, non-repainting record of each regression segment and the breakout that ended it.
Core Concepts
1. Manual OLS Linear Regression
The regression is computed using the standard Ordinary Least Squares normal equations applied to the source series over the active lookback window:
float denom = float(length) * sumX2 - sumX * sumX
slope := (float(length) * sumXY - sumX * sumY) / denom
intercept := (sumY - slope * sumX) / float(length)
RMSE (root mean square error) is calculated as the deviation of the source from the fitted line, providing the basis for band width. All accumulator variables (sumX, sumY, sumXY, sumX2) are computed in a per-bar loop, giving full control over the calculation window without relying on built-in functions that may change behavior across versions.
2. Channel Freeze and Extrapolation
When the lookback window reaches the minimum length threshold, the slope, intercept, and RMSE are locked into freeze variables. From that point forward, the x-coordinate passed to the regression formula is the number of bars elapsed since the freeze bar, allowing the channel to project forward without recalculating:
float xCur = -float(bar_index - freezeBar)
basis := frozenIcpt + frozenSlope * xCur
This extrapolation means the bands continue to move with the slope direction, but their relative spacing (the RMSE deviation) remains constant from the freeze point.
3. Segment Reset on Breakout
When a candle closes beyond the outer upper or lower band, the current segment is terminated. The channel redraws from the current bar using the fresh source data from that point forward. Old linefill objects are explicitly deleted before new ones are created to stay within Pine Script's object limits.
4. Gradient Linefills and Volume Regime Tint
N intermediate lines are drawn between the basis and each outer band, filled progressively with increasing transparency from the inner region to the outer edge. This creates a gradient pressure visualization — tighter fills near the basis signal equilibrium, wider fills near the outer band signal stretch. When the volume regime ratio (short-term MA / long-term MA) is elevated above the high threshold, line widths increase and fill opacity deepens to communicate high-activity conditions visually.
Features
Manual OLS Regression: Slope, intercept, and RMSE computed entirely from first principles — no built-in regression functions
Freeze and Extrapolate Architecture: Regression parameters locked at minimum length; channel projected forward along the locked slope
Automatic Segment Reset: Outer band close-beyond triggers segment restart — prior segment preserved as a historical record
RMSE Deviation Bands: Upper and lower bands placed at configurable RMSE multiples from the basis line
Gradient Linefill Layers: N intermediate lines fill the channel space with a visual pressure gradient — configurable step count
Volume Regime Tint: Relative volume ratio (short/long MA) adjusts visual weight — elevated volume deepens channel fills and thickens lines
ATR TP/SL Visualization: On each breakout reset, ATR-based take profit and stop loss boxes drawn from the breakout close
Channel Direction Color: Downward slope (bullish context — price above a declining regression) renders in teal; upward slope (bearish context) renders in rose
Non-Repainting Basis: Freeze architecture ensures historical segment boundaries do not move after they are drawn
Configurable Source: Basis line source is selectable (close, hl2, hlc3, ohlc4, etc.)
Dashboard (Top Right): Current slope, RMSE, volume regime label, band multiplier, and active segment bar count
Near-Band Warning Dots: Subtle circle markers appear on the chart when price is within 12% of either channel edge — early warning that price is approaching a band extreme before a breakout occurs
Distance-to-Nearest-Band in Dashboard: Current distance from price to the nearest band displayed as a percentage of channel width — provides a precise quantitative read of how stretched or compressed the current position is within the segment
Live Regression Slope in Dashboard: Live regression slope value shown in the dashboard — communicates the current directional angle of the frozen channel projection in real time
Breakout Win/Loss Tracking: Outcome of every breakout trade tracked against ATR-based TP/SL levels — total breakout trade count and cumulative win rate displayed in the dashboard
Expanded Dashboard (7 Rows): Dashboard expanded to 7 rows — now includes distance-to-band percentage, live slope, and breakout win rate alongside existing regime and segment data
Input Parameters
Regression Settings:
Source: Price input for regression calculation (default: close)
Lookback Length: Maximum bar window for OLS computation (default: 50)
Min Length to Freeze: Bar count at which slope/intercept are locked (default: 20)
Band Multiplier: RMSE multiple for outer band placement (default: 2.0)
Gradient Settings:
Gradient Steps: Number of intermediate fill lines between basis and outer band (default: 5)
Volume Regime:
Short Vol MA: Short-term volume moving average length (default: 10)
Long Vol MA: Long-term volume moving average length (default: 40)
High Vol Threshold: Vol ratio above which volume tint activates (default: 1.5)
ATR / Risk:
ATR Length: Period for ATR calculation (default: 14)
ATR SL Multiplier: Stop loss distance on breakout (default: 1.5)
Reward:Risk Ratio: Take profit multiple of stop distance (default: 3.0)
How to Use This Indicator
Step 1: Read the Channel Direction
A teal channel indicates a downward-sloping regression — price is above a declining trend line, suggesting bullish pressure within the distribution. A rose channel indicates an upward-sloping regression — price is below a rising channel ceiling, suggesting bearish pressure. The gradient fills communicate how far price has deviated from the basis within that segment.
Step 2: Trade Within the Channel
Price compressing toward the basis from an outer band (thin fill region narrowing) suggests mean reversion is underway. Price expanding toward the outer band (fills widening) suggests momentum continuation. The outer band itself acts as a stretch boundary — closes beyond it trigger a new segment.
Step 3: React to Breakout Resets
When a segment resets, the breakout bar is the reference point for directional bias. The ATR TP/SL boxes visualize the immediate risk/reward from that close. The new channel building from the breakout will establish the next directional context.
Step 4: Monitor Volume Context
Elevated volume regime (shown in dashboard) at a channel boundary gives more conviction to breakout or reversal signals. Low-volume channel touches carry less institutional weight.
Indicator Limitations
The OLS calculation runs a loop over the lookback window on every bar. On very long lookback lengths with high chart data density, this may increase script execution time — keep lookback below 200 for best performance
The freeze architecture means the channel projection can diverge significantly from price if the instrument trends strongly after the freeze point. Segment resets bring the channel back to current price, but wide outer bands may delay that reset on low-volatility instruments
Gradient linefills are subject to Pine Script's 50-linefill object limit. SPB manages this with explicit deletion on each segment reset. If the gradient steps setting is set very high (above 10), this limit may be approached in active markets
ATR TP/SL boxes on breakout are drawn from the breakout close. They do not adjust for gaps, overnight moves, or instrument-specific spread — manual adjustment of the ATR multiplier may be needed for highly volatile instruments
Volume regime calculation uses simple moving averages of volume. On instruments where volume data is synthetic or unavailable, the regime indicator will not reflect true market activity
Originality Statement
SPB implements a regression channel with a freeze-extrapolate-reset lifecycle that produces stable, non-repainting historical segment boundaries. This design is original for the following reasons:
Computing OLS slope, intercept, and RMSE from scratch using raw accumulator mathematics — rather than using ta.linreg() or similar built-ins — gives full control over the calculation window, source, and update behavior, and avoids implicit look-ahead that some built-in functions can introduce
The freeze-and-extrapolate architecture is distinct from standard rolling regression, where every new bar shifts the entire historical channel. Once frozen, SPB's channel parameters are immutable — historical band boundaries drawn in past segments are permanent reference levels
The gradient linefill layer system communicates statistical deviation pressure visually across the full channel width, rather than drawing only a basis and outer band with no information about the space between them
The integration of a volume regime tint directly into the regression channel visualization — adjusting visual weight based on relative volume — provides immediate context for whether current channel position is occurring during active or quiet market conditions
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Regression channels and statistical deviation bands are mathematical constructs applied to historical data — they do not predict future price behavior. Breakout signals at band extremes do not guarantee continuation in any direction. Always apply proper risk management. The author is not responsible for any trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Indicator

Opening Range Failure Zones [AGPro Series]📌 Bollinger Walk Quality
Bollinger Walk Quality is built for one specific question: when price starts walking the outer Bollinger Band, is that walk strong enough to support continuation, or is the structure beginning to fail?
Many Bollinger Band tools focus on band touches, volatility contraction, width percentiles, or squeeze-style expansion setups. This script takes a different approach. It studies the behavior that comes after expansion: persistent upper-band or lower-band walking, directional pressure around the outer lane, pullback quality inside the band structure, and the point where the walk begins to lose control.
The goal is to make Bollinger Band continuation easier to read directly on the chart. Instead of treating every band touch as meaningful, the script scores whether price is staying in the correct outer lane, whether the Bollinger basis supports the active direction, whether pressure is persisting across multiple bars, and whether a pullback is holding in a healthy continuation pocket.
🧭 What The Script Measures
1. Walk Side
The panel identifies whether the active environment is an Upper Walk, Lower Walk, Cooling Walk, or Neutral state.
Upper Walk means price is persistently operating near the upper Bollinger lane while the basis supports upward continuation pressure.
Lower Walk means price is persistently operating near the lower Bollinger lane while the basis supports downward continuation pressure.
Cooling states appear when a recent walk is no longer fully active, but the script is still monitoring pullback quality and failure risk for a limited memory window.
2. Band Pressure
Band Pressure is a quality score for the active or developing walk. It combines outer-lane position, persistence, band contact behavior, basis slope support, and candle direction. A higher score means the walk has stronger structural pressure. A lower score means price is no longer showing durable outer-band control.
This keeps the script focused on continuation quality instead of simple band interaction. The chart can show a band touch, but the panel helps separate a weak touch from a real band-walk environment.
3. Pullback Quality
Healthy band walks often reset toward the middle of the Bollinger structure before continuing. Bollinger Walk Quality tracks that reset through a concept-native pullback pocket.
The pullback pocket is not a generic support or resistance rectangle. It is projected from the current Bollinger structure and represents the area where a band walk can cool off while still keeping its continuation profile intact.
The panel can show states such as Awaiting Pullback, Testing Pocket, Clean Hold, or Weak Reset. This helps distinguish a controlled continuation reset from a walk that is losing quality.
4. Failure Risk
Failure Risk is designed to catch the moment when an active or recently active band walk starts to break down. It rises when price loses the outer lane, pressure falls, the basis slope weakens, or price begins to threaten the Bollinger basis.
The failure label is intentionally restrained. It appears only on fresh failure events, so the chart remains clean and readable instead of filling with repeated warnings.
🎯 Core Features
- Outer-band walk detection for upper and lower Bollinger continuation phases
- Band pressure scoring based on lane position, persistence, slope support, and band contact behavior
- Pullback-to-band quality state for continuation resets
- Projected pullback pockets that show where a healthy walk can reset without losing structure
- Failure warning labels when the active walk loses pressure or threatens the basis
- Clean AG Pro panel with walk side, band pressure, pullback quality, and failure risk
- Adjustable panel location, theme, font sizes, label spacing, label clearance, zone projection, and visual density
📊 Visual Design
The default view is designed for a clean public PulseWire chart.
The script displays Bollinger Bands, highlights the active walk track, projects a limited number of pullback zones, and uses event labels with spacing controls. Labels are anchored outside the local candle envelope so they do not disappear inside candles or cover important price action.
The chart remains active enough to be visually informative, but the object count and label density are controlled by default. This keeps the indicator suitable for repeated use across different symbols and timeframes.
🧩 Panel
The AG Pro panel summarizes the current state in four compact rows:
- Walk Side
- Band Pressure
- Pullback Quality
- Failure Risk
Panel location, panel theme, panel font size, label font size, label spacing, label clearance, zone projection, zone opacity, and object limits are all adjustable from the settings menu.
🔎 How This Is Different
Bollinger Walk Quality is not a squeeze map and does not rely on compression logic. It does not use Keltner confirmation, volatility percentile ranking, or width contraction states.
Its lane is continuation after expansion:
- Is price walking the band?
- Which side controls the walk?
- Is the walk supported by pressure and basis slope?
- Is the pullback still healthy?
- Is the walk beginning to fail?
That makes it a separate Bollinger Band workflow from squeeze-focused tools. It is designed for traders who want to evaluate trend continuation rhythm, pullback behavior, and outer-band pressure in a more structured way.
✅ Best Use Cases
- Studying Bollinger Band walk continuation
- Reviewing trend pressure after expansion
- Identifying controlled pullbacks inside active band-walk environments
- Monitoring when a walk is cooling or losing quality
- Comparing upper-band and lower-band pressure across market phases
- Keeping Bollinger Band continuation analysis clean and visual
⚙️ Settings Overview
Engine settings control the Bollinger length, multiplier, source, basis slope lookback, and ATR normalization.
Band Walk Logic settings control the outer-lane depth, minimum walk persistence, minimum walk score, pullback memory, and failure warning threshold.
Visual settings control Bollinger Bands, walk highlight, pullback zones, event labels, label spacing, label count, label offset, label clearance, and label font size.
Pullback Zone settings control zone projection length, maximum visible zones, and opacity.
Panel settings control the information panel, location, theme, and font size.
🏁 Design Intent
Bollinger Walk Quality is designed to make Bollinger Band continuation more readable without turning the chart into a crowded signal dashboard.
The script focuses on structure, persistence, pullback quality, and failure behavior. It gives the chart a clear visual rhythm while keeping the panel concise and the labels controlled.
This makes the script useful as a premium public Bollinger continuation tool and keeps it clearly differentiated from Bollinger squeeze, compression, and volatility expansion maps. Indicator

Bollinger Walk Quality [AGPro Series]📌 Bollinger Walk Quality
Bollinger Walk Quality is built for one specific question: when price starts walking the outer Bollinger Band, is that walk strong enough to support continuation, or is the structure beginning to fail?
Many Bollinger Band tools focus on band touches, volatility contraction, width percentiles, or squeeze-style expansion setups. This script takes a different approach. It studies the behavior that comes after expansion: persistent upper-band or lower-band walking, directional pressure around the outer lane, pullback quality inside the band structure, and the point where the walk begins to lose control.
The goal is to make Bollinger Band continuation easier to read directly on the chart. Instead of treating every band touch as meaningful, the script scores whether price is staying in the correct outer lane, whether the Bollinger basis supports the active direction, whether pressure is persisting across multiple bars, and whether a pullback is holding in a healthy continuation pocket.
🧭 What The Script Measures
1. Walk Side
The panel identifies whether the active environment is an Upper Walk, Lower Walk, Cooling Walk, or Neutral state.
Upper Walk means price is persistently operating near the upper Bollinger lane while the basis supports upward continuation pressure.
Lower Walk means price is persistently operating near the lower Bollinger lane while the basis supports downward continuation pressure.
Cooling states appear when a recent walk is no longer fully active, but the script is still monitoring pullback quality and failure risk for a limited memory window.
2. Band Pressure
Band Pressure is a quality score for the active or developing walk. It combines outer-lane position, persistence, band contact behavior, basis slope support, and candle direction. A higher score means the walk has stronger structural pressure. A lower score means price is no longer showing durable outer-band control.
This keeps the script focused on continuation quality instead of simple band interaction. The chart can show a band touch, but the panel helps separate a weak touch from a real band-walk environment.
3. Pullback Quality
Healthy band walks often reset toward the middle of the Bollinger structure before continuing. Bollinger Walk Quality tracks that reset through a concept-native pullback pocket.
The pullback pocket is not a generic support or resistance rectangle. It is projected from the current Bollinger structure and represents the area where a band walk can cool off while still keeping its continuation profile intact.
The panel can show states such as Awaiting Pullback, Testing Pocket, Clean Hold, or Weak Reset. This helps distinguish a controlled continuation reset from a walk that is losing quality.
4. Failure Risk
Failure Risk is designed to catch the moment when an active or recently active band walk starts to break down. It rises when price loses the outer lane, pressure falls, the basis slope weakens, or price begins to threaten the Bollinger basis.
The failure label is intentionally restrained. It appears only on fresh failure events, so the chart remains clean and readable instead of filling with repeated warnings.
🎯 Core Features
- Outer-band walk detection for upper and lower Bollinger continuation phases
- Band pressure scoring based on lane position, persistence, slope support, and band contact behavior
- Pullback-to-band quality state for continuation resets
- Projected pullback pockets that show where a healthy walk can reset without losing structure
- Failure warning labels when the active walk loses pressure or threatens the basis
- Clean AG Pro panel with walk side, band pressure, pullback quality, and failure risk
- Adjustable panel location, theme, font sizes, label spacing, label clearance, zone projection, and visual density
📊 Visual Design
The default view is designed for a clean public PulseWire chart.
The script displays Bollinger Bands, highlights the active walk track, projects a limited number of pullback zones, and uses event labels with spacing controls. Labels are anchored outside the local candle envelope so they do not disappear inside candles or cover important price action.
The chart remains active enough to be visually informative, but the object count and label density are controlled by default. This keeps the indicator suitable for repeated use across different symbols and timeframes.
🧩 Panel
The AG Pro panel summarizes the current state in four compact rows:
- Walk Side
- Band Pressure
- Pullback Quality
- Failure Risk
Panel location, panel theme, panel font size, label font size, label spacing, label clearance, zone projection, zone opacity, and object limits are all adjustable from the settings menu.
🔎 How This Is Different
Bollinger Walk Quality is not a squeeze map and does not rely on compression logic. It does not use Keltner confirmation, volatility percentile ranking, or width contraction states.
Its lane is continuation after expansion:
- Is price walking the band?
- Which side controls the walk?
- Is the walk supported by pressure and basis slope?
- Is the pullback still healthy?
- Is the walk beginning to fail?
That makes it a separate Bollinger Band workflow from squeeze-focused tools. It is designed for traders who want to evaluate trend continuation rhythm, pullback behavior, and outer-band pressure in a more structured way.
✅ Best Use Cases
- Studying Bollinger Band walk continuation
- Reviewing trend pressure after expansion
- Identifying controlled pullbacks inside active band-walk environments
- Monitoring when a walk is cooling or losing quality
- Comparing upper-band and lower-band pressure across market phases
- Keeping Bollinger Band continuation analysis clean and visual
⚙️ Settings Overview
Engine settings control the Bollinger length, multiplier, source, basis slope lookback, and ATR normalization.
Band Walk Logic settings control the outer-lane depth, minimum walk persistence, minimum walk score, pullback memory, and failure warning threshold.
Visual settings control Bollinger Bands, walk highlight, pullback zones, event labels, label spacing, label count, label offset, label clearance, and label font size.
Pullback Zone settings control zone projection length, maximum visible zones, and opacity.
Panel settings control the information panel, location, theme, and font size.
🏁 Design Intent
Bollinger Walk Quality is designed to make Bollinger Band continuation more readable without turning the chart into a crowded signal dashboard.
The script focuses on structure, persistence, pullback quality, and failure behavior. It gives the chart a clear visual rhythm while keeping the panel concise and the labels controlled.
This makes the script useful as a premium public Bollinger continuation tool and keeps it clearly differentiated from Bollinger squeeze, compression, and volatility expansion maps.
Indicator

Volatility Regime Cycle [AGPro Series]Volatility Regime Cycle
🌀 Overview
Volatility Regime Cycle classifies every bar on your chart into one of four distinct volatility phases: Contraction, Expansion, Climax, and Reset. Unlike traditional trend or regime indicators that focus on price direction, this tool maps the cyclical behavior of volatility itself — helping traders recognize whether the market is coiling, releasing, climaxing, or resetting. Each phase is detected through a multi-factor confluence engine and displayed with gradient background shading, transition markers, and S/R-style climax reaction zones. The framework is asset- and timeframe-agnostic: it adapts to crypto, forex, indices, stocks, and commodities on any timeframe.
💎 Unique Edge
Most volatility tools present a single metric (ATR, Bollinger Width, VIX proxy). Volatility Regime Cycle differs in structure and intent:
🔸 Phase-based classification, not just a reading — every bar is assigned to a named regime with a trader-actionable bias.
🔸 Multi-factor confluence scoring — five independent volatility inputs (ATR level, BB Width level, BB/KC squeeze, volume z-score, ATR rate-of-change) vote on the active phase. No single factor can dominate.
🔸 Winsorized normalization — outlier events (single extreme bars) do not compress the scale and hide current readings, a common flaw in simple percentile-based tools.
🔸 Climax Reaction Zones — each Climax event is preserved as an S/R-style rectangle with mid-pivot line, creating a memory of past volatility exhaustion levels that often act as future reaction areas.
🔸 Cycle-aware analytics — tracks historical phase durations and estimates current cycle progress based on rolling averages of past phases of the same type.
🔸 Phase-specific Trader Bias — panel translates the current regime into a plain-language bias (Breakout-watch, Momentum-favor, Reversal-risk, Cooldown).
This is not a Wyckoff phase tool, an Elliott counter, or a Dow-theory classifier. It is a pure volatility-cycle mapper, engineered from the ground up to stand apart from both classical cycle indicators and single-metric volatility meters.
🧠 Methodology
The engine runs three layers:
🔹 Factor Layer
• ATR Level — 14-period ATR, winsorized min-max normalized (5%-95% range) over a configurable lookback window.
• BB Width Level — Bollinger Band width as percent of basis, normalized identically.
• Squeeze State — true when Bollinger Bands are contained inside Keltner Channels (classic volatility compression).
• Volume Z-Score — standardized volume relative to its rolling mean and standard deviation.
• ATR Rate-of-Change — momentum of volatility itself.
🔹 Scoring Layer
Each of the four phases has its own scoring formula that weights the five factors differently. For each bar, all four phase scores are calculated in parallel, and the phase with the highest score is the candidate regime for that bar.
🔹 Confirmation Layer
To suppress whipsaw, the candidate phase must persist for a configurable number of bars (default 3) before replacing the active phase. A minimum phase duration lock additionally prevents rapid flips. Climax events include a de-duplication cooldown so that clustered climax bars produce a single marker rather than a cluster of overlapping labels.
Phase transitions are classified as major (Contraction→Expansion breakouts and Climax entries) or minor (all other routine changes). Only major transitions receive labels; minor changes are shown as subtle dotted lines to keep the chart clean.
🔔 Signals & Alerts
The script exposes alerts for every phase transition as well as two high-value composite events:
🔸 Any Phase Transition — fires whenever the active phase changes.
🔸 Entered Contraction / Expansion / Climax / Reset — fires for specific phase entries.
🔸 Contraction → Expansion (Breakout) — coil release event; of interest to breakout traders.
🔸 Climax Entry (Exhaustion Warning) — volatility peak event; of interest to mean-reversion and risk-management traders.
All alerts fire only on confirmed bar close to prevent intra-bar flip-flop.
⚙️ Key Inputs
🔹 Engine Settings — normalization lookback, ATR length, Bollinger/Keltner length and multipliers, volume z-score length, ATR rate-of-change length, confirmation bars, minimum phase duration.
🔹 Phase Thresholds — low volatility level, high volatility level, climax volatility gate, climax volume z-score threshold, climax de-dup cooldown.
🔹 Visuals — toggles for background shading, major transition labels, minor transition lines, volatility ribbon, current phase label.
🔹 S/R Zones — climax zones toggle, breakout zones toggle, maximum active zones, zone initial length, zone range lookback.
🔹 Panel — show/hide, location, Dark/Light theme, font size.
🔹 Label Sizing — font size for on-chart labels.
🔹 Alerts — per-event toggles.
📘 How to Use
🔸 Breakout traders: watch for Contraction phase on the panel with Trader Bias showing Breakout-watch. When the phase transitions to Expansion, a coil release is underway and a Breakout label is printed. Optional Breakout Zones can be enabled to preserve the breakout level as a retest reference.
🔸 Momentum / trend traders: ride the Expansion phase while Trader Bias reads Momentum-favor. Phase Duration and Cycle Progress on the panel give a sense of where the current momentum leg sits relative to historical averages.
🔸 Mean-reversion / exhaustion traders: a Climax label with Trader Bias Reversal-risk highlights volatility exhaustion. The Climax Reaction Zone drawn at each climax often behaves as a future reaction level and can be used as confluence with other reversal tools.
🔸 Risk managers: the Reset phase with Trader Bias Cooldown typically signals reduced market conviction and can be used to scale down position size until a new Contraction builds up.
🔸 Multi-timeframe reading: run the script on the higher timeframe for regime context and on the lower timeframe for entry timing.
Hover the panel header to see a statistics tooltip with average durations of each phase over the last completed cycles.
⚠️ Limitations & Transparency
🔹 The script does not predict future prices or issue buy/sell recommendations. It is a classification and context tool.
🔹 Phase detection is inherently lagging because it requires the confirmation window and minimum duration lock. This is a deliberate design choice to suppress whipsaw at the cost of some responsiveness.
🔹 Normalization uses a rolling lookback window; the first lookback bars after loading the script may show compressed or unstable readings while the window fills.
🔹 Cycle Progress is an estimate based on historical phase averages and may exceed 100% when the current phase runs longer than past cycles.
🔹 Climax and Reset scores rely partly on volume; on instruments with unreliable or missing volume feeds, volume-dependent factors will contribute less.
🔹 All visual elements are cosmetic and toggleable; they do not alter the underlying phase logic.
🛡️ Risk Disclosure
This indicator is a technical analysis tool. It is not a trading system, not a signal service, not financial advice, and not a guarantee of future results. Trading involves substantial risk of loss. Past market behavior does not predict future market behavior. Users are solely responsible for their own trading decisions, risk management, and position sizing. Always test any tool on your preferred instruments and timeframes with appropriate historical review before using it as part of a live decision-making process. Indicator

VWAP Cross Flow Engine [AGPro Series]VWAP Cross Flow Engine
🔹 OVERVIEW
VWAP Cross Flow Engine is a precision scoring system for price-to-VWAP
crossovers. Instead of treating every VWAP cross as a binary signal,
this indicator measures the QUALITY of each crossover event in real
time using a weighted composite score derived from momentum, volume
expansion and optional sigma-band confluence. The engine is designed
for intraday scalpers and swing traders who rely on VWAP as a dynamic
equilibrium reference and need a structured way to separate high-
conviction continuation crosses from low-quality noise flips.
The script plots an anchored Volume-Weighted Average Price line with
optional volume-weighted standard-deviation bands, detects every
price/VWAP crossover event, scores each one on a 0–100 scale and
visualizes the result through compact X markers, directional bar
coloring, a retrospective quality dashboard and a dynamic bias zone
anchored on the strongest crosses.
🔸 UNIQUE EDGE
Most VWAP-based tools stop at plotting the line and marking raw
crossovers. VWAP Cross Flow Engine adds a multi-factor quality layer
on top of the crossover itself:
• Every cross receives a composite score, not a pass/fail flag
• Momentum sub-score derived from RSI distance from 50 at cross bar
• Volume sub-score derived from current volume vs SMA baseline
• Optional confluence bonus when cross occurs beyond 2-sigma envelope
• Retrospective follow-through measurement in ATR units
• Session-aware counters with automatic daily-vs-higher-timeframe
label switching
• ATR-based cooldown filter that prevents label overlap on any
timeframe, not just bar-count cooldowns that fail on daily charts
The combination of live scoring + retrospective success tracking in a
single panel is the core differentiator. It allows the trader to both
filter new crosses and study the historical reliability of VWAP cross
behavior on any symbol and timeframe.
🔷 METHODOLOGY
1. VWAP CALCULATION
Volume-weighted average of HLC3 (configurable) anchored to the
Session, Week or Month boundary. Cumulative price*volume and
cumulative volume series are reset at every anchor change.
2. SIGMA BANDS (optional)
Volume-weighted variance computed as E − E ² where X is the
source price weighted by volume. Square root produces the true
volume-weighted standard deviation. 1σ and 2σ envelopes are drawn
around the VWAP line.
3. CROSS DETECTION
Standard ta.crossover / ta.crossunder between close and VWAP.
4. QUALITY SCORING
• Momentum sub-score: |RSI(14) − 50|, scaled to 0–40 range
• Volume sub-score: volume / SMA(20), capped at 3x, scaled 0–30
• Confluence bonus: +5 if prior bar touched the opposing 2σ band
• Total live score (max 70 or 75) is rescaled to 0–100
5. COOLDOWN FILTER
A new cross is only plotted if BOTH conditions are met:
• At least N bars since the last plotted cross
• At least K × ATR price distance from the last plotted cross
6. FOLLOW-THROUGH TRACKING
Each cross is stored with its direction, price and ATR at the time
of the event. After N bars, the displacement (in the cross
direction) is measured. Success rate and average follow-through
in ATR units are maintained inside a rolling lookback window.
7. QUALITY ZONE
A rectangle zone (0.8 × ATR tall by default, 60 bars long) is
drawn at every strong cross (score ≥ 70). The zone acts as a
dynamic bias area anchored on high-conviction VWAP interactions.
🔶 SIGNALS & ALERTS
The indicator fires five distinct alert conditions:
1. High-Quality VWAP Cross Up — bullish cross above the min quality
threshold with cooldown satisfied.
2. High-Quality VWAP Cross Down — bearish cross above the min quality
threshold with cooldown satisfied.
3. Strong VWAP Cross (≥70) — score 70 or higher; anchors a new
quality zone.
4. Price Reached +2σ Band — price extended to the upper sigma band
(optional, requires bands enabled).
5. Price Reached −2σ Band — price extended to the lower sigma band
(optional, requires bands enabled).
🔹 KEY INPUTS
VWAP Reference
• Source — price series used for VWAP (default HLC3)
• Anchor Type — Session / Week / Month
• Show VWAP Line
Sigma Bands
• Show Sigma Bands (default OFF)
• Inner Band Multiplier (default 1.0)
• Outer Band Multiplier (default 2.0)
Quality Engine
• Momentum (RSI) Length
• Volume Average Length
• Follow-Through Bars
• ATR Length
• Min Quality To Plot (default 50)
• Use Sigma Confluence Bonus
• Cooldown — Minimum Bars (default 5)
• Cooldown — Minimum ATR Distance (default 0.5)
Visuals
• Show Cross X Labels
• Show Target Projection (default OFF)
• Show Quality Zone
• Quality Zone Height (ATR) / Length (Bars)
• Color Bars By Cross Strength
• Auto Label Size (upscale on 1D+)
Panel
• Show Dashboard Panel
• Panel Position (6 positions)
• Panel Theme (Dark / Light)
• Panel Font Size
• Success Rate Lookback Bars
🔸 HOW TO USE
• INTRADAY SCALPING — use Session anchor on 5m–1h charts. Focus on
crosses scoring 70 or higher. The quality zone becomes a short-term
bias area: price holding above a bull zone mid-line tends to favor
continuation, breaks back through the mid-line tend to indicate
weakening conviction.
• SWING BIAS — use Week or Month anchor on 4h and daily charts. Treat
strong crosses as potential regime-shift events. Monitor the
Success Rate metric to calibrate expectations for the current
market and instrument.
• MEAN-REVERSION — enable sigma bands and confluence bonus. Crosses
that form after a 2σ stretch tend to score higher and mark
statistically meaningful reversal attempts.
• FILTER CALIBRATION — raise Min Quality To Plot to 60 or 70 for
high-selectivity environments; lower to 40 for noisier instruments
where you want earlier confirmation.
The dashboard gives at-a-glance context: how many crosses have fired
this session, how many were strong, what the historical win rate
looks like in the current lookback window, the average ATR-normalized
follow-through, and whether price is currently above or below VWAP.
🔷 LIMITATIONS & TRANSPARENCY
• This is NOT a strategy and does not generate buy/sell orders.
• Score is a quality filter, not a directional prediction. A high-
score cross still carries market risk and can fail.
• Follow-through statistics depend on lookback window size and
timeframe; adjust Success Rate Lookback to match your trading
horizon.
• Sigma bands require a reliable volume feed. On low-liquidity
instruments the bands may be noisy or meaningless.
• Anchored VWAP resets at each new anchor (Session / Week / Month);
early-in-anchor values use fewer samples and are less stable.
• The indicator repaints only within the cross bar itself (like any
crossover detector). Once a bar closes, the plotted cross and its
score are fixed.
🔶 RISK DISCLOSURE
This script is a technical analysis tool intended for educational
and analytical purposes. It does not constitute financial advice,
investment advice or a recommendation to buy or sell any asset.
Trading financial markets involves substantial risk of loss. Past
performance of any indicator is not indicative of future results.
Users are fully responsible for their own trading decisions and
should combine this tool with independent analysis and proper risk
management. Indicator

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

Dynamic Trend Pivots [BOSWaves]Dynamic Trend Pivots - Conviction-Driven Trend Detection with Pulse-Adaptive Exhaustion Level Mapping
Overview
Dynamic Trend Pivots is a conviction-based trend identification and structural level mapping system that tracks directional price commitment through a pulse accumulation engine, where band width, trend confidence, and exhaustion level placement are driven by real-time measurement of close-position conviction across consecutive bars rather than arbitrary moving average relationships or fixed volatility multiples.
Instead of relying on standard crossover logic or static band thresholds, trend state, adaptive band behavior, and exhaustion level generation are determined through bar-level conviction scoring, pulse saturation modeling, and peak-to-trough saturation drop detection that identifies genuine momentum exhaustion events as they occur.
This creates a trend framework that reflects actual directional commitment rather than lagged price averages - tightening bands during high-conviction pulse saturation when trend confidence is elevated, expanding bands as conviction decays and directional commitment weakens, and planting structural exhaustion levels at the precise price points where pulse energy peaked before collapsing, marking locations of maximum prior commitment for future reference.
Price is therefore evaluated against bands and structural levels that respond to measurable conviction dynamics rather than conventional indicator thresholds.
Conceptual Framework
Dynamic Trend Pivots is founded on the principle that meaningful trend signals and structural reference levels emerge from the accumulation and exhaustion of bar-level directional conviction, not from price crossing smoothed averages or breaching fixed statistical bands.
Traditional trend-following approaches identify directional changes through indicator crossovers or band penetrations that treat all bars equally regardless of their internal structure and conviction quality. This framework replaces undifferentiated price-level logic with conviction-weighted pulse tracking that distinguishes between bars demonstrating genuine directional commitment and bars that merely move price without close-position confirmation.
Three core principles guide the design:
Trend conviction should be measured through close positioning within the bar range combined with directional agreement, not through price displacement alone.
Band width must dynamically reflect pulse saturation state, contracting during high-conviction conditions and expanding as conviction decays.
Structural reference levels should be planted at exhaustion events — the precise price points where accumulated conviction peaked before collapsing — rather than at arbitrary pivot formations.
This shifts trend analysis from static threshold detection into a continuously updating conviction framework anchored in measurable bar-level directional commitment.
Theoretical Foundation
The indicator combines close-position conviction measurement, pulse accumulation and decay modeling, MAD-based adaptive band construction, and saturation peak tracking for exhaustion event detection.
Conviction bars are identified through close positioning within the bar range: a bull conviction bar closes in the upper fraction of its range on an up-close bar, and a bear conviction bar closes in the lower fraction on a down-close bar. A pulse counter accumulates these conviction readings up to a configurable saturation cap, while decaying exponentially between conviction events. Saturation drives the band multiplier interpolation between tight and wide settings, reflecting real-time trend confidence. Exhaustion detection monitors saturation's relationship to its recent peak, planting structural levels when saturation drops sufficiently from that peak.
Four internal systems operate in tandem:
Pulse Accumulation Engine : Evaluates each bar for directional conviction based on close positioning within the high-low range, accumulating bull and bear pulse counters independently with configurable decay between conviction events.
Saturation Measurement System : Converts raw pulse counts into a normalized saturation reading relative to the pulse cap, providing the continuous 0-1 conviction metric that drives all adaptive behavior.
MAD Adaptive Band Construction : Applies Mean Absolute Deviation-scaled bands around an EMA baseline, with the band multiplier dynamically interpolating between minimum and maximum settings based on current saturation.
Exhaustion Level Engine : Tracks saturation peaks with their associated price and direction, planting structural zone levels when saturation drops below a configurable fraction of its recent peak, with lifecycle management including break detection, zone extension, and retest identification.
This design allows trend confidence and structural reference levels to reflect actual conviction dynamics rather than responding mechanically to price or indicator crossovers.
How It Works
Dynamic Trend Pivots evaluates price through a sequence of conviction-aware processes:
Conviction Bar Classification : Each bar's close position within its high-low range is measured; bars closing in the upper fraction on an up-close qualify as bull conviction bars, and bars closing in the lower fraction on a down-close qualify as bear conviction bars.
Pulse Counter Update : Bull or bear pulse counters increment by one on each qualifying conviction bar up to the saturation cap, and decay multiplicatively by the configured decay rate when conviction bars are absent.
Saturation Calculation : The dominant pulse counter (bull or bear) divided by the pulse cap yields a normalized saturation value, with signed directional pulse providing the complete conviction state.
Saturation Peak Tracking : The system continuously monitors saturation, recording the peak value, direction, associated price level (high for bull, low for bear), and bar index when each new saturation maximum is established.
Exhaustion Event Detection : When current saturation drops below the configured fraction of the recorded saturation peak, an exhaustion event fires, triggering structural level placement at the recorded peak price.
Adaptive Band Construction : The band multiplier interpolates between the minimum (saturated, tight) and maximum (exhausted, wide) settings based on current saturation, scaling MAD to determine upper and lower band distances from the EMA baseline.
Trend State Logic : Price crossing above the raw upper band triggers bullish state; crossing below the raw lower band triggers bearish state; state persists until the opposite breach occurs.
Signal Generation : State transitions from bearish to bullish produce buy labels; bullish to bearish transitions produce sell labels, both plotted at MAD-scaled offsets from price.
Exhaustion Level Lifecycle : Planted levels extend rightward with zone boxes, dashed midlines, and price labels until price closes beyond the zone boundary with ATR buffer confirmation, at which point the level is removed.
Retest Detection : When price re-enters an active exhaustion zone after the minimum origin bar offset, a retest signal fires with a configurable cooldown enforced between subsequent retests on the same level.
Together, these elements form a continuously updating conviction map that simultaneously tracks trend state and marks the structural fingerprints left by exhausted momentum.
Interpretation
Dynamic Trend Pivots should be interpreted as a conviction-weighted trend framework with exhaustion-derived structural reference levels:
Bullish Trend State (Green) : Established when price closes above the raw adaptive upper band, indicating a conviction-supported upward directional breach.
Bearish Trend State (Magenta) : Established when price closes below the raw adaptive lower band, signaling a conviction-supported downward directional breach.
Band Cloud : Visual gradient zone fills between the outer band edge and close, with opacity and color reflecting current trend state and providing a continuous conviction boundary reference.
Band Width Dynamics : Tight bands indicate high pulse saturation (elevated conviction), while wide bands reflect saturation decay (diminished conviction and increased caution).
▲ Buy Signals : Green upward triangles mark bullish state initiations at upper band crossovers, plotted below the bar at a MAD-scaled offset.
▼ Sell Signals : Red downward triangles mark bearish state initiations at lower band crossunders, plotted above the bar at a MAD-scaled offset.
Exhaustion Zone : ATR-scaled rectangular zones centered on the saturation peak price mark prior conviction exhaustion locations, with colored borders and subtle fills distinguishing bull from bear exhaustion origin.
Exhaustion Midline : Dashed line through the precise saturation peak price within each zone provides a high-precision structural reference at the exact level of maximum prior conviction.
◆ Origin Marker : Diamond label plotted on the bar where each exhaustion event occurred, marking the conviction peak location for retrospective analysis.
✦ Retest Signals : Small star diamonds mark price re-entry into active exhaustion zones after the origin buffer period, identifying potential reaction points within proven conviction regions.
Retest Extension Lines : Horizontal lines projected forward from retest bar highs or lows mark the retest price level for ongoing reference.
Colored Candles : Optional bar coloring reflects trend state and fades toward neutral as saturation decays, providing an immediate visual exhaustion cue. Note: The original chart candles must be disabled in chart settings for the conviction-colored candles to display properly.
Saturation state, band width dynamics, and exhaustion level proximity outweigh isolated price movements in isolation.
Signal Logic & Visual Cues
Dynamic Trend Pivots presents two primary trend interaction signals alongside a continuous exhaustion level monitoring system:
Buy Signal (▲) : Green triangle appears when trend state switches from bearish to bullish via upper band crossover, indicating conviction-supported directional shift to the upside.
Sell Signal (▼) : Red triangle displays when trend state switches from bullish to bearish via lower band crossunder, indicating conviction-supported directional shift to the downside.
Exhaustion zone retests provide secondary structural signals when price revisits prior conviction peak regions after the minimum origin offset, subject to per-level cooldown enforcement.
Alert generation covers bullish and bearish state switches, exhaustion events triggering new level placement, and both bullish and bearish retest occurrences for systematic structural monitoring.
Strategy Integration
Dynamic Trend Pivots fits within conviction-informed and structural level-based trading approaches:
Conviction-Confirmed Entries : Use band crossover signals as trend initiation points where saturation-supported conviction has driven price through the adaptive boundary, rather than acting on low-conviction crossovers during band expansion.
Saturation-Based Position Sizing : Scale exposure relative to current pulse saturation — favor larger positions during high-saturation fresh trend conditions and reduce sizing as conviction decays and bands widen.
Band-Width Risk Calibration : Expect tighter price ranges and more reliable directional follow-through during contracted band periods; treat expanded bands as a signal of reduced trend reliability requiring tighter risk management.
Exhaustion Level Trade Planning : Use planted exhaustion zones as anticipatory structural levels — price reactions at these zones reflect the influence of the same conviction dynamics that originally caused the momentum peak and collapse.
Retest-Based Re-entry : Treat exhaustion zone retests as lower-risk re-entry or continuation opportunities within established trends, using the midline as a precision reference for entry and invalidation.
Multi-Timeframe Conviction Hierarchy : Apply higher-timeframe trend state and exhaustion level locations as directional bias filters while using lower-timeframe pulse signals for entry precision.
Technical Implementation Details
Core Engine : EMA-based trend baseline with MAD volatility measurement
Conviction Model : Close-position ratio within high-low range with directional agreement gating
Pulse System : Capped accumulation with configurable multiplicative decay between conviction events
Band Construction : Linear interpolation between min/max multipliers based on saturation, scaling MAD offset from EMA baseline
Exhaustion Detection : Saturation peak tracking with configurable drop threshold triggering level placement
Visualization : Gradient-filled band cloud with ATR-scaled exhaustion zones, dashed midlines, and retest extension lines
Signal Logic : Raw band crossover state-switch detection with saturation-faded candle coloring
Performance Profile : Optimized for real-time execution with configurable level caps managing object count
Optimal Application Parameters
Timeframe Guidance:
1 - 5 min : Micro-structure conviction tracking for scalping with responsive pulse and tight band settings
15 - 60 min : Intraday trend identification with balanced decay characteristics and moderate exhaustion sensitivity
4H - Daily : Swing-level conviction trend mapping with sustained pulse persistence and wider exhaustion zone tolerance
Suggested Baseline Configuration:
Trend Length : 21
Close Zone : 0.30
Pulse Decay : 0.85
Pulse Cap : 8
MAD Length : 17
Band Min (Saturated) : 1.4
Band Max (Exhausted) : 2.2
Exhaustion Drop : 0.4
Max Levels : 8
Break Buffer (ATR) : 0.25
Show Band Cloud : Enabled
Color Candles : Enabled (requires disabling original chart candles in chart settings)
Show Buy/Sell Signals : Enabled
These suggested parameters should be used as a baseline; their effectiveness depends on the instrument's volatility characteristics, conviction frequency, and preferred signal density, so fine-tuning is expected for optimal performance.
Parameter Calibration Notes
Use the following adjustments to refine behavior without altering the core logic:
Excessive signal noise : Increase Trend Length for a smoother baseline or tighten Close Zone toward 0.2 to demand more extreme close positioning before conviction is registered.
Missed conviction events : Widen Close Zone toward 0.4 for more inclusive bar qualification or decrease Trend Length for a more reactive baseline.
Pulse sustains too long : Decrease Pulse Decay toward 0.5 for faster conviction fade between qualifying bars, accelerating band expansion during low-conviction periods.
Pulse fades too quickly : Increase Pulse Decay toward 0.99 to sustain saturation longer between conviction events, maintaining tighter bands through minor pullbacks.
Bands too tight or wide across the board : Adjust Band Min and Band Max multipliers to rescale the full saturation-to-exhaustion band range for the instrument's volatility characteristics.
Too many exhaustion levels forming : Increase Exhaustion Drop threshold toward 0.6 to demand a more severe saturation collapse before a level is planted, filtering for higher-conviction exhaustion events only.
Levels not forming frequently enough : Decrease Exhaustion Drop toward 0.2 to plant levels on more modest saturation pullbacks, increasing structural level density.
Levels breaking too easily : Increase Break Buffer ATR multiplier to require a more decisive close beyond the zone boundary before invalidation occurs.
Adjustments should be incremental and evaluated across multiple session types rather than isolated market conditions.
Performance Characteristics
High Effectiveness:
Trending markets with clear conviction phases where pulse saturation builds and sustains before exhausting at structural turning points
Instruments with consistent bar structure where close positioning within the range reliably reflects directional commitment
Momentum continuation strategies entering on fresh pulse saturation signals with contracted bands
Structural level frameworks benefiting from exhaustion-derived reference zones rather than arbitrary pivot-based support and resistance
Reduced Effectiveness:
Choppy, low-conviction environments where close positioning provides unreliable directional signals and pulse saturation builds and collapses rapidly without sustained directional follow-through
Extremely gapped or news-driven markets where bar range structure becomes discontinuous and close positioning loses meaningful conviction interpretation
Mean-reversion dominant conditions where band breaches quickly reverse without sufficient pulse saturation to sustain directional state
Low-volatility compression periods where MAD scaling produces narrow bands that generate frequent false crossovers
Consolidation and sideways conditions where conviction builds in alternating directions without achieving the sustained saturation required for reliable trend state establishment
Integration Guidelines
Confluence : Combine with BOSWaves order flow tools, volume analysis, or multi-timeframe structure indicators for layered confirmation
Saturation Respect : Prioritize signals and level interactions occurring during high-saturation periods; treat low-saturation crossovers and retests with reduced confidence
Exhaustion Awareness : Monitor candle fade coloring as an early warning of declining conviction before formal signal generation confirms a state change
Level Hierarchy : Treat exhaustion levels planted during peak saturation events as higher-conviction structural references than levels formed during moderate saturation peaks
Retest Discipline : Use exhaustion zone retests as continuation confirmation rather than reversal triggers unless accompanied by opposing band crossover signals
Disclaimer
Dynamic Trend Pivots is a professional-grade conviction analysis and structural level mapping tool. It uses pulse accumulation modeling with adaptive band construction and exhaustion-driven level placement but does not predict future price movements. Results depend on market conditions, instrument conviction characteristics, parameter selection, and disciplined execution. BOSWaves recommends deploying this indicator within a broader analytical framework that incorporates order flow context, volume analysis, and comprehensive risk management. Indicator

Value Migration Bands [AGPro Series]Value Migration Bands
Value Migration Bands is a chart-first value migration engine that visualizes where the market's accepted-value region has been drifting over time. Instead of a single moving average, it builds a three-layer band (upper / middle / lower) from a rolling percentile window of typical price, then classifies the current environment as Rising, Flat, or Falling Value using an ATR-normalized slope of the migration midline. The result is a scale-invariant, regime-aware view of how "fair value" migrates across trending and ranging conditions — on crypto, equities, indices, forex and futures alike.
🔷 OVERVIEW
Most band-style indicators build their envelope from volatility (Bollinger, Keltner, Donchian). Value Migration Bands is built from acceptance — the region where price has actually spent its time during the lookback, captured as a percentile window of typical price (hlc3). The outer bands mark the edges of that accepted-value region. The midline marks its core. When the whole region drifts upward, the market is accepting higher prices (Rising Value). When it drifts downward, lower prices are being accepted (Falling Value). When it stays level, participants are agreeing on a stable range (Flat Value).
This reframes the classic "trend vs range" question in terms of value migration, which is a cleaner structural signal than price slope alone. You see not just where price is going, but where the market's center of gravity is going.
🔶 UNIQUE EDGE
Value Migration Bands is distinct from moving-average envelopes, volatility bands and standard channels in several structural ways:
• Percentile-based construction — the band is a percentile window of typical price, not a standard deviation or ATR multiple. This directly captures acceptance, not dispersion.
• Three-state migration classification — Rising / Flat / Falling Value, driven by an ATR-normalized slope of the midline. The classification is scale-invariant, so the same sensitivity works across BTC, SPX, EURUSD, gold and small-cap equities without retuning.
• Regime-aware event markers — Reclaim and Lost markers are filtered by the current regime. Reclaim events are suppressed when the market is in Falling Value; Lost events are suppressed in Rising Value. You only see the events that matter for the active regime.
• Strict Value Filter — during extreme compression, the indicator refuses to classify a regime until the band is meaningfully wide relative to ATR. This prevents false regime flags in low-volatility micro-bands.
• Distance + cooldown gating — new event markers require a minimum ATR distance from the previous event and a minimum bar spacing, producing a clean chart even on long histories.
🔷 METHODOLOGY
Band construction:
1. Typical price (hlc3) is sampled across a configurable lookback window (Band Length).
2. Two percentiles are computed — a lower percentile and an upper percentile, selected by the Band Width Mode (Tight, Balanced, Wide).
3. The midline is the mean of those two percentiles.
4. Light EMA smoothing (adaptive to Band Length) stabilizes the visual without adding structural lag.
Regime classification:
1. The midline slope is measured over a rolling window (adaptive to Band Length).
2. The slope is normalized by ATR(14) to make the threshold scale-invariant.
3. A user-controlled Migration Slope Sensitivity divides the normalized slope into Rising / Flat / Falling bands.
4. A 2-bar confirmation layer prevents rapid regime flipping during transitions.
Event detection:
• Reclaim — price re-enters the band from below after previously being lost.
• Lost — price falls out of the band after previously being inside.
Both pass a regime gate, an ATR-distance gate and a bar-cooldown gate before being plotted or alerted.
🔶 SIGNALS & ALERTS
Four built-in alert conditions:
• Value Band Shifted Up — fires when the confirmed regime transitions into Rising Value.
• Value Band Shifted Down — fires when the confirmed regime transitions into Falling Value.
• Band Reclaimed — fires when price re-enters the accepted-value region (regime-gated).
• Band Lost — fires when price falls out of the accepted-value region (regime-gated).
Alerts and on-chart markers share identical gating, so the alert log and the chart stay in sync.
🔷 KEY INPUTS
Band Engine:
• Band Length (default 100) — lookback for the percentile window.
• Band Width Mode — Tight, Balanced, Wide. Selects the percentile pair.
• Strict Value Filter — requires a minimum band width vs ATR before classifying a regime.
• Migration Slope Sensitivity (default 0.5) — threshold between Rising / Flat / Falling.
Visuals:
• Show Midline, Show Band Fill, Active State Label, Show Reclaim / Lost Markers, Show Info Panel.
• Panel Location — six options (Top / Middle / Bottom × Right / Left).
• Panel Font Size and Label Font Size — default Normal.
Colors:
• Rising Value Color, Falling Value Color, Flat Value Color.
• Band Fill Opacity.
Alerts:
• Individual toggles for the four alert conditions above.
🔶 HOW TO USE
Structural reading:
• Rising Value — treat Reclaim events as continuation confirmations, not counter-trend signals. Expect pullbacks to the midline to be bought.
• Falling Value — treat Lost events as continuation confirmations. Expect rallies back to the midline to be sold.
• Flat Value — neither regime is active. The band can be used as a range reference; directional events are suppressed because they do not carry regime confirmation.
Location reading:
• Inside Band — price is trading within the accepted-value region. This is the default state.
• Above Band — price is trading above accepted value. In Rising Value, this is constructive; in Falling Value, it is a rally to be evaluated.
• Below Band — price is trading below accepted value. In Falling Value, this is the dominant state; in Rising Value, it is a dip.
Timeframe guidance:
• 1H–4H — best balance for swing use with the default Band Length of 100.
• 15m–1H — reduce Band Length to 40–60 for intraday use.
• Daily — Band Length 100 gives a structural multi-month migration view.
Pairing suggestions:
• Higher-timeframe VMB for bias, lower-timeframe execution tools for entry.
• Combining with volume-based or anchored-VWAP tools can confirm whether value migration is participation-backed.
🔷 LIMITATIONS & TRANSPARENCY
• This is an analytical visualization tool, not a strategy. It does not backtest, does not place orders and does not generate buy / sell recommendations.
• Regime classification is based on historical midline slope. Like all rolling measures, it is a lagging read of structure — it describes what has been happening, not what will happen.
• During abrupt regime changes, the 2-bar confirmation layer introduces a small delay by design, trading reactivity for stability.
• Percentile bands are descriptive of past acceptance. Future acceptance may differ, especially around news events, regime breaks and illiquid sessions.
• The Strict Value Filter can force a Flat reading during extreme compression even when a visual direction appears present; this is intentional and protects against false regime flags.
🔶 RISK DISCLOSURE
This indicator is published for educational and analytical purposes. It is not financial advice, not a trading recommendation and not a guarantee of performance. Trading and investing involve substantial risk, including the risk of total loss. Past behaviour of any instrument does not guarantee future results. Users are solely responsible for their own decisions and should perform their own due diligence, including independent risk management and position sizing.
Published as open-source under the Mozilla Public License 2.0. Feedback, questions and discussion are welcome in the comments.
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
