VWAP Deviation Trend [BackQuant]VWAP Deviation Trend
Overview
VWAP Deviation Trend is a volume-weighted trend-following overlay that transforms VWAP and its surrounding price distribution into a directional trailing structure.
Rather than using VWAP only as a fair-value line, the indicator calculates:
A configurable anchored or rolling VWAP.
The volume-weighted standard deviation of price around that VWAP.
Adaptive upper and lower deviation bands.
One-sided trailing boundaries used to confirm bullish and bearish regimes.
The indicator is designed to identify when price has moved far enough away from accepted volume-weighted value to establish a meaningful directional shift.
Unlike a simple VWAP crossover, price can move through VWAP without immediately changing the active trend. A new regime requires price to break the opposite trailing deviation boundary, optionally with confirmation from the direction of VWAP itself.
The updated visual engine also measures trend strength and uses it to control:
Gradient intensity.
Trail glow width.
Post-flip bloom effects.
The visual separation between price and the active trail.
Core concept
VWAP represents the average price paid over a selected period, weighted by trading volume.
The basic formula is:
VWAP = Sum of Price × Volume / Sum of Volume
Prices associated with greater volume contribute more heavily to the final value. This makes VWAP a useful approximation of:
Volume-weighted fair value.
The center of traded activity.
The average position of market participants.
An institutional execution benchmark.
However, VWAP alone does not explain how widely price has been distributed around that value.
VWAP Deviation Trend treats VWAP as the center of a volume-weighted price distribution and measures the dispersion around it. That dispersion is then used to create trailing trend boundaries.
VWAP calculation modes
The indicator supports five VWAP windows:
4 Hours
Daily
Weekly
Rolling Lookback Bars
Rolling Lookback Days
4 Hours
Resets VWAP at fixed four-hour intervals.
This can be useful for:
Cryptocurrency markets.
Intraday futures.
Continuously traded markets.
Shorter fair-value regimes.
Daily
Resets at the beginning of each calendar day.
This is the traditional intraday VWAP structure and is useful for:
Session bias.
Intraday mean reversion.
Day-trading trend confirmation.
Weekly
Accumulates volume and price across the current week.
This creates a slower structural anchor suited to:
Swing trading.
Weekly positioning.
Broader accepted-value analysis.
Rolling Lookback Bars
Calculates VWAP over a fixed number of candles.
The window moves forward continuously and does not reset at a calendar boundary.
This is useful for:
Systematic trend models.
Consistent multi-timeframe analysis.
Markets where daily sessions are less important.
Rolling Lookback Days
Includes bars that fall within a selected number of calendar days.
This keeps the analytical window tied to elapsed time instead of a fixed candle count.
Anchored versus rolling VWAP
Anchored modes begin at a fixed boundary and accumulate until the next reset.
Rolling modes continually remove old observations as new observations arrive.
Anchored VWAP is useful when a particular session or week has structural meaning. Rolling VWAP is useful when the trader wants a stable and continuously adapting lookback.
Volume-weighted deviation
The indicator calculates more than the VWAP mean.
It also measures volume-weighted price variance using:
Weighted Mean Square = Sum of Price² × Volume / Sum of Volume
Weighted Variance = Weighted Mean Square - VWAP²
Weighted Deviation = Square Root of Weighted Variance
This measures how widely prices associated with meaningful trading volume are distributed around VWAP.
A small deviation suggests:
Trading is concentrated near fair value.
The market is relatively balanced.
Price acceptance is narrow.
A large deviation suggests:
Trading is spread across a wider range.
Price discovery is more active.
The market is less tightly centered around VWAP.
Because the calculation is volume weighted, high-volume prices influence the bands more than low-volume excursions.
Fallback when volume is unavailable
If usable volume is not available, the indicator falls back to an unweighted arithmetic mean and variance.
This allows it to function on synthetic or limited-volume symbols, although the result should then be interpreted as a rolling or anchored mean rather than a true VWAP.
Deviation bands
The raw width is calculated as:
Deviation Width = Weighted Deviation × Deviation Multiplier
The upper and lower raw bands are:
Upper Band = VWAP + Band Width
Lower Band = VWAP - Band Width
Higher deviation multipliers create wider bands and fewer trend changes.
Lower multipliers create tighter bands and faster, more frequent flips.
ATR minimum width
During low-dispersion periods, volume-weighted deviation can become extremely narrow.
This can cause small and insignificant movements to trigger repeated reversals.
The optional ATR floor calculates:
ATR Floor = ATR × ATR Minimum Multiplier
The final width becomes:
Band Width = Maximum of Deviation Width and ATR Floor
This preserves volume-weighted deviation as the primary band engine while preventing the channel from collapsing below a practical volatility threshold.
Trailing-band construction
The raw deviation bands move freely with VWAP and dispersion.
The indicator converts them into one-sided trailing levels.
Lower trail
While the selected trigger remains above the lower trail:
The trail can rise.
It cannot move downward.
This creates a ratcheting support structure.
Upper trail
While the trigger remains below the upper trail:
The trail can fall.
It cannot move upward.
This creates a ratcheting resistance structure.
The active trend trail is:
The lower trail during bullish regimes.
The upper trail during bearish regimes.
Why trailing logic matters
A raw VWAP band can move toward price and create unstable signals.
The one-sided trail preserves trend structure and creates hysteresis.
Hysteresis means the threshold required to enter a bullish regime is different from the threshold required to enter a bearish regime.
This allows price to rotate around VWAP without constantly changing the active trend.
Trend initialization
When the first valid VWAP is available:
The trend initializes bullish if the trigger is at or above VWAP.
The trend initializes bearish if the trigger is below VWAP.
After initialization, a full break of the opposite trail is required to change regimes.
Bullish trend flip
A bullish flip requires:
The selected trigger to move above the upper trailing band.
The current trend not already to be bullish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bullish.
The active trail moves beneath the market.
A bullish signal marker is displayed.
Bearish trend flip
A bearish flip requires:
The selected trigger to move below the lower trailing band.
The current trend not already to be bearish.
VWAP slope confirmation to pass if enabled.
Once confirmed:
The trend becomes bearish.
The active trail moves above the market.
A bearish signal marker is displayed.
Flip trigger
The trend can be triggered using:
Close
The selected VWAP price source
Close is the more conventional option.
Using the price source, such as HLC3, can produce a slightly smoother trigger because it reflects more of the bar than the close alone.
VWAP slope confirmation
Optional slope confirmation requires VWAP itself to move in the direction of the proposed new trend.
For a bullish flip:
Current VWAP must be above VWAP from the selected lookback.
For a bearish flip:
Current VWAP must be below its prior value.
This can help reject:
Temporary band breaks.
Low-volume price spikes.
Liquidity sweeps against flat fair value.
The tradeoff is additional confirmation delay.
Breaking the trail on flips
The active trail changes from one side of the market to the other during a regime transition.
The Break Trail On Flips option inserts a visual gap on the flip bar so the previous and new trails are not connected by a misleading line segment.
This affects presentation only.
Visual trend-strength engine
The updated script includes a visual-strength model that controls the intensity of the gradient and glow.
It combines two measurements:
Distance between price and the active trail.
Slope of VWAP relative to the current band width.
Distance strength
The script measures:
Absolute Distance = |Close - Trend Trail|
This is normalized by the current band width.
A larger distance indicates stronger separation between price and the structural trail.
Slope strength
VWAP movement across the slope lookback is also normalized by the band width.
This measures whether volume-weighted fair value itself is moving meaningfully relative to the size of the current deviation structure.
Combined trend strength
The final visual strength is weighted:
70% price-to-trail distance.
30% VWAP slope strength.
This produces a value between zero and one.
It does not change trend logic or signals. It controls the visual intensity of the indicator.
Layered gradient fill
Instead of using one flat gradient, the updated indicator divides the space between the trail and price into six visual layers.
The levels are placed progressively between:
The active trend trail.
The current closing price.
The gradient is:
Most concentrated near the structural trail.
Progressively softer toward price.
The opacity adapts to trend strength.
When price is strongly separated from the trail and VWAP is moving with the regime:
The gradient becomes more vivid.
When the trend is weak:
The fill becomes softer and more transparent.
This makes the visual ribbon encode more than direction. It also reflects the current strength of the price-to-structure relationship.
Flip bloom
After a confirmed trend flip, the indicator creates a temporary bloom around the new trail.
The bloom is strongest immediately after the transition and fades over the following bars.
Its intensity follows this general sequence:
First bar after flip: strongest bloom.
Second bar: reduced bloom.
Third bar: light residual bloom.
Afterward: bloom disappears.
This visually emphasizes fresh regime changes without permanently increasing chart brightness.
The bloom is cosmetic and does not affect calculation.
Adaptive trail glow
The glow surrounding the trail also changes with trend strength.
The base width is ATR-scaled, then increases slightly as the visual trend-strength score rises.
This creates:
A broader glow during stronger regimes.
A narrower glow when trend structure is weaker.
The glow contains:
An inner, more visible layer.
A wider, softer outer layer.
Visual interpretation
The updated presentation provides several pieces of information simultaneously:
Color shows the active trend direction.
The trail shows the structural regime boundary.
Gradient intensity reflects trend strength.
Glow width reinforces structural conviction.
The bloom highlights fresh regime transitions.
How to use the indicator
Trend regime filter
Use the active color and trail position as directional context:
Favor longs during bullish regimes.
Favor shorts during bearish regimes.
Pullback structure
In a bullish regime:
VWAP represents volume-weighted fair value.
The lower trail represents deeper structural support.
In a bearish regime:
VWAP represents the mean-reversion anchor.
The upper trail represents deeper structural resistance.
Trend-strength context
A vivid gradient and broader glow suggest:
Price is well separated from the trail.
VWAP is moving in the trend direction.
The regime has stronger structural momentum.
A weak or faded gradient suggests:
Price is closer to the trail.
VWAP slope is weaker.
The trend may be consolidating or losing strength.
Fresh transitions
The bloom helps identify newly established regimes.
A fresh flip with:
Strong bloom.
Growing price separation.
VWAP slope alignment.
generally represents stronger early trend structure than a flip that immediately loses visual intensity.
Dynamic risk management
The active trail may be used as:
A trailing stop reference.
A regime invalidation boundary.
A position-management guide.
Because the trail responds to both volume-weighted dispersion and volatility, it adjusts as market conditions change.
How this differs from a standard VWAP
A standard VWAP:
Plots only volume-weighted mean price.
Usually resets once per session.
Does not maintain trend state.
VWAP Deviation Trend:
Supports anchored and rolling windows.
Calculates volume-weighted dispersion.
Creates adaptive raw bands.
Converts them into directional trailing boundaries.
Maintains persistent bullish and bearish regimes.
Adds a strength-reactive visual system.
How this differs from Supertrend
A traditional Supertrend normally uses a central price such as HL2 and ATR-based bands.
VWAP Deviation Trend uses:
Volume-weighted fair value as the center.
Volume-weighted standard deviation as the primary width.
ATR only as an optional minimum floor.
This means the trail responds not only to range volatility, but also to where trading volume has been concentrated.
How this differs from Bollinger Bands
Bollinger Bands normally use:
A moving average.
Unweighted standard deviation.
Symmetrical non-trailing bands.
This indicator uses:
A volume-weighted mean.
Volume-weighted variance.
One-sided trailing bands.
Persistent trend-state logic.
It is therefore a trend-regime model rather than a standard mean-reversion envelope.
Input guide
VWAP Mode
Selects the anchored or rolling calculation window.
Deviation Multiplier
Controls the width of the statistical bands.
Higher values produce wider, slower regimes. Lower values produce tighter and faster regimes.
ATR Minimum Width
Prevents excessive narrowing during compressed conditions.
VWAP Slope Confirmation
Requires volume-weighted fair value to move with the proposed trend.
Flip Trigger
Selects whether close or the chosen price source must cross the trail.
Visual settings
Allow the trader to display:
The trend trail.
VWAP.
Raw deviation bands.
Layered gradient.
Adaptive glow.
Signals.
Trend candles.
Strengths
Combines fair value, dispersion, and trend structure.
Uses volume-weighted mean and variance.
Supports multiple anchored and rolling VWAP windows.
Uses ATR protection against narrow-band whipsaws.
Creates persistent regimes with hysteresis.
Provides optional VWAP slope confirmation.
Includes a trend-strength-reactive visual system.
Clearly emphasizes fresh trend transitions.
Limitations
Volume quality varies between instruments.
Anchored VWAP modes may be unstable immediately after a reset.
Long windows can react slowly to sudden regime changes.
Tight settings can increase whipsaws.
Wide settings can delay reversals.
Slope confirmation can add additional lag.
Visual strength is contextual and is not a separate trading signal.
Alerts
The indicator includes alerts for:
Confirmed bullish trend flips.
Confirmed bearish trend flips.
These represent complete VWAP deviation regime changes, not ordinary crosses of VWAP.
Summary
VWAP Deviation Trend converts volume-weighted fair value and price dispersion into a directional trend trail.
It calculates VWAP over a configurable anchored or rolling window, measures volume-weighted standard deviation around that VWAP, and builds upper and lower deviation bands. An optional ATR floor prevents the structure from becoming excessively narrow during quiet conditions.
The raw bands are transformed into one-sided trails. The lower trail ratchets upward during bullish regimes, while the upper trail ratchets downward during bearish regimes. Trend changes occur only when price breaks the opposite trail, optionally with confirmation from the slope of VWAP.
The updated visual engine measures price separation and VWAP slope to dynamically control the layered gradient, trail glow, and temporary post-flip bloom. This creates a clearer representation of direction, structural strength, and fresh regime transitions without changing the underlying signal logic. Indicatore

BBI Dynamic Deviation Bands [William_wq] 这是一个什么样的指标?
简单来说,这是一个 “自带安全边界的趋势导航仪” 。
它把交易者最常用的四条不同周期的均线(超短期、短期、中期、长期)融合在一起,提炼出一条最敏锐的 多空分水岭(BBI主线) 。
为了防止大家在交易中“追高被套”或“抄底抄在半山腰”,我在这条主线的上下两侧,加上了 两层会动态变宽变窄的“安全气道”(波动通道) 。这就像是给价格装上了防撞护栏,一眼就能看出价格是处于“正常散步状态”还是“跑得太快快要累死了”。
---
这个指标怎么用?
使用这个指标非常简单,只需要看懂 颜色和位置 :
1. 看颜色认方向(顺势而为)
绿色通道:代表目前是安全的多头(上涨)趋势。
红色通道:代表目前是危险的空头(下跌)趋势。
顺势原则:绿色只买不卖,红色只卖不买。
2. 看位置找机会(买卖点定位)
回调买入点(顺势上车):
当大趋势 是绿色 时,价格每次跌回中间的“BBI主线”或者“1.0倍下轨”附近,只要跌不下去,就是极佳的“顺势买入”机会。
极端预警点(落袋为安/反转提防):
价格是有弹性的,不可能一直涨。当价格猛烈冲出最外层的 “2.0倍外轨”时,说明多头跑得太累了,这时候 千万不要去追高 ,反而应该考虑分批止盈,或者等待行情反转。
---
这个指标适合在哪里用?
适用的市场:
不管是 数字货币(BTC/ETH)、外汇黄金、还是美股/A股 ,只要有波动、有趋势的市场,它都能提供非常清晰的参考。
适用的时间周期:
日线 / 4小时线(中长线):适合上班族,用来过滤市场噪音,稳稳地抓住一波主升浪。
5分钟 / 5分钟(超短线/日内):适合职业交易员,用来捕捉当天价格波动的极端高低点,进行快速的高抛低吸。
---
交易员寄语
“交易不仅要看清方向,更要看清价格所处的位置。”
希望这个工具能成为您交易系统里的得力助手。指标虽好,但也请配合好您的资金管理和止损纪律,祝大家交易顺利!
---
What kind of indicator is this?
Simply put, this is a "trend navigator with its own safety margins" .
It merges four moving averages of different periods most commonly used by traders (ultra-short, short, medium, and long-term) into one, extracting the most sensitive bull/bear dividing line (the BBI main line) .
To prevent everyone from "getting trapped by chasing highs" or "buying the bottom halfway down the hill," I have added two layers of "safety air cushions" (volatility channels) that dynamically widen and narrow on both sides of this main line. This is like installing crash barriers for the price, making it easy to see at a glance whether the price is "walking normally" or "running too fast and about to exhaust itself."
---
How to use this indicator?
Using this indicator is very simple—you only need to understand the colors and positions :
1. Look at the color to identify the direction (Go with the trend)
Green channel: Represents a safe bullish (upward) trend.
Red channel: Represents a dangerous bearish (downward) trend.
Trend principle: Only buy and do not sell in green; only sell and do not buy in red.
2. Look at the position to find opportunities (Pinpointing entry and exit points)
Pullback buying point (Hop on the trend):
When the major trend is green , every time the price drops back near the middle "BBI main line" or the "1.0x lower band," as long as it holds, it is an excellent opportunity for a "trend-following purchase."
Extreme warning point (Take profit / Beware of reversal):
Price is elastic and cannot rise forever. When the price violently breaks out of the outermost "2.0x outer band," it means the bulls are running too tired. At this time, do not chase the high under any circumstances ; instead, you should consider taking profits in batches or waiting for a trend reversal.
---
Where is this indicator suitable for use?
Applicable markets:
Whether it is cryptocurrencies (BTC/ETH), forex and gold, or US stocks / A-shares , as long as it is a market with volatility and trends, it can provide very clear references.
Applicable timeframes:
Daily / 4-hour chart (medium to long-term): Suitable for office workers to filter out market noise and steadily catch a major rising wave.
15-minute / 5-minute chart (scalping / intraday): Suitable for professional traders to capture the extreme highs and lows of the day's price fluctuations for quick buying low and selling high.
---
Trader's Message
"Trading is not just about seeing the direction clearly, but more importantly, seeing the position where the price is located."
I hope this tool can become a powerful assistant in your trading system. Although the indicator is great, please also coordinate it with your capital management and stop-loss discipline. Wish everyone successful trading! Indicatore

Indicatore

VWAP Deviation Divergence OscillatorVWAP Deviation Divergence Oscillator
## Overview
The VWAP Deviation Divergence Oscillator turns the **deviation of price from its session-anchored Volume-Weighted Average Price (VWAP)** into a standardized, bounded oscillator, and then looks for **divergence between price and that deviation**. The idea it tests: when price makes a new extreme but sits less far from VWAP than before, the volume-weighted average is no longer confirming the move.
It is a single-pane oscillator. It requires real traded volume (use a futures contract; cash indices report none, in which case the dashboard shows "no volume"). Every data input is user-configurable, so it runs on any symbol that reports volume, in any market and on any timeframe. Defaults target NSE NIFTY index futures on intraday charts.
## What it plots
- A z-scored **VWAP deviation oscillator** (stretched above VWAP = up, stretched below = down), with a glow line and sigma-based overbought/oversold levels.
- **Extreme-zone bands** (default +/-3 sigma) with a gradient fill that deepens toward the edge.
- **Divergence lines and labels** on the oscillator - regular (reversal) and hidden (continuation), in two colors.
- **In-band reversal dots** where the oscillator turns inside an extreme zone.
- Optional **price-pane marks** at the confirmation bar (all generated by this one indicator).
- A **background-adaptive status dashboard** (oscillator value in sigma, zone, last divergence, last reversal, live distance to VWAP).
## Why these components are combined (mashup rationale)
This script combines a **derived measure**, a **normalization stage**, a **divergence engine** and a **reversal read**, because each answers a question the others cannot and none is useful here alone:
1. **VWAP deviation (price + volume).** VWAP is the volume-weighted "fair value" the session has actually transacted at - it blends price and traded volume, which a price-only oscillator does not. How far price sits from VWAP, in standardized terms, is a mean-reversion read: the deviation = price - session VWAP.
2. **Standardization (rolling z-score).** VWAP deviation differs in scale across instruments. The z-score expresses it in standard-deviation units, so "overbought/oversold" and the extreme bands mean the same thing on NIFTY, on a commodity future, or on a crypto instrument. Without this step the divergence thresholds would not transfer between symbols.
3. **Divergence engine.** The original payload is reading **price-versus-VWAP deviation disagreement at confirmed pivots**. The engine pairs each new price pivot with the oscillator value, then requires: a genuine new price extreme; the measure failing to confirm it; a minimum oscillator gap scaled to the oscillator own stdev; the two pivots within a maximum bar distance; and optionally an overbought/oversold reading at the pivot. These gates make the combination produce signal rather than noise.
4. **Reversal read.** Independently, the engine flags oscillator turns that occur inside the extreme bands - a complementary exhaustion cue.
Together the components form one pipeline: **build the signal -> make it comparable (z-score) -> surface where price and that signal disagree (divergence) and where it exhausts (reversal).** Each is incomplete alone.
## How it works (method)
deviation = price - session-anchored VWAP (which resets each session and requires real volume); this is standardized with a rolling z-score to the oscillator.
Regular and hidden divergence are detected from confirmed pivothigh/pivotlow pivots and filtered by the gates above; reversals are oscillator pivots that print inside the extreme bands. Pivots confirm a few bars after they occur, so a printed signal does not repaint. The confirmation lag equals the pivot length.
## How to use it
1. Add the indicator on a volume-bearing instrument (a futures contract); on a cash index it will read "no volume".
2. Read divergence as **context, not a trigger**: a bearish divergence (price higher high, deviation lower high) says price is less extended above VWAP than at the prior high; a bullish divergence says the opposite at lows. Confirm with your own structure, levels and risk process.
3. Tune the **pivot length**, **max gap** and **min oscillator gap** to your timeframe; raise them for fewer, cleaner signals.
## Originality
This is an original implementation - not a VWAP deviation line and not a generic divergence script, but the specific combination of VWAP deviation, sigma-standardization that makes the read portable across markets, a multi-gate divergence engine (magnitude + distance + extreme-zone), hidden-divergence and in-band reversal detection, and a background-adaptive dashboard. The code is written from scratch; helper functions use only their arguments and built-ins.
## Credits
The **Volume-Weighted Average Price (VWAP)** and **price/oscillator divergence** are standard, publicly documented techniques. This script is not affiliated with, nor endorsed by, any third party.
## Notes / limitations
- VWAP deviation needs real volume and is session-relative; it resets each session and is undefined without a volume feed.
- Divergence is descriptive context, never a guarantee of reversal.
- Confirmation lags each pivot by the pivot length.
## Disclaimer
Research and educational tool only. NOT financial advice and no guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script.
Indicatore

Monthly Statistical LevelsMonthly Statistical Levels is an open-source indicator that plots monthly reference levels based on historical monthly price extensions from the monthly open.
The goal of the script is to provide a clean statistical map for the current and recent months. It is designed as a market structure and reference-level tool, not as a buy/sell signal system.
How it works
The script uses completed monthly candles from TradingView data.
For each completed month, it calculates two historical extensions:
High extension:
Monthly High minus Monthly Open, divided by Monthly Open.
Low extension:
Monthly Open minus Monthly Low, divided by Monthly Open.
These historical extensions are stored separately for upside and downside movement.
At the start of each new month, the script uses the current monthly open and projects five reference levels:
Strong High
Avg High
Open
Avg Low
Strong Low
Avg High is based on the historical average upside extension from the monthly open.
Avg Low is based on the historical average downside extension from the monthly open.
Strong High uses the average upside extension plus a configurable standard deviation multiplier.
Strong Low uses the average downside extension plus a configurable standard deviation multiplier.
By default, the strong multiplier is set to 1.0, meaning strong levels use the historical average extension plus one standard deviation.
Lookback options
Users can choose the statistical lookback used for the calculations:
24 months
36 months
60 months
120 months
All available history
Using all available history can make the levels more stable, but it may also mix different market regimes. This is especially important for assets with structural changes, short trading histories, or very different behavior across cycles.
No lookahead logic
The indicator uses completed monthly candles to build the historical sample.
Each month keeps the levels calculated with the information available at the start of that month. The current month is used only for its monthly open, which is known once the month begins.
This means the levels are not recalculated using future monthly highs or lows.
How to use it
The levels can be used as a visual reference for monthly range structure.
Possible uses include:
Identifying where price is trading relative to its monthly statistical range.
Comparing the current month with recent monthly behavior.
Observing when price reaches average or stronger historical extension zones.
Keeping a cleaner chart with only the most recent visible months.
Main settings
Visible months:
Controls how many recent months are displayed. The default is 6 and the maximum is 12 to keep the chart readable.
Statistical lookback:
Controls the historical sample used to calculate average and strong levels.
Minimum closed months:
Defines the minimum number of completed monthly candles required before plotting levels.
Strong multiplier:
Controls how far strong levels are placed from average extension levels using standard deviation.
Labels:
Users can show labels only for the current month, for all visible months, or turn labels off.
Alerts
The script includes optional alert conditions for touches of:
Strong High
Avg High
Open
Avg Low
Strong Low
Limitations
This indicator does not predict future price movement.
It does not identify support or resistance with certainty.
It does not generate buy or sell signals.
It does not evaluate trend, fundamentals, macro conditions, liquidity, positioning, or news.
The levels depend on the TradingView symbol selected, the available historical data, and the chosen lookback window.
Why it may be useful
Many traders look at monthly opens, monthly ranges, and volatility-based zones separately. This script combines those ideas into one clean open-source tool: monthly open-based statistical levels built from completed historical monthly extensions.
It helps traders visualize where price is trading relative to its own historical monthly behavior, while keeping the chart simple and readable. Indicatore

Anchored VWAP Reversion ChannelAnchored VWAP Reversion Channel — Regime-Gated Fade Framework
## What this script does
This is an **analytical study** that frames mean-reversion ("fade") setups around an **anchored, volume-weighted regression channel**, then **gates** those setups by a statistical market-state test and **scores** them against their own forward outcomes. It does not place orders and it is not a signal service — its purpose is to let you see, on your own instrument and timeframe, whether fading a stretched move actually has an edge, instead of assuming it does.
It plots one channel (a centre line plus inner/outer residual-σ bands), marks fade setups at the outer band, draws supporting context (volume-profile POC / value area, untested prior-session POCs, momentum divergences, liquidity sweeps, and multi-timeframe trend lines), and reports a compact validation panel.
## Why these components are combined (mashup rationale)
Fading an extreme is really three separate questions, and no single classic indicator answers all three. Stacking look-alike indicators just echoes one input, so this tool deliberately combines **three non-redundant lenses and makes them check each other**:
1. **WHERE is price stretched?** — A **volume-weighted polynomial regression** anchored at the most recent swing pivot, with **residual-σ bands**. Because the curve tilts with the active leg, an outer-band tag stays meaningful even inside a trend, where a flat cumulative VWAP would not. A **volume profile** anchored to the *same* window supplies POC and value area, and prior-session POCs that have never since been traded through become **reversion targets**.
2. **Is a reversion actually firing here?** — Three orthogonal **tells** evaluated only at the band: a **close-back rejection**, a **band-confluent momentum divergence**, and an **equal-high/low liquidity sweep** (stop-run). Crucially, all three are derived from the same stretch, so their agreement is shrunk by a **design-effect correction** (effective-sample-size): three correlated echoes are not allowed to masquerade as three independent confirmations.
3. **Is the market in a reverting state at all?** — A **regime gate** combining a **variance-ratio test** and a **reversion-trust correlation** only lets a fade through when recent increments are offsetting (mean-reverting) rather than compounding (trending).
The pieces are not bolted together side by side: they share **one geometry** (the anchored channel) and **one volatility unit** (residual σ / ATR), and each can veto the others. A band tag with no tell does nothing; a tell with no reverting regime does nothing. The design goal is to **suppress** low-quality fades — into a trend, mid-range, or backed by a single echoed tell — more than to generate them.
## The honesty layer (what makes this more than a drawing)
Every fade that fires is logged and, a fixed horizon later, **resolved**: its forward return is measured in ATR units and tabulated **with the regime gate ON versus OFF**, reporting follow-through %, whipsaw %, a Wilson 95% confidence interval, and the **mean return per fade**. A per-fade series also exports to the Data Window so you can study the full return distribution offline. The gate has to **beat its own ungated baseline** to justify itself — the framework is built to be tested, not trusted blindly.
## How to use it
1. Set the **Price source** (group 01). It works on any symbol and any market; volume-based parts need a real volume feed.
2. A fade **arms** when price tags the outer band **and** at least one tell prints, then **passes** only if the regime gate reports a reverting state. Solid triangles are gated fades; the target is the centre line or the nearest untested POC.
3. Read the panel top-down: does **Gate ON** beat **Gate OFF** on both follow-through and mean R, with non-overlapping intervals and a reasonable sample size? If not, the edge is not present on this symbol/timeframe — change them rather than forcing the trade.
4. The signal lives on **higher intraday timeframes**; one-minute data is mostly noise.
## Defaults
Shipped tuned for **NSE:NIFTY** index futures on intraday timeframes (sources, pivot lengths, value-area %, and the Tuesday-style weekly session context reflect that instrument). Every value is exposed as an input — change the **Price source** and the relevant lengths to run the framework on any other instrument or market.
## What is original
The original work is the **coordination**, not any single formula: an anchored polynomial-regression channel used as a reversion frame, three decorrelated band tells fused by a design-effect shrink, a statistical regime gate, and a built-in A/B + forward-return validation harness — combined so each lens can veto the others and the whole thing reports its own hit rate. It is not a re-skin of one indicator.
## Concept credits (techniques are standard; this implementation is original)
Anchored VWAP (standard); volume-weighted least-squares / polynomial regression (standard); residual-σ channel (standard); Volume Profile, Value Area and POC — Market Profile, Steidlmayer / CBOT; Variance-Ratio test — Lo & MacKinlay (1988); design effect / effective sample size — Kish (1965); proportion confidence interval — Wilson (1927); ATR trailing stop / Supertrend (classic, used for the multi-timeframe context lines); RSI — Wilder; Stochastic — Lane.
## Disclaimer
For research and education only. This is an analytical study, **not** financial advice, **not** a recommendation, and **not** a guarantee of future results. All statistics shown are **in-sample** on loaded history, close-to-close, without costs or slippage — a study aid, not a backtest. Mean reversion fails in trends and through regime breaks. Do your own research and manage your own risk.
Indicatore

Elaris Mean Reversion ProElaris Mean Reversion Pro
Elaris Mean Reversion Pro is a multi-factor mean reversion indicator designed to help traders identify situations where price has moved significantly away from its statistical mean and may be entering a potential reversion phase.
The indicator combines adaptive deviation bands, volatility measurements, momentum filters, market regime analysis, and optional higher-timeframe confirmation to provide a structured framework for analyzing stretched market conditions.
Unlike simple overbought and oversold tools, Elaris Mean Reversion Pro allows users to customize how extremes are measured through Z-Score, ATR-based, or hybrid deviation models while incorporating optional confirmation layers such as RSI, MFI, volume, ADX, and higher-timeframe trend filters.
Key Features
• Multiple mean calculation methods including EMA, SMA, RMA, WMA, VWMA, and HMA.
• Three deviation models:
* Z-Score Bands
* ATR Bands
* Hybrid Bands
• Mean reversion signal engine with multiple confirmation styles:
* Extreme Touch
* Mean Reclaim
* Candle Rejection
• Optional RSI and MFI extreme-condition filters.
• ADX-based market regime filter to help identify environments where mean reversion conditions may be more relevant.
• Optional volume and volatility filters.
• Higher-timeframe confirmation framework.
• Signal quality scoring system.
• Dynamic mean, deviation bands, and reversion zones.
• Built-in dashboard displaying:
* Market state
* Z-Score
* Distance from mean
* Momentum readings
* Regime status
* Higher-timeframe bias
• Alert conditions for:
* Long mean reversion signals
* Short mean reversion signals
* Upper extreme zones
* Lower extreme zones
How It Works
The indicator calculates a central mean and measures how far price has deviated from that mean using statistical or volatility-based methods.
When price reaches an extreme deviation zone, the indicator evaluates additional confirmation factors such as candle behavior, momentum conditions, volatility, volume, and trend regime before generating a signal.
Signals are intended to highlight potential mean reversion conditions and should be evaluated alongside the trader's own market analysis and risk management process.
Non-Repainting
This indicator uses confirmed bar logic and higher-timeframe requests with lookahead disabled. Signals are generated using closed-bar information and do not intentionally repaint historical signals.
Notes
Mean reversion techniques may behave differently across various market conditions. Strong directional trends, high-impact news events, and volatility expansions can influence market behavior and should always be considered when interpreting indicator outputs.
This tool is designed for market analysis and educational purposes only and does not constitute financial advice.
Indicatore

XRS Pro Anchored VWAP + Dev Bands + EMA/SMA - MTF FixedXRS Pro Anchored VWAP + Dev Bands + EMA/SMA is a multi-session VWAP and moving-average tool designed for intraday futures and auction-market analysis.
This indicator plots multiple anchored VWAPs with optional standard deviation bands, giving traders a clean way to track session value, mean reversion zones, and higher-timeframe VWAP structure.
Included VWAP anchors:
• 9:30 AM New York session VWAP
• 6:00 PM Globex session VWAP
• Weekly VWAP
• Monthly VWAP
The VWAP engine uses a selectable lower-timeframe calculation source, defaulted to 1 minute, to help keep VWAP behavior consistent across chart timeframes.
Key features include:
• Auto session VWAP switching
• 9:30 anchored VWAP with ±1 and ±2 standard deviation bands
• 6:00 PM Globex anchored VWAP with ±1 and ±2 standard deviation bands
• Weekly and monthly VWAP options
• Optional EMA/SMA overlays, including EMA 9, EMA 21, EMA 30, EMA 50, EMA 200, SMA 50, and SMA 200
• Custom VWAP colors, band colors, widths, and fills
• Optional right-side extension for active VWAP and bands
• Price-scale labels hidden by default for a cleaner chart
• Alerts for VWAP touches and outer 2σ band touches
This tool is useful for traders who use VWAP, deviation bands, auction-market theory, session value, mean reversion, and trend context. It can help identify areas where price may be extended, balanced, reverting to value, or reacting around important anchored VWAP levels.
This indicator does not provide automatic buy or sell signals. It is intended as a discretionary analysis tool for market context, trade filtering, and confluence.
Disclaimer: This script is for educational and informational purposes only and does not constitute financial advice. Trading involves risk. Use at your own discretion.
Indicatore

Kalman Auction Ribbon [JOAT]Kalman Auction Ribbon is an open-source Pine Script v6 overlay that builds a six-layer adaptive ribbon from a zero-lag source and Kalman-style velocity smoothing. The goal is to show trend alignment, slope strength, deviation zones, and confirmed retest behavior in one restrained chart layer.
The script focuses on auction behavior around a dynamic ribbon. When the ribbon layers align and slope together, the state becomes directional. When price stretches beyond the deviation envelope and then returns, the script can mark supply or demand zones for later retests.
Core Concepts
1. Zero-Lag Source
The source is adjusted by comparing current price with a half-length historical value. This produces a more responsive input for the ribbon calculations.
zeroLagOffset = math.max(1, int(math.round(baseLength * 0.50)))
zeroLagSource = src + (src - nz(src , src))
2. Kalman-Style Velocity Estimate
Each ribbon layer uses a compact velocity smoother that maintains an estimate and speed component. The speed term helps the estimate respond to directional movement without relying on future bars.
prior = na(estimate ) ? value : estimate + nz(speed ) * gain
error = value - prior
speed := nz(speed ) * (1.0 - alpha * 0.50) + error * alpha * gain
estimate := prior + error * alpha
3. Six-Layer Ribbon Alignment
The script calculates six different ribbon lengths. Alignment and slope scores are combined into a trend score from -100 to +100. This score controls the ribbon color and dashboard power reading.
4. Deviation Zones
Upper and lower deviation levels are built around the ribbon midpoint using ATR. If price pushes beyond a deviation level and closes back inside, the script creates a compact supply or demand zone.
5. Retest Logic
Retest signals occur when price interacts with a live zone or the ribbon itself while the ribbon state remains directional. These signals are confirmed on closed bars.
Features
Six-layer adaptive ribbon: Multiple Kalman-style layers reveal alignment and spread
Velocity weighting: Gain input changes how aggressively the smoother responds
Deviation envelope: ATR-based upper and lower zones around the ribbon midpoint
Soft supply and demand boxes: Created only on confirmed deviation rejection behavior, with overlap suppression so the chart does not stack redundant boxes
Labeled deviation boxes: Supply and Demand Deviation boxes include midpoint guide lines and fade after invalidation
Confirmed buy/sell markers: Compact BUY and SELL dots appear only after confirmed ribbon or zone retest behavior
Trend-state candles: Optional bar coloring by ribbon state
Dashboard: Shows state, power, distance, and retest status
Alerts: Confirmed buy, confirmed sell, lower deviation zone, and upper deviation zone
Input Parameters
Core:
Source: Price source used by the ribbon
Base Length: Main length from which all ribbon layers are derived
Velocity Weight: Strength of the speed component
Deviation ATR Length: ATR length for deviation zones
Deviation Width: ATR multiplier for the envelope
Zones:
Show Deviation Zones: Toggles supply and demand boxes
Zone Extension Bars: How far active boxes extend to the right
Maximum Zones Per Side: Caps active supply and demand boxes
Signals:
Show Confirmed Buy/Sell: Toggles compact confirmed signal dots
Signal Spacing Bars: Minimum spacing between signal markers
Zone Extension Bars: Forward box extension length
Maximum Zones Per Side: Object cap for zone storage
Visual:
Palette: Selects the color pair
Show Ribbon: Toggles ribbon plots and fill
Trend-State Candles: Enables candle coloring
Dashboard: Shows the top-right panel
How to Use This Indicator
Step 1: Read Ribbon Alignment
A strongly stacked ribbon with a high dashboard power value indicates directional alignment. A mixed ribbon shows a less decisive state.
Step 2: Watch Deviation Zones
Zones are created when price rejects beyond an ATR deviation envelope. These boxes represent areas where price stretched away from the ribbon and returned.
Step 3: Use Retests With Context
Retest dots identify confirmed interactions with the ribbon or zones. They should be evaluated with trend state, market structure, and risk placement.
Indicator Limitations
Kalman-style smoothing is reactive and does not know future price direction
Strong news bars can move through deviation zones without meaningful retests
Object limits require older zones to be removed when the maximum is exceeded
The ribbon can compress during range conditions and produce mixed readings
Originality Statement
Kalman Auction Ribbon is original in its combination of zero-lag preprocessing, six independent Kalman-style layers, ATR deviation boxes, and confirmed retest tracking. It uses public Pine primitives in a custom structure and does not paste or disguise another author's source.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Ribbon states and zones can fail during unusual volatility or thin liquidity. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
Indicatore

Equilibrium Deviation Engine [LB]
Concept
The Equilibrium Deviation Engine is a session-resetting, volume-weighted equilibrium model that builds a dynamic fair value basis from accumulated price and volume since the last anchor point (daily by default). Around this basis, it constructs multiple deviation bands and an independent extreme contrarian channel whose width varies inversely with short-term volatility — expanding during quiet markets and contracting during turbulent ones.
Mathematical Foundation
At each new session (e.g., daily open), the engine resets three accumulators and recalculates them bar by bar :
PV = SUM(Price * Volume)
V = SUM(Volume)
P2V = SUM(Price^2 * Volume)
The equilibrium basis is the volume-weighted average price since reset :
Basis = PV / V
The standard deviation of price around this basis is derived from the variance :
Var = max( (P2V / V) - Basis^2 , 0 )
Dev = sqrt(Var)
Three main bands are then computed by applying adaptive multipliers to this deviation. The adaptation uses two independent weights :
TWAP Weight — compares the basis to a hidden TWAP. The larger the gap relative to the deviation, the more the bands widen, capturing potential mean-reversion targets.
HV Weight — compares current historical volatility (HV) to its own smoothed baseline. When HV expands, bands widen ; when HV contracts, bands narrow.
The final band width for level k is :
D_k = Dev * Mult_k * TWAP_Weight * HV_Weight
The Extreme Contrarian Channel
A separate channel is built using an inverse volatility weight. Instead of expanding with rising HV, it contracts :
InvWeight = clamp( 1 / (HV_contrarian / HV_contrarian_baseline) , min, max )
This creates a structural envelope that is widest during low-volatility regimes (where price tends to range) and tightens during high-volatility regimes (where price breaks through normal boundaries). The inner and outer levels use user-defined sigma multipliers.
What Problem Does It Solve ?
Traditional deviation bands (Bollinger, Keltner, VWAP bands) use fixed lookback windows and a single volatility metric. They do not reset at session boundaries, nor do they distinguish between different volatility regimes for mean-reversion versus breakout scenarios. The Equilibrium Deviation Engine solves this by :
- Resetting accumulators at each session (e.g., daily), producing a true volume-weighted equilibrium for the current period.
- Adapting band width to both the TWAP gap (directional drift) and HV regime (market excitement).
- Adding a separate contrarian channel using inverse volatility, specifically designed to identify exhaustion zones where low volatility precedes expansion, or where extreme HV signals climax conditions.
How To Interpret
Basis line (white) — the real-time volume-weighted fair value for the current session. Price above basis signals session bullishness ; price below signals session bearishness.
Deviation bands 1, 2, 3 — graduated zones of overextension from the basis. Price reaching Band 3 represents an extreme statistical deviation from the session's equilibrium, often preceding reversion.
Extreme contrarian channel — a separate envelope that behaves inversely to short-term HV. When this channel is wide (low HV, quiet market), price tends to oscillate within it, making the boundaries attractive mean-reversion levels. When the channel narrows sharply (high HV, excited market), it signals compression before a potential breakout.
Band expansion vs contraction — widening bands indicate increasing dispersion and adaptive uncertainty ; narrowing bands indicate consolidation and equilibrium tightening.
Parameters
LB Engine
Source — price field used for calculations (default HLC3).
Reset TF — timeframe at which accumulators reset (default Daily).
Hidden TWAP Length — period for the TWAP used in the TWAP gap weight.
Historical Volatility Length — period for HV calculation (main bands).
HV Smoothing — smoothing period for the HV baseline.
LB Bands
Deviation 1, 2, 3 — base multipliers for the three main deviation levels.
LB Contrarian Channel
Extreme Channel Inner/Outer — sigma multipliers for the contrarian channel.
Use Main HV Weight — applies the main HV weight to the contrarian channel.
Use Hidden TWAP Weight — applies the TWAP gap weight to the contrarian channel.
Contrarian Inverse HV Length — period for the HV used in the inverse weighting.
Contrarian Inverse HV Smooth — smoothing period for the contrarian HV baseline.
Contrarian Inverse HV Min/Max — clamping limits for the inverse weight.
LB Style
Show Basis, Show Main Fills, Color Bars — visual toggles.
Basis Width, Band Width, Extreme Channel Width — line thickness controls.
Reference
This indicator is a proprietary design by Luis Barlier. It synthesises concepts from session volume-weighted average price (VWAP), adaptive volatility bands, and inverse volatility regime detection. It does not correspond to a single academic publication. Indicatore

MIDAS Fibonacci Cloud [JOAT]MIDAS Fibonacci Cloud
Introduction
MIDAS Fibonacci Cloud is an open-source VWAP-based analytical tool that combines a MIDAS-anchored volume-weighted average price with six Fibonacci-scaled standard deviation bands, a Z-score probability engine, and a synthetic order flow score to produce an integrated picture of institutional value, statistical deviation, and directional pressure on a single overlay.
The problem this solves is band relevance. Standard VWAP deviations use fixed multipliers (1×, 2×, 3× standard deviation) that carry no structural meaning in market terms. Replacing those multipliers with Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 1.0, 1.618) means the band levels correspond to proportional retracement relationships that institutional participants commonly reference. The 1.618 band in particular acts as an extreme extension zone where reversion probability, quantified by the built-in Z-score engine, typically exceeds 99.7%.
Core Concepts
1. MIDAS VWAP with Configurable Anchoring
The VWAP calculation uses the MIDAS method — cumulative volume-weighted price that resets at a user-selected anchor point rather than running as a continuous session VWAP. The anchor can be set automatically (based on the current timeframe), manually to a specific higher timeframe, or to a precise date. This allows the VWAP to be anchored to any significant market event.
The variance term used for standard deviation is computed directly from the volume-weighted sum of squared prices, producing a statistically correct VWAP standard deviation:
float midasVwap = sumVolPrice / sumVol
float variance = (sumVolSq / sumVol) - math.pow(midasVwap, 2)
float stdDev = math.sqrt(math.max(0, variance))
2. Fibonacci Deviation Bands
Six band pairs are computed above and below the VWAP anchor using the standard deviation scaled by a global sensitivity multiplier and each Fibonacci ratio. Upper bands are colored in the bull theme color with decreasing opacity from band 1 to band 6; lower bands in the bear theme color with the same gradient. A gradient fill connects the outer zone (fib4–fib6) to visually highlight the extreme deviation region.
3. Z-Score and Bell Curve Probability
Each bar's Z-score is computed as the signed distance from the VWAP in units of standard deviation. The dashboard converts this to a mean-reversion probability using standard normal distribution thresholds: within 1σ = 68.2%, within 2σ = 95.4%, within 3σ = 99.7%, beyond 3σ = 99.9%.
4. Synthetic Order Flow Score
A bar-level order flow score is computed from three components: candle body-to-range ratio (directional conviction), volume relative to the 20-bar average (institutional participation), and wick rejection percentage (price acceptance or rejection). These are weighted 40/35/25 and scored 0 to 100. VWAP crossover signals are gated by this score — crossovers with low order flow scores are filtered as noise.
5. Gradient Fill Zones
The two outer Fibonacci bands (fib4 and fib6) are connected with a gradient fill that creates a visual glow effect identifying the extreme deviation zones — the regions where price is statistically most likely to be overextended.
Features
MIDAS VWAP with three anchor modes: Auto (timeframe-adaptive), Timeframe (manual higher TF), Date (specific date anchor)
Six Fibonacci deviation band pairs: Levels at 0.236, 0.382, 0.500, 0.618, 1.000, 1.618 × standard deviation × global sensitivity
Gradient fill on extreme zones: Color-to-transparent gradient between fib4 and fib6 identifies overextension zones
Z-score and reversion probability: Computed every bar with bell curve probability output (68.2% / 95.4% / 99.7% / 99.9%)
Synthetic order flow gate: Body ratio, volume participation, and wick rejection combined into a 0-100 score that gates VWAP cross signals
Candle coloring by Z-score: Bar colors intensity-coded by distance from VWAP — neutral near center, saturated at extremes
Band labels at right edge: Each band level labeled with its Fibonacci ratio and price value, updated each bar
Anchor reset marker: Vertical marker in elite theme color at each VWAP reset point
Four color themes: Phantom, Neon, Classic, Solar
Non-repainting: VWAP and bands computed cumulatively from anchor; no future data referenced
Institutional dashboard: 8-row table showing VWAP price, distance %, Z-score, reversion probability, order flow score, and market state
Input Parameters
Anchor Settings:
Anchor Method: Auto / Timeframe / Date
Manual Timeframe: Timeframe to anchor to when method is Timeframe
Manual Date: Specific timestamp when method is Date
Fibonacci Multipliers:
Global Sensitivity: Scales all band widths proportionally (default: 1.2)
Fib Level 1 through 6: Individual Fibonacci ratios (defaults: 0.236, 0.382, 0.500, 0.618, 1.000, 1.618)
Visual Styles:
Color Theme: Phantom / Neon / Classic / Solar
Highlight Candles: Toggle candle coloring by Z-score
Show Band Labels: Toggle right-edge price labels on each band
Table Position and Size
How to Use This Indicator
Step 1: Choose Your Anchor
For intraday scalping, use Auto or Daily anchor. For swing trading, use Weekly or Monthly. For event-driven analysis, use Date and anchor to a specific earnings release, FOMC announcement, or major swing point.
Step 2: Read Band Levels as Statistical Reference
The 0.5 band is one half standard deviation from VWAP — a mild deviation typical of normal trending behavior. The 1.618 band is the extreme extension zone. Price at the 1.618 band has a statistical reversion probability above 99.7%, but this does not mean reversion is imminent or guaranteed.
Step 3: Check the Reversion Probability
Read the Reversion Prob row in the dashboard. As Z-score rises above 2, reversion probability exceeds 95.4%. This quantifies how unusual the current deviation is relative to the full history from the anchor point.
Step 4: Confirm with Order Flow Score
The Order Flow score reflects whether the current bar has institutional characteristics. A high score (above 60) during a VWAP cross suggests genuine participation. A low score (below 30) during a cross suggests a potentially false signal.
Indicator Limitations
The VWAP standard deviation widens significantly with the anchor period. Bands anchored to a six-month period will be very wide; bands anchored to one day will be tight. The global sensitivity parameter must be adjusted accordingly
The Z-score probabilities assume normally distributed returns, which markets do not produce. Fat tails mean extreme Z-scores occur more frequently than the percentages suggest
The synthetic order flow score uses tick volume as a proxy for actual order flow. On assets with low tick frequency, this approximation is less reliable
VWAP-based analysis is most relevant for liquid instruments
This indicator does not generate entry or exit signals. It provides statistical deviation context
Originality Statement
Replacing standard deviation band multipliers with Fibonacci ratios (0.236 through 1.618), scaled by a volume-weighted standard deviation from a MIDAS anchor, is not replicated in existing open-source Pine Script v6 VWAP publications
The combination of Z-score computation, bell curve probability quantification, and a synthetic order flow score as a gate for VWAP cross signals within a single indicator is an original integration
The candle coloring gradient driven by Z-score intensity provides real-time deviation awareness directly on price bars without requiring a separate oscillator panel
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Statistical deviation probabilities are based on a normal distribution assumption that financial markets do not satisfy. Past VWAP behavior does not predict future price action. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicatore

Indicatore

Structural Inefficiency Radar [JOAT]Structural Inefficiency Radar
Introduction
Structural Inefficiency Radar measures regression fair value, residual z-score, path asymmetry, volatility clustering, and repair/extension force.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Regression Fair Value
A linear regression spine represents statistical fair value.
2. Residual Z-Score
Distance from fair value is normalized by residual standard deviation.
3. Path Asymmetry
Upward and downward path movement are compared to detect directional distortion.
4. Repair and Extension Force
Deviation, slope, asymmetry, and clustering determine whether price is extending or repairing.
z = (close - fairValue) / residualDeviation
Features
Fair-value spine
Inner and outer inefficiency bands
Residual z-score
Repair and extension scoring
E+ and E- labels plus repair markers
Input Parameters
Regression and residual windows
Deviation gate
Repair quality gate
Cooldown
Bands, candles, and HUD toggles
How to Use This Script
Use the spine and bands to frame structural stretch. Extension labels indicate directional inefficiency; gold markers indicate fair-value repair.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
SIR is original in combining regression residuals, path asymmetry, clustering, repair force, and extension force.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicatore

Caelum Bias Ribbon [JOAT]Caelum Bias Ribbon
Introduction
Caelum Bias Ribbon is a multi-timeframe ALMA consensus ribbon. It evaluates whether 15m, 1H, 4H, 1D, and 1W horizons are aligned, mixed, or overheated.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. ALMA Deviation States
Each timeframe creates an ALMA center and deviation threshold to classify bullish, bearish, or neutral state.
2. Consensus Voting
The script counts aligned timeframes to identify broad directional agreement.
3. Overheat Tracking
Directional runs are counted so stretched multi-timeframe conditions can be marked without predicting reversal.
4. Ribbon Visualization
Colored ALMA ribbons and fills show agreement without heavy labels.
consensus = bullCount >= gate ? 1 : bearCount >= gate ? -1 : 0
Features
Five-timeframe ALMA ribbon
Consensus and mixed-state detection
Overheat markers
Consensus candle coloring
Compact dashboard
Input Parameters
Deviation factor
ALMA length, offset, and sigma
Deviation length
Overheat run threshold
Display toggles
How to Use This Script
Use Caelum as a directional filter. Strong agreement supports trend-following context; mixed readings warn that timeframes are not aligned.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Caelum is original in combining ALMA deviation states, multi-horizon voting, run-length overheat logic, and a clean ribbon display.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
Indicatore

Indicatore

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 TradingView — 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. Indicatore

Cadence Reversion Cartography [JOAT]Cadence Reversion Cartography
Introduction
Cadence Reversion Cartography is an open-source mean-reversion and exhaustion overlay designed to locate stretched conditions around an EMA envelope and anchored VWAP framework. It focuses on mapping where price has moved too far from local balance, then grades whether a return toward value has enough supporting evidence to matter.
The problem this script solves is selective reversal timing. Price can stay overextended for longer than expected, so simple band-touch logic is not enough. Cadence Reversion Cartography combines envelope stretch, VWAP stretch, RSI exhaustion, volume impulse, rejection-candle behavior, reclaim logic, and projected response boxes so the user can distinguish weak touches from stronger reversion candidates.
Core Concepts
1. Dual Stretch Model
Price is compared to both an EMA deviation envelope and an anchored VWAP deviation layer. A long-side exhaustion condition requires price to stretch below both lower references. A short-side exhaustion condition requires price to stretch above both upper references.
2. Exhaustion Quality Filters
RSI can require oversold or overbought context, volume can require impulse relative to average participation, and candle structure can require a visible rejection profile.
3. Reclaim And Signal Grading
A setup becomes actionable only after price closes back inside the envelope on a confirmed bar. The script then scores the setup by counting how many filters aligned and promotes stronger signals to a prime grade.
4. Projection Mapping
When a setup forms, the script can draw a forward projection with a risk box, reward box, signal zone, and reclaim line. This is meant to show the structure of the reversion idea rather than acting as a promise of outcome.
Features
EMA reversion envelope: Basis plus statistical deviation bands
Anchored VWAP stretch layer: Secondary value reference around VWAP
RSI exhaustion filter: Optional momentum exhaustion gate
Volume impulse filter: Optional participation confirmation
Rejection-candle filter: Optional candle-structure confirmation
Signal grading: Standard and prime long or short responses
Signal zones and reclaim lines: On-chart response structure around the active setup
Risk and reward projection boxes: Optional forward mapping of stop and target structure
Context candle coloring: Candles can tint with stretch state
Dashboard: Displays stretch, setup bias, and active context
Input Parameters
Reversion Envelope:
Channel Length
Deviation Multiplier
VWAP Stretch Multiplier
Filters And Display:
RSI settings
Volume average and impulse multiplier
Rejection-candle requirement
Projection-box toggle, stop percent, reward multiple, projection length, and signal cooldown
Dashboard, background, candle-color, and signal-zone toggles
How to Use This Indicator
Step 1: Wait for price to stretch beyond both the EMA envelope and the VWAP stretch layer.
Step 2: Check whether RSI, volume, and rejection filters support the move.
Step 3: Wait for confirmed re-entry back inside the envelope instead of fading the first touch.
Step 4: Use the signal grade and projection structure to judge whether the setup is marginal or stronger.
Step 5: Use the basis and reclaim line as the first balance reference after entry.
Indicator Limitations
Strong directional trends can keep price stretched for extended periods and delay reversion
Volume-based confirmation is less meaningful on symbols with irregular volume reporting
Projection boxes are planning tools, not guaranteed outcomes
This script is designed for reversion analysis and is not intended to replace broader trend context
Originality Statement
Cadence Reversion Cartography is original in how it coordinates envelope stretch, VWAP stretch, filter-based exhaustion grading, and forward projection structure inside one reversion workflow. The components are combined to answer one analytical problem: not just whether price is stretched, but whether the stretch is mature enough to support a structured return toward value.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Reversion setups can fail during strong trends or regime expansion, so all signals should be used with independent confirmation and risk management.
-Made with passion by jackofalltrades
Indicatore

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.
Indicatore

Order Flow VWAP Deviation [LuxAlgo]The Order Flow VWAP Deviation indicator provides a comprehensive toolkit for analyzing market structure through volume-weighted price levels, liquidity zones, and order flow imbalances.
It combines classic VWAP standard deviation bands with dynamic stop-run detection and localized volume profiles to identify high-probability reversal and expansion zones.
🔶 USAGE
The tool is designed for intraday and swing traders who focus on liquidity "sweeps" and mean reversion. By plotting significant pivot highs and lows (Stop Zones) alongside VWAP bands, the indicator highlights areas where institutional liquidity is likely resting.
When price pierces these zones on high volume, the script flags a potential stop-run, signaling that a trend exhaustion or reversal may be imminent.
🔹 Stop Zones and Liquidity
The script tracks historical pivot points and extends them as dashed lines. When price crosses these lines with a volume surge (defined by the Stop Zone Volume Multiplier), it indicates that resting orders have been triggered.
These events are marked with circles on the chart to alert the trader to a shift in order flow.
🔹 Anchor Volume Profile
A specialized Volume Profile anchors to a specific time range (e.g., New York Open). This profile appears on the right side of the chart, highlighting the Point of Control (POC) in yellow and high-volume "Stop Nodes" in orange.
Each significant node displays a volume multiplier (e.g., 2.5x) and a buyer/seller bias (B/S) to show which side of the market is dominant at that price level.
🔹 Inversion Fair Value Gaps (IFVGs)
The indicator can optionally track Fair Value Gaps that have been "inverted." An IFVG occurs when a bearish gap is closed above or a bullish gap is closed below.
These act as refreshed support or resistance levels and are visualized as boxes on the chart until they are mitigated by price action.
🔶 DETAILS
The script utilizes a proxy for delta volume, calculating the bias based on the relationship between the close and the high/low of each bar within the profile calculation.
The Stop Zone logic uses a lookback period to ensure only significant structural pivots are considered, preventing chart clutter while focusing on major liquidity pools.
🔶 SETTINGS
VWAP Anchor: Determines the period for VWAP calculation (Session, Week, Month, or Year). Std. Dev Multiplier: Sets the distance for the upper and lower deviation bands. Pivot Lookback: The number of bars used to identify significant highs and lows for stop zones. Max Active Lines: Limits the number of horizontal liquidity levels displayed on the chart. Profile Rows: Adjusts the vertical granularity of the anchored Volume Profile. Anchor Time Range: Specifies the exact time (HHMM) used to start the volume collection for the profile. Stop Zone Volume Multiplier: Defines the threshold relative to average volume required to highlight a "Stop Node" in the profile. Show IFVGs: Toggles the visibility of Inversion Fair Value Gaps. IFVG Volatility Filter: A multiplier used to ensure only gaps formed by significant price moves are tracked. Indicatore

Covenant Participation Lattice [JOAT]Covenant Participation Lattice
Introduction
Covenant Participation Lattice is an open-source participation-axis engine that builds a rolling price-distribution profile, stabilizes the point of control, and maps value-area structure around that axis. It is designed to show where price is accepted, where it is stretched, and whether current auction conditions are balanced, premium, or discounted.
Core Concepts
1. Rolling profile construction
A distribution of volume by price is rebuilt over a configurable lookback and row count. The profile identifies a raw point of control and the surrounding value area used to classify current price position.
2. Stabilized axis logic
Rather than plotting the raw POC directly, Covenant stabilizes the axis using staged adjustments constrained by ATR. This reduces noisy jumps while preserving meaningful auction shifts.
3. Premium, discount, and acceptance diagnostics
The script calculates how much volume sits above, below, and inside value. This allows the chart to distinguish accepted trade inside value from premium or discount extension away from it.
4. Corridor rendering
Guide lines and corridor fills visually connect the participation axis with the value-area bounds so the trader can see auction balance without reading the dashboard first.
Features
Rolling profile and stabilized participation axis
Value-area high, low, and midpoint structure
Premium/discount share analysis
Balance tilt and tail-skew diagnostics
Ribbon and top-right dashboard
Confirmed alerts for axis reclaim, value-area breaks, and deep extension
Disclaimer
This indicator is educational and informational only. Participation and value-area relationships describe auction context; they do not guarantee reversal or continuation.
- made with passion by officialjackofalltrades Indicatore

Indicatore

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. Indicatore

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