Confluence Matrix Multi-Timeframe RegimeCONFLUENCE MATRIX — Multi-Timeframe Regime & Accuracy-Weighted Bias
================================================================================
WHAT THIS SCRIPT IS
A multi-timeframe decision panel. Across a fixed ladder of nine timeframes
(1m, 3m, 5m, 15m, 30m, 60m, 120m, 240m, Daily) it measures the same five
technical factors — trend, momentum, structure, volume flow and mean-reversion —
normalises each to a comparable scale, and fuses them into one directional bias
per timeframe. It then compares the timeframes to each other: how strongly they
agree (a confluence meter), how many of the nine are aligned, and whether the
fast timeframes are turning against the slow ones (a transition). It flags moves
that are exhausted, shows where volatility is compressing, and reports past-only
how often the overall bias has actually been followed through on the current
symbol, with a confidence interval.
WHY THE COMPONENTS ARE COMBINED (how the parts work together)
These are not separate indicators stacked in one pane. They are five reads of
the same question — "what is price doing and should I trust it?" — chosen
because they fail in different conditions, so combining them removes each
other's blind spots, and reading them across a full timeframe ladder removes the
blind spot of any single chart:
- TREND: an ATR SuperTrend blended with a moving-average stack. The SuperTrend
flips with less lag than a moving average alone; the stack confirms direction.
- MOMENTUM: MACD histogram + RSI + Stochastic. A three-oscillator read is harder
to whipsaw than any one of them.
- STRUCTURE: location of price within the recent range — acceptance in the
middle versus pressure at the edges.
- VOLUME FLOW: money-flow combined with position relative to the anchored VWAP,
i.e. whether price is above or below the session's volume-weighted fair value.
- MEAN-REVERSION: deviation from an adaptive equilibrium whose responsiveness
scales with the efficiency ratio. This is the counterweight that fades
extension — correct in a range, wrong in a trend.
Because a factor that helps in one regime hurts in another, the fusion is
governed by two layers that decide how much to trust each factor:
1. REGIME WEIGHTING. Each timeframe classifies its own regime from the
efficiency ratio, ADX and relative volatility, and reweights the factors
accordingly — trend and momentum lead in a trend, mean-reversion leads in a
range, and confidence is damped when volatility is elevated. A daily that is
trending and a 5-minute that is ranging are therefore scored by different
logic, which is the whole point of a multi-timeframe read.
2. PROVEN-ACCURACY WEIGHTING. The script tracks, on past bars only, how often
each individual factor's signal has been followed through on THIS symbol, and
scales that factor's weight by its measured hit-rate. So the fusion becomes
regime x proven-accuracy: on a symbol where, historically, mean-reversion has
paid and trend has not, the panel learns that and weights accordingly. This
is what turns a generic vote into a calibrated, symbol-aware read.
Two further layers handle the traps and the timing:
- EXHAUSTION. A fully-aligned stack that is also over-extended is the classic
"everything agrees right at the turn" trap. Exhausted timeframes are marked,
and the confluence meter is damped so that alignment-with-exhaustion is not
mistaken for high conviction.
- SQUEEZE. A read of where Bollinger bands sit inside Keltner channels —
volatility compression that tends to precede expansion. This adds timing
(when a move may start) to the directional read (which way).
The cross-timeframe layer then turns the nine composites into one verdict:
overall direction, a confluence meter, an alignment count, and a fast-versus-slow
transition flag. Calibration of the overall bias keeps the headline honest by
measuring its real follow-through on the current symbol.
HOW IT WORKS (mechanics, briefly)
Each timeframe's factors are computed with standard confirmation and requested
non-repainting; history does not change after the fact. The per-symbol accuracy
weights and the headline follow-through are built by recording a signal's
direction when it forms and checking, a fixed number of bars later, whether
price travelled a chosen ATR multiple in that direction, then aggregating into a
rate with a Wilson confidence interval. All thresholds are ATR-relative, so
nothing is tied to a particular price scale.
HOW TO USE
1. Read the headline bar (overall bias) and the CONFLUENCE meter, then scan the
Bias column down the ladder for a long aligned run.
2. A "!" on a Bias cell means that timeframe is exhausted; high alignment with
exhaustion is lower conviction, and the meter already reflects that.
3. Watch STATE (FULL STACK / TRANSITION) and the SQUEEZE row for timing.
4. Weight the read by FOLLOW-THROUGH — the overall bias's measured hit-rate here.
5. Everything is descriptive context, not a signal to act on.
USE ON ANY MARKET
The Price source input drives the trend, momentum, mean-reversion and structure
reads, so you can run the panel on standard candles, Heikin-Ashi, or another
price series across stocks, indices, futures, forex and crypto. High, low and
volume stay native for the range and flow factors, and a volume-borrow input
supplies volume for symbols that report none.
WHAT MAKES IT ORIGINAL
The contribution is the fusion, not the individual factors, which are standard.
Here the same regime-adaptive, volatility-normalised composite is computed
identically across a timeframe ladder, then weighted further by each factor's
past-only, per-symbol accuracy, with exhaustion damping and explicit alignment,
transition and squeeze context. A multi-timeframe panel that learns which
factors to trust on each symbol, and that damps alignment when a move is
exhausted, is the part that is not available elsewhere.
SETTINGS WORTH KNOWING
- Timeframe Ladder: the nine timeframes are editable.
- Fusion: toggle proven-accuracy weighting, exhaustion damping and the squeeze
read; the higher-timeframe emphasis slider controls how much slow timeframes
count in the overall (0 = equal weighting).
- Calibration: horizon and minimum follow-through define what counts as a
"followed-through" signal for both the accuracy weights and the headline rate.
- External signals (optional): three source inputs accept directional exports
from other indicators and blend them into the overall composite at the chart
timeframe; price sources are auto-ignored.
- Visuals: theme is auto/dark/light; size is Tiny/Small/Normal; the identity
strip shows the script name, symbol and timeframe.
NOTE ON TIMEFRAMES BELOW THE CHART
A timeframe lower than the chart returns its most recent value rather than a full
aggregated history. For a fully historical view of the fast rows, load the
indicator on a low chart timeframe; for a live current-state read, every row is
valid at any chart timeframe.
LIMITATIONS
Higher-timeframe values reflect the developing bar in real time; history is
non-repainting. Volume flow and anchored VWAP need real (or borrowed) volume. The
accuracy weighting and follow-through describe PAST behaviour only — they are not
a backtest and not a probability of future results. Every read is probabilistic
context, never a certainty.
DISCLAIMER
This is a study / indicator for chart analysis and education only. It is not a
strategy, not a recommendation, and not financial advice. It places no orders and
guarantees no outcome. Markets carry risk, and the past behaviour of a signal
does not assure its future behaviour. Do your own research and manage your own
risk.
Indicator

Support and Resistance Retest Breakout Signals [AlgoAlpha]🟠 OVERVIEW
This script identifies support and resistance zones using pairs of swing highs and swing lows that occur within a volatility-adjusted price tolerance. Instead of drawing levels from a single pivot, it waits for two matching swings to confirm a zone, helping filter out isolated highs and lows that may have little significance.
Each zone contains a buy/sell volume balance estimate calculated from lower timeframe data. This provides additional context about the activity that formed the zone and helps visualize whether buying or selling pressure was more dominant during its creation.
The script also tracks how price interacts with existing zones after they form. When price fully breaks through a zone and later retests it, bullish or bearish retest signals are generated based on the direction of the breakout.
🟠 CONCEPTS
Swing Matching — Two swing highs or two swing lows must occur within a volatility-adjusted tolerance before a resistance or support zone is created.
Volatility-Adjusted Tolerance — The script uses the standard deviation of price over a lookback period to determine how close swing points must be to qualify as the same zone.
Support and Resistance Zones — Zones are built from the full price structure around matched swing points rather than from a single horizontal price level.
Volume Balance — Lower timeframe buying and selling volume is aggregated between the two swings that formed the zone to estimate directional participation.
Breakout Retest Logic — Price must first move completely beyond a zone, then close through it, and finally revisit the zone before a retest signal is confirmed.
🟠 FEATURES
Support and Resistance Zones — Highlights confirmed support and resistance areas formed from recurring swing lows and swing highs.
Volume Balance Display — Shows buy and sell volume balance bars inside each zone for visual participation analysis.
Retest Signals — Displays signals when price breaks above a zone and successfully retests it.
🟠 HOW TO USE
Watch for newly formed support and resistance zones to identify areas where price has repeatedly reacted.
Compare the buy/sell balance bars inside each zone to understand the volume profile that formed the level.
Look for bullish retest signals after price breaks above a resistance zone and returns to test it from above.
Look for bearish retest signals after price breaks below a support zone and returns to test it from below.
Use larger Time Horizon values to focus on major market structure and smaller values to detect more frequent zones.
Enable overlap prevention when you want fewer but more distinct zones on the chart.
Use alerts to monitor new zones and confirmed retest events without continuously watching the chart.
🟠 CONCLUSION
Support and Resistance Retest Breakout Signals combines volatility-adjusted zone detection, lower timeframe volume balance analysis, and breakout retest confirmation into a single workflow. It identifies areas where price has repeatedly reacted, measures the participation behind those areas, and tracks whether breakouts successfully hold during retests. This gives traders a structured view of support, resistance, and post-breakout behavior. Indicator

Adaptive Stochastic Calibrated, Regime-Aware & Embedded-Trend# STOCH ARC — PulseWire Publication Description
> Copy the section between the lines into PulseWire's "Description" box when you
> publish. It is written to satisfy the house-rules that caused the previous
> rejection: it states **why** the components are combined and **how they work
> together**, explains **what it does / how / how to use / why it is original**,
> and ends with the required disclaimer. A publishing checklist (clean chart +
> visible symbol/timeframe/name) is at the very bottom — that part is for YOU, do
> not paste it.
---
## Adaptive Stochastic — Calibrated, Regime-Aware & Embedded-Trend (STOCH ARC)
### What it is
A Stochastic oscillator rebuilt so that "overbought/oversold" means something for
the instrument you are actually trading, and so that it stops fading trends. A
classic Stochastic has two well-known failures: the 80/20 levels are arbitrary for
any given symbol, and in a real trend the oscillator **embeds** (pins at an
extreme) and keeps going — so mechanically fading every extreme walks straight
into the move. STOCH ARC addresses both, then wraps a regime filter, a
trend-trail, multi-timeframe agreement and a transparent conviction score around
the result so one panel answers a single question: **fade this extreme, ride the
trend, or stand aside.**
It runs on **any symbol, asset class, timeframe and market** — equities, indices,
futures, FX, crypto, commodities. The raw data source and every external feed are
user-selectable (details under *Settings*), and nothing is hard-coded to a
particular market.
### Why these components are combined (mashup rationale)
This is not a pile of indicators stacked for show. A raw Stochastic only tells you
"price sits high or low inside its recent range" — which is ambiguous between a
range (fade it) and a trend (it embeds and continues). Each layer removes one
specific weakness of the layer before it and feeds the next:
1. **Calibrated OB/OS** — instead of fixed 80/20, the overbought/oversold lines are
rolling percentiles of the oscillator's *own* recent distribution. "Extreme" now
means statistically rare **for this symbol on this timeframe**, which is what
makes the levels portable across markets.
2. **Embedded-trend detector** — counts how long the oscillator stays beyond a
calibrated band. A pinned oscillator is the signature of a trend, not a
reversal, so when it is embedded the fade signals are suppressed. This is the
piece that stops the classic "fade into a trend" mistake.
3. **Low-lag digital smoothing + optional Inverse Fisher Transform** — de-noise the
%K/%D so the calibration and the crosses react to real turns rather than tick
noise. (The Inverse Fisher option is off by default because it deliberately
saturates the oscillator, which flattens the calibrated percentiles.)
4. **Regime engine** — an efficiency-ratio / trend-strength / volatility-cluster
classifier labels the market Trend / Range / Volatile and decides *which* of the
two playbooks is live: fade extremes in a range, ride pullbacks in a trend.
5. **Adaptive Trend Trail** — an adaptive moving average wrapped in a
volatility-scaled trailing band, computed **on the oscillator**. It supplies the
oscillator's own trend direction and the continuation (ride) trigger, and its
band width auto-scales with oscillator volatility so it behaves consistently
across assets.
6. **Multi-timeframe agreement + conviction score with hard vetoes** — higher
timeframes must not contradict the signal, and a weighted score (stretch,
embedment, trend-trail alignment, MTF, optional feeds) is gated by hard vetoes
(e.g. a volatility-index spike or an opposing higher timeframe). The output is a
single verdict instead of a wall of separate readings.
Each block consumes the output of the previous one; remove any single layer and a
specific, nameable failure of the plain Stochastic comes back. That is the
justification for combining them.
### What it plots
- **Lower pane:** the smoothed %K / %D, the calibrated overbought/oversold bands
(shaded), the adaptive trend-trail line, a midline and faint 80/20 references,
embedded-zone shading, and signal/divergence markers on the oscillator.
- **On the price chart:** "context bands" — the oscillator's range projected back
onto price (rolling high/low are %K 100/0, and the calibrated OB/OS levels mapped
to price via `low + level% × range`), so you can see at a glance how stretched
price is. Fade/continuation markers, divergence lines, and a compact dashboard
with the live numbers (%K/%D, calibrated zone, stretch, trend-trail, embedded
state, empirical reversal stats, MTF bias, dominant cycle, suggested size and any
active veto) round it out.
### How it is original
- The overbought/oversold thresholds are **self-calibrating percentiles of the
symbol's own oscillator distribution**, not fixed 80/20.
- It **explicitly detects embedment** and flips from fading to riding, instead of
fading every extreme.
- It carries an **empirical reversal-probability tracker** that reports, from this
symbol's own history, how often a calibrated extreme actually reversed — so the
zones are accountable rather than assumed.
- The whole thing resolves to **one regime-aware verdict with hard vetoes**, rather
than leaving you to reconcile several separate sub-indicators by eye.
### How to use it
1. Add it to any chart and timeframe. Read the **VERDICT / MODE** rows on the
dashboard first.
2. In a **Range** regime, the engine looks to **fade** calibrated extremes
(oscillator beyond the OB/OS band while not embedded), confirmed by a %K/%D cross
and/or divergence.
3. In a **Trend** regime, it looks to **ride** — a trend-trail cross or a shallow
pullback in the trend direction; fades are suppressed while the oscillator is
embedded.
4. Treat the conviction score and any active **VETO** as a filter: low conviction or
an active veto means stand aside. The suggested size is an ATR-based reference for
journaling, not an order.
5. Use the alerts (fade/ride, %K/%D cross, trend-trail cross, divergence) to be
notified instead of watching.
### Settings (use on any asset / market)
- **Raw data source** — `close`, `hl2`, `hlc3`, `ohlc4`, or point it at **another
indicator's plot**. This is what makes the script work on any instrument or as a
smoother/filter on top of your own series.
- **Stochastic source** — Price (classic Stochastic) or RSI (StochRSI).
- **Smoother** — Low-lag / 2-pole / SMA, with an optional roofing pre-filter and an
optional Inverse Fisher Transform.
- **Calibration** — overbought/oversold percentiles and the lookback used to learn
the symbol's distribution.
- **Regime / trend-trail / conviction weights** — all exposed if you want to tune.
- **Optional feeds (blank = off):** a *volatility-index symbol* (for a spike veto)
and a *cross-asset symbol* (for confluence). Both are blank by default so the
script is fully self-contained on any market; fill them only if you want them.
### Notes
- It is a **study / indicator**, not a strategy, and it places no orders.
- Signals are evaluated on bar close by default to avoid intrabar repainting of the
alerts; higher-timeframe reads use confirmed values.
---
### Disclaimer
This script is provided for educational and informational purposes only. It is a
technical-analysis study, not financial, investment, or trading advice, and not a
recommendation or solicitation to buy or sell any instrument. No indicator can
predict markets; past behaviour and any historical statistics shown do not
guarantee future results. Trading involves substantial risk of loss. You are
solely responsible for your own decisions — do your own research and consider
consulting a licensed financial professional before trading. The author accepts no
liability for any loss arising from use of this script.
Indicator

Adaptive Bollinger Bands Calibrated and Regime-Aware# Adaptive Bollinger Bands — Robust, Calibrated & Regime-Aware (BB ARC)
## What this is
Most Bollinger Band tools plot a simple moving average plus or minus two standard deviations and assume price is normally distributed. Real price is not: it has fat tails, it is skewed, and a single spike distorts the width. BB ARC is a full reworking of the Bollinger idea that measures the **actual distribution** of the symbol on your chart, builds statistically honest bands from it, proves how well those bands describe the market in real time, and then decides whether a band touch should be **faded** (range) or **ridden** (trend). Everything is universal: the price source and all optional reference feeds are user-selectable, so it runs on any symbol, any market and any timeframe.
It plots the bands and signals on the price chart and an analytics oscillator (%B or band-z) in a lower pane, with a single dashboard that turns all of it into one read.
## Why these components are combined (mashup rationale)
A raw band only says "price is far from its average." On its own that is ambiguous: in a quiet range a touch of the band mean-reverts, but in a strong trend price "walks the band" and keeps going. Giving the same signal in both situations is the classic Bollinger weakness. BB ARC combines several layers specifically because each one removes a weakness the others cannot, and they feed each other in sequence:
1. **Honest band engine** — replaces the naive standard-deviation width with a choice of robust (median / MAD), asymmetric (separate upside/downside deviation, capturing skew), empirical-quantile (width set so the band actually contains your chosen percentage of bars), or EWMA-volatility estimators, plus a kurtosis-adaptive multiplier that widens the band when tails are fat. This makes the *distance* of a touch statistically meaningful instead of an arbitrary 2-sigma.
2. **Calibration layer** — because the bands now claim to contain a certain fraction of price, the script measures the **realized containment %** on the current symbol, plus skew and kurtosis, so the band proves its own validity instead of asking you to trust a textbook assumption.
3. **Regime filter** (efficiency ratio + ADX + volatility clustering) — decides whether the market is ranging, trending or volatile, and therefore whether the correct response to a band touch is to fade it or ride it. This is what resolves the Bollinger paradox above.
4. **Mean-reversion math** — an Ornstein-Uhlenbeck half-life estimate quantifies how many bars a touch typically takes to revert (and reports "trending" when there is no clean reversion), and band-walk persistence counts how long price has been pinned to a band. Together they tell you whether a reversion is realistically tradable.
5. **Multi-timeframe confluence** — checks %B agreement across four timeframes and draws higher-timeframe band rails on your chart, so a signal is not taken against the larger structure.
6. **Conviction engine** — blends the stretch, regime fit, MTF agreement, half-life quality, calibrated edge, volume thrust and order-flow into a single 0-100 score with hard vetoes, so you get one decision rather than several conflicting indicators.
None of these layers is decorative; remove any one and the others lose context. That interdependence is the reason they are published together rather than as separate scripts.
## What it does, step by step
- Builds a basis (SMA / EMA / rolling VWAP / robust median) and three band tiers using the deviation engine you select.
- Computes **%B** and **bandwidth**, a signed **band-z** (how many multiples beyond the basis, using the correct up or down deviation), realized **containment %**, **skew/kurtosis**, **half-life**, **band-walk** streaks, an empirical **reversion probability** (how often, historically on this symbol, a band touch returned toward the basis within N bars), and a **squeeze** state with an expansion-direction read.
- Classifies the **regime** and auto-selects **Fade** (range reversion) or **Ride** (trend continuation) logic.
- Detects regular **%B divergence** and can draw it as lines connecting the pivots on price.
- Produces a **verdict** (LONG / SHORT / VETO / FLAT) with a conviction score and tier, and fires alerts on bar close.
## How to use it
1. Add it to any chart. The bands appear on price, the %B/band-z analytics in the lower pane, and the dashboard in the corner.
2. Read the **REGIME** and **MODE** rows. In a Range regime the engine looks to **fade** outer-band touches back toward the basis; in a Trend regime it looks to **ride** band-walks in the trend direction.
3. Use the calibration rows as a confidence check: a high containment %, a short half-life and a favourable reversion probability support a fade; "trending" half-life and persistent band-walk support a ride.
4. Treat the **CONVICTION** score and **VETO** as the gate — a high score with no veto is the cleanest setup; a veto explains why a tempting touch is being skipped.
5. Optional: enter a volatility-index symbol and/or a correlated instrument in the feed settings to add a volatility-spike veto and cross-asset confluence. Both are blank (off) by default, so nothing market-specific is assumed.
## What makes it original
- A **multi-engine, statistically honest** band (robust, asymmetric semideviation, empirical quantile, EWMA, fat-tail-adaptive) rather than a single SMA±kσ.
- **Live self-calibration**: the band reports the percentage of bars it actually contained, on the current symbol, so its claim is verifiable.
- An **Ornstein-Uhlenbeck half-life** read that turns "far from the mean" into "expected to revert in about X bars, or not at all."
- An **empirical reversion-probability** statistic built from the chart's own history.
- A **regime-driven fade/ride auto-switch** and a single **conviction score with vetoes**, so the same band touch is interpreted correctly in different market states.
## Settings overview
Grouped as: Core (price source, basis, adaptive length), Band Engine (deviation engine, multipliers, quantile %, EWMA lambda, fat-tail), Regime, Mean-Reversion, Calibration, Squeeze, Signals, MTF, Conviction (weights and minimum), Risk (used for sizing and alert context), Optional Reference Feeds (volatility index, cross-asset — both off by default), and Display (bands, fills, divergence-as-lines toggle, adaptive dashboard, legend, identity label).
## Universal data source
The whole engine runs on a user-selected **price source** (close, hl2, hlc3, ohlc4, or even another indicator's output), and the optional reference feeds are typed in by the user, so the script is not tied to any one instrument or exchange. It also degrades gracefully on instruments without volume.
## A note on the chart used for publishing
The published chart shows only this script. The bottom-centre label prints the script name, the symbol and the timeframe so it is always clear what is plotted. No unrelated drawings or third-party indicators are added.
## Disclaimer
This script is a technical study for educational and informational purposes only. It is not financial, investment or trading advice, and it is not a strategy or a solicitation to buy or sell any instrument. The signals, levels, conviction scores and statistics it displays are derived from past price and volume on your chart and do not guarantee any future result. Markets involve risk; you are solely responsible for your own decisions and risk management. Test thoroughly before relying on any tool.
Indicator

Regression Trend Reversal Signals & Forecasts [AlgoAlpha]🟠 OVERVIEW
Regression Trend Reversal Signals & Forecasts combines multiple regression methods into a single trend and reversal framework. It allows traders to choose between Linear Regression, Theil-Sen Regression, LOESS smoothing, Nadaraya-Watson smoothing, Polynomial Regression, and a Kalman Filter to estimate the underlying price path.
The selected regression line acts as the center of a dynamic channel. The channel width is based on the standard deviation of the distance between price and the regression line, allowing it to adapt to changing market conditions.
The script also identifies potential reversal conditions when price extends beyond the channel and then shows signs of rejection. In addition, it can project the current regression slope forward to provide a simple forecast of the current trend path.
🟠 CONCEPTS
Regression Line — A statistical estimate of the underlying price trend. Different methods can be selected, ranging from straight-line regressions to adaptive smoothing techniques.
Theil-Sen Regression — A robust regression method that uses median slopes from all point pairs, reducing the influence of outlier price spikes.
LOESS Regression — A locally weighted regression that fits nearby observations more heavily than distant observations to create a smooth trend curve.
Nadaraya-Watson Smoothing — A kernel-weighted averaging method that estimates trend by assigning larger weights to recent observations.
Kalman Filter — A recursive estimation method that continuously updates the trend estimate as new prices arrive.
Polynomial Regression — A curved regression model that can capture non-linear trend structures using higher-order polynomial functions.
Regression Deviation Bands — Channel boundaries calculated from the standard deviation of price relative to the regression line.
Regression Slope — The rate of change of the regression estimate used to determine trend direction and forecast projections.
🟠 FEATURES
Regression Channel — Dynamic bands expand and contract based on how far price deviates from the regression line.
Trend Flip Signals — Generates directional markers when the regression trend changes from rising to falling or from falling to rising.
Reversal Signals — Marks potential bullish and bearish reversals when price extends beyond the channel and begins rejecting those extremes.
Forecast Projection — Extends the current regression slope into future bars and optionally displays projected channel boundaries.
🟠 HOW TO USE
Select a regression method that matches the market behavior you want to analyze. Linear and Theil-Sen are suited to directional trends, while LOESS, Nadaraya-Watson, and Kalman provide smoother adaptive estimates.
Use the regression line as the primary trend reference. Rising regression values indicate strengthening conditions, while falling values indicate weakening conditions.
Monitor the channel boundaries for extended price movement away from the regression estimate.
Watch for bullish reversal markers below the lower band after downside extensions and bearish reversal markers above the upper band after upside extensions.
Use trend flip signals as confirmation that the regression slope has changed direction.
Compare price location within the channel to gauge whether price is trading near trend equilibrium or at an extreme deviation.
Use the forecast projection as a continuation estimate of the current regression slope rather than a prediction of future market behavior.
🟠 CONCLUSION
Regression Reversal Signals combines multiple regression techniques, adaptive deviation channels, reversal detection, and forward projections into a single framework. By allowing traders to switch between several trend estimation methods, it provides different perspectives on trend structure and price deviation. The indicator helps identify trend direction, potential reversals, and areas where price has moved unusually far from its estimated path. Indicator

Adaptive Equilibrium Deviation OscillatorAdaptive Equilibrium Deviation Oscillator (AEDO)
What it is
AEDO is a mean-reversion oscillator. It plots one core reading — the standardized distance between price and its own adaptive equilibrium — and then surrounds that reading with context filters whose only job is to stop the two ways mean-reversion entries usually fail. It is symbol- and timeframe-agnostic: the price source and the optional reference symbols are all selectable in Settings, so it can be applied to any market.
What it plots
The oscillator line: how far price sits from its adaptive equilibrium (an EMA or linear-regression fair value), expressed in standardized units. Zero = at equilibrium; positive = stretched above; negative = stretched below.
Adaptive bands: the threshold beyond which the stretch is treated as "extreme." The bands widen and narrow with volatility, so an extreme reading means the same thing in quiet and busy conditions.
Signal markers: a triangle when the oscillator turns back across a band (a reversion attempt); a small circle for the same event in a less favorable regime.
Divergence lines/labels between the oscillator and price.
A dashboard showing the script name, symbol and timeframe, plus the live equilibrium, volatility state, regime, higher-timeframe bias, confluence grade and a reference fade stop/target.
Why these components are combined (mashup justification)
This is not a collection of independent indicators stacked together. Every part is subordinate to one idea — measure the deviation from equilibrium, and only act on it when the surrounding context supports reversion. Mean-reversion fails in exactly two situations, and each component addresses one of them:
Fading a genuine trend. A stretched oscillator in a strong directional move is a trap, not an opportunity. The ADX regime gate and the higher-timeframe trend filter prevent counter-trend fades, so the oscillator's extremes are only acted on when the market is actually ranging and the bias agrees.
Mistaking a normal pullback for an extreme. A fixed band misreads volatility. The volatility-adaptive bands rescale the "extreme" threshold using either this instrument's own ATR relative to its average, or an optional external volatility index — so the deviation reading keeps a consistent statistical meaning as conditions change. The robust (median/MAD) standardization does the same on the deviation series itself, resisting fat-tailed spikes.
The remaining parts refine confidence in that single reading rather than generating separate signals:
Divergence between price and the oscillator, and a 0–N confluence grade, require independent agreement before a signal is graded as strong.
An optional secondary-symbol spread check (e.g. a future vs. its underlying, or two correlated assets) adds a structural sanity filter; it is off by default and contributes nothing on single-asset charts.
Confirmation filters (confirm-on-close, clearance beyond the band, optional session-open skip) make signals non-repainting and reduce noise.
The calibration tracker logs each signal on past bars and, after a fixed horizon, records whether price actually followed through by a chosen ATR amount — reporting a historical hit-rate with a Wilson 95% confidence interval, binned by confluence grade.
Together they form one decision: price is far from equilibrium → is the context one where reversion is plausible → how much independent agreement is there → how has this exact condition resolved historically. Remove any one piece and the remaining system is measurably more exposed to one of the two failure modes above.
What is original here
The oscillator is built around an adaptive equilibrium with statistically standardized deviation and volatility-scaled bands, rather than a fixed-scale momentum formula.
The confluence grade uses a dynamic denominator, so enabling/disabling the optional spread filter doesn't artificially inflate the grade.
The built-in calibration tracker with Wilson confidence intervals is descriptive transparency: it lets you check, per confluence tier, how the flagged condition resolved on past data before trusting it — a measurement layer most oscillators don't include.
How to use it
Add it to any chart and timeframe. Leave the price source at close to start.
Reversion entries: look for the oscillator turning back across a band (a marker prints). Treat triangles (favorable regime) as higher-quality than circles.
Confluence: the dashboard shows the long/short grade; raise Min confluence to allow signal to filter to only higher-agreement setups.
Volatility: keep "Instrument (self)" for any standalone asset, or switch to "External symbol" and enter a volatility index for your market.
Secondary spread (optional): enable it and enter a related symbol only if a cross-symbol structure check is meaningful for your instrument.
Validate before trusting it: open the Calibration Tracker group, enable Show calibration panel, set Min confluence to 0, and let it accumulate signals. Read the per-tier hit-rates and confidence intervals on your own symbol/timeframe before relying on any signal. A wide or near-50% interval means the condition has no measured reliability on that market.
Settings overview
Price source · equilibrium type & length · standardization mode & window · band levels · volatility source (self/external) & band multipliers · optional secondary-symbol spread · ADX regime & higher-TF trend gate · confirmation filters · confluence & multi-timeframe agreement · divergence · calibration horizon & follow-through · visuals.
Notes / limitations
Mean-reversion logic suits ranging conditions; the gates reduce but do not eliminate trend risk.
Signals confirm on bar close and do not repaint; external-symbol requests use no look-ahead.
After load, the oscillator needs its standardization window (default 200 bars) to warm up; the dashboard "Data" row shows readiness.
Disclaimer
This script is provided for educational and informational purposes only. It is not financial, investment, or trading advice, and it is not a recommendation to buy or sell any instrument. The calibration figures are descriptive statistics of past bars and do not predict future results. Trading involves substantial risk of loss. Test thoroughly and use your own judgment; you are solely responsible for your decisions. Indicator

Guppy MMA Mean Reversion SignalsThe Guppy MMA Mean Reversion System is a trend-following mean reversion tool designed to identify high-probability pullbacks within established trends. By combining the classic Guppy Multiple Moving Average (GMMA) with volatility, volume, and momentum filters, this script aims to reduce the "noise" often found in standard moving average cross strategies.
The Concept: Why this Works
Standard GMMA indicators are excellent for visualizing trend strength but often lack precise entry triggers or filters to avoid entering during periods of low volume or extreme exhaustion. This script addresses these limitations by integrating four distinct analytical components:
- GMMA Ribbons (Trend & Reversion Zones) : We use two groups of EMAs (Short-term and Long-term). The Long-term group defines the "institutional" trend. Our entry logic looks for price to revert from the short-term trend back into the long-term trend zone—a classic sign of a healthy pullback.
- CVD Confluence (Volume Confirmation) : Using Cumulative Volume Delta (CVD) based on candle-body delta approximations, the script ensures that volume flow supports the entry direction. This prevents entering pullbacks that lack the necessary buying/selling pressure to resume the trend.
- ATR Volatility Filter (Statistical Spacing) : To avoid "choppy" entries, this filter requires the price to be at a statistically significant distance from the EMA based on market volatility (ATR). This ensures you are entering at a true "discount" rather than in a sideways market.
- RSI Exhaustion Filter (Momentum Safety) : We utilize RSI to ensure that a reversion hasn't reached an overextended state. For example, it prevents buying a pullback if the RSI indicates the asset is already in an overbought exhaustion phase.
How to Use
- Long Entries (Green Circles) : Triggers when the Long-term ribbon is bullish, and price pulls back to touch the Long-term EMA group, provided the CVD, ATR, and RSI conditions are met.
- Short Entries (Red Circles) : Triggers when the Long-term ribbon is bearish, and price rallies to touch the Long-term EMA group, filtered by volume and momentum.
- Exits (Labels) : Exit signals appear when price successfully reverts back to the "fast" Short-term group, marking the completion of the mean reversion move.
Key Features & Customization
- Independent Toggles : You can independently turn on/off buy signals, sell signals, and their respective exits to suit your specific trading style (e.g., only trading the long side).
- Signal Cooldown : Includes a customizable "bar count" cooldown to prevent multiple overlapping signals during high-volatility periods.
- Comprehensive Settings : Fully adjustable EMA lengths, ATR multipliers, and RSI thresholds to adapt the system to different timeframes and asset classes (Crypto, Forex, Stocks).
Settings Guide
- Use ATR Filter : Increase the multiplier for more conservative, wider entries.
- Use CVD Filter : Enable to ensure volume delta is trending with your entry.
- Use RSI Filter : Helps avoid "catching falling knives" by filtering out trades during extreme momentum spikes. Indicator

Bollinger Band [scoopup]Overview
A Bollinger Bands–based indicator that shows trend direction (up/down) through the basis line color, displays band width (volatility) as a percentage, and marks the most recent meaningful lows (demand zones) on the weekly and daily timeframes as boxes. It lets you view statistical volatility and the real low zones where buying previously stepped in — all on a single chart.
Default settings are Length 21 and StdDev 1.618, based on the Fibonacci number (21) and the golden ratio (1.618).
Components
1. Bollinger Bands (Upper / Basis / Lower)
Defaults: Length 21, StdDev 1.618
Upper band, basis (middle), and lower band. The bands widen and narrow with volatility.
2. Basis Line Trend Color (Daily-based)
The color of the middle basis line indicates trend direction.
Logic: over a set lookback, it compares the cumulative size of the "close-to-lower" area (red) versus the "upper-to-close" area (green).
Red area dominant → uptrend → basis line GREEN
Green area dominant → downtrend → basis line RED
The longer the close stays near the lower band (larger red area), the more it is read as base-building before a move higher.
This color is always calculated from Daily data, regardless of the chart timeframe. Whether you view it on the 15m, 1h, or 4h chart, the daily trend color stays consistent.
3. Fill
Upper band ↔ close: semi-transparent green
Close ↔ lower band: semi-transparent red
Lets you quickly read where the close sits within the bands.
4. Band Width (%)
Formula: (Upper − Lower) / Basis × 100
Displays the current band width in a corner table as Band Width: X.XX%.
Lower = volatility contraction (squeeze) → often precedes a large move; higher = volatility expansion.
The Data Window also shows band width % and band width (price difference), including on historical bars.
5. Recent Lows
Weekly recent low = yellow box / Daily recent low = red box
Shows only the most recent pivot (swing) low that sits below the current close. (Lows above the close are skipped; if the latest low is above the close, the prior low is used instead.)
Box height spans the low ↔ the close at that point, and extends to the right to show a still-valid support/demand zone.
How to Read It
Basis green + close near the lower band → watch for a potential bounce after base-building.
Basis red + close near the upper band → watch for overextension/pullback risk.
Band Width % contracting (squeeze) → watch for an upcoming volatility expansion.
Recent low boxes (yellow/red) act as first support candidates on a pullback. A close below the box signals support failure.
Key Settings
Bollinger Bands: Source, Length (default 21), StdDev (default 1.618), Band Color / Width / Style
Basis Line: Show Basis, Basis Width, Ratio Length, Up / Down Color
Fill: Show Fill, Upper / Lower Fill Transparency
Band Width: Show Band Width %, Table Position, Text Size
Recent Lows: weekly/daily toggles, Pivot Length, Box Color
Tips
This is a supporting tool for reading trend direction + volatility + support zones together, not a standalone trade signal.
Reliability increases when the daily trend color and a recent low box line up in the same area.
Adjust StdDev and Ratio Length to fit each instrument's volatility.
Disclaimer
This indicator is for reference only and does not guarantee trading profits. All trading decisions and responsibility rest solely with the user. Indicator

Nadaraya-Watson Regression Liquidity Sweeps [AlgoAlpha]🟠 OVERVIEW
This script combines Nadaraya-Watson regression, momentum analysis, and liquidity level tracking into a single workflow. It measures the slope of a smoothed price regression curve, converts that slope into a normalized oscillator, and uses momentum shifts to identify areas where liquidity may be resting.
The oscillator is built from the rate of change of the Nadaraya-Watson estimate rather than price itself. This allows momentum transitions to be measured relative to the underlying regression trend. When momentum weakens after an extended move, the script records swing-based liquidity levels that can later be swept by price.
A volatility-adjusted Nadaraya-Watson band is also displayed on the chart. This provides context for trend direction, momentum strength, and potential rebound conditions around the regression value.
🟠 CONCEPTS
Nadaraya-Watson Regression — A kernel-based smoothing method that estimates an underlying price curve by weighting nearby historical data more heavily than distant data.
Normalized Regression Slope — The change in the Nadaraya-Watson estimate divided by its recent standard deviation, allowing momentum strength to be compared across different market conditions.
Liquidity Sweep Level — A horizontal level created from a swing high or swing low when momentum begins to weaken, representing an area that may later attract price.
Oscillator Signal Line — An EMA of the normalized oscillator used to identify momentum crossovers and momentum phase changes.
Rebound Condition — A signal generated when price moves back through the Nadaraya-Watson value while oscillator direction remains aligned with the prevailing momentum bias.
🟠 FEATURES
Normalized Nadaraya-Watson Oscillator — Measures momentum using the slope of a smoothed regression curve.
Liquidity Sweep Detection — Creates liquidity levels when bullish or bearish momentum begins to weaken.
Volatility-Adjusted Regression Band — Displays a dynamic overlay around the Nadaraya-Watson estimate using smoothed ATR values.
Momentum Weakening Signals — Marks locations where oscillator momentum begins to lose strength against the current directional bias.
Rebound Signals — Highlights situations where price reclaims or loses the regression value while momentum remains aligned with trend direction.
🟠 HOW TO USE
Monitor the oscillator relative to its signal line to identify momentum shifts and changes in directional bias.
Watch for newly created liquidity levels after momentum weakening events, as these levels may become future sweep targets.
Use sweeps of upper or lower liquidity levels to identify areas where price has taken resting liquidity.
Look for bullish rebound signals when price reclaims the regression value while bullish momentum remains active.
Look for bearish rebound signals when price loses the regression value while bearish momentum remains active.
Combine oscillator direction, liquidity levels, and regression band structure to build context around trend continuation or reversal scenarios.
🟠 CONCLUSION
The Nadaraya-Watson Regression Liquidity Sweeps indicator combines regression-based momentum analysis, volatility-adjusted trend structure, and liquidity level tracking. By linking momentum transitions to swing-derived liquidity zones, it helps identify where liquidity may be forming and when it has been swept. This provides traders with additional context for trend analysis, pullbacks, and potential reversal areas. Indicator

Generalized Fisher Transform [LB] Concept
The Generalized Fisher Transform extends John F. Ehlers' classic Fisher Transform (2002) by introducing an adjustable shape parameter that controls the sensitivity profile of the transformation. While the original Fisher Transform maps any normalized input to a near‑Gaussian output to highlight statistical extremes, this generalized version allows traders to emphasize central regions (shape < 1) or extreme tails (shape > 1) depending on their strategy.
Mathematical Foundation
The indicator first normalizes price to a bounded range using a rolling min‑max window of length N :
x = 2 × (P - L_min) / (H_max - L_min) - 1
A signed power is then applied with a shape factor p :
x_p = sign(x) × |x|^p
The generalized Fisher Transform is computed as :
F = 0.5 × ln( (1 + x_p) / (1 - x_p) )
When p = 1 , the formula reduces to the classic Fisher Transform. Values of p < 1 amplify sensitivity near zero (central price region), while p > 1 amplify sensitivity near the edges (extreme price region). The result is smoothed by an EMA for noise reduction.
What Problem Does It Solve ?
Classic oscillators such as RSI or Stochastic use fixed non‑linear mappings that cannot adapt to different market regimes or trader preferences. The classic Fisher Transform offers a single sensitivity profile. The Generalized Fisher Transform solves this by exposing the shape parameter p , giving traders direct control over where the indicator is most responsive — near the mean or near the extremes — without changing the underlying logic or introducing additional indicators.
How To Interpret
The indicator operates in two selectable modes :
Extremes Mode – the background turns red when Fisher exceeds the upper threshold (statistically overbought), and green when it drops below the lower threshold (statistically oversold). These zones suggest potential mean‑reversion.
Direction Mode – the background turns cyan when Fisher is above zero (bullish bias) and orange when below zero (bearish bias). This mode is suited for trend‑following or directional confirmation.
In both modes, the Fisher line crossing zero indicates a shift in the price distribution relative to its recent range.
Parameters
Source – price data used for the calculation (default: close).
Normalization Period – number of bars used to compute the rolling min‑max for the normalization.
Shape Factor – exponent applied to the normalized price before the Fisher transform. 1 = classic Fisher, < 1 = center‑sensitive, > 1 = tail‑sensitive.
Smoothing Period – EMA length applied to the raw Fisher output.
Coloration Mode – switches between "Extremes" (overbought/oversold highlighting) and "Direction" (bullish/bearish highlighting).
Upper Threshold – Fisher level above which the background turns red in Extremes mode.
Lower Threshold – Fisher level below which the background turns green in Extremes mode.
Reference
Ehlers J.F., "Using the Fisher Transform", Technical Analysis of Stocks & Commodities, Vol. 20, No. 11, pp. 40‑45, November 2002.
Ehlers J.F., "Cybernetic Analysis for Stocks and Futures", Chapter 4 – The Fisher Transform, John Wiley & Sons, 2004. Indicator

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

Bollinger Bands Gradient [Gabremoku]Bollinger Bands Gradient is an enhanced Bollinger Band overlay designed to turn classic volatility bands into a richer visual and signal-based trading framework.
The indicator keeps the core structure of Bollinger Bands — Upper Band, Basis, and Lower Band — but adds a dynamic gradient fill, squeeze detection, state-based bar coloring, strategy-side signal logic, and an optional dashboard for fast chart interpretation. Bollinger Bands are widely used to read volatility compression, expansion, and breakout behavior, especially when traders want more context than a standard three-line display can offer.
This script is built for traders who want Bollinger Bands to feel more alive: clearer transitions, better volatility awareness, and cleaner breakout mapping directly on price.
What it shows
🌈 Dynamic Gradient Fill — the area between Upper/Basis and Basis/Lower is filled with adaptive color intensity that changes according to price distance from the basis.
🗜️ Squeeze Detection — the script monitors Bollinger Band compression and flags low-volatility states when band width contracts relative to its recent range. Bollinger squeezes are commonly used to identify volatility contraction before a possible breakout.
🎨 State-Based Coloring — basis line, bands, bars, and optional background can all shift visually depending on whether the market is bullish, bearish, neutral, or in squeeze mode.
📍 Breakout Signals — optional labels for:
BUY / SELL in Long mode
SHORT / CLOSE in Short mode
🪧 Dashboard — a compact panel showing current state, strategy mode, sequence status, band width, range position, and squeeze condition.
🏷️ Last Value Labels — optional live labels for Upper, Basis, and Lower band values.
Core logic
This script combines volatility structure and signal sequence control.
At the core, Bollinger Bands define the dynamic range around a moving average using standard deviation, which helps visualize whether price is relatively stretched or compressed versus its recent behavior. Narrow bands usually reflect low volatility, while wide bands reflect expansion.
On top of that, this version introduces:
a basis color gradient tied to price position inside the band structure,
a fill intensity model tied to distance from the basis,
and a state machine that prevents repeated entry signals in the same sequence.
That makes the indicator more structured than a plain breakout marker, especially for traders who want cleaner signal flow.
Signal logic
The indicator supports two operating modes:
Long Mode
BUY = breakout above the Upper Band
SELL = breakdown below the Lower Band
Short Mode
SHORT = breakdown below the Lower Band
CLOSE = breakout above the Upper Band
This logic reflects one of the most common ways traders use Bollinger Bands: watching for volatility compression, then responding to expansion outside the bands. At the same time, Bollinger-based strategies can also be used for mean reversion, which is why breakout signals generally work best when confirmed by price structure, momentum, or volume.
Features
✅ Classic Bollinger Bands with selectable basis type
✅ Dynamic gradient fill above and below the basis
✅ Adaptive basis coloring based on price position
✅ Squeeze detection using band-width normalization
✅ Optional squeeze background highlighting
✅ Optional bar coloring by state
✅ Strategy-side selector: Long or Short
✅ Breakout signal state machine
✅ BUY / SELL / SHORT / CLOSE labels
✅ On-chart dashboard
✅ Optional last-value labels
✅ Fully customizable colors and style inputs
How to use
A practical reading flow is:
Watch for band contraction and squeeze conditions.
Treat that as a volatility compression phase.
Monitor for price expansion outside the bands.
Use the selected strategy mode to interpret the resulting signal sequence.
In practice:
tight bands + squeeze on = market compression
break above upper band = bullish expansion candidate
break below lower band = bearish expansion candidate
That said, Bollinger breakouts can fail in choppy environments, so many traders confirm them with momentum, volume, or higher timeframe structure rather than using them in isolation.
Notes
This indicator is designed as an enhanced Bollinger workflow tool, not as a complete trading system with full risk management. Bollinger Bands can support both breakout and mean-reversion approaches, so the best interpretation depends on market regime and confirmation methods.
Author: Gabremoku
Pine Script v6 Indicator

Probabilistic Regime Tensor [JOAT]Probabilistic Regime Tensor
Introduction
Probabilistic Regime Tensor classifies market state into Trend, Mean Reversion, or Shock using logistic transforms of statistical inputs.
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. Trend Probability
Regression slope, variance ratio, and normalized return behavior feed the trend model.
2. Mean-Reversion Probability
Contracting variance ratio, weak slope, and autocorrelation behavior feed the reversion model.
3. Shock Probability
Volatility rank and fast/slow return divergence feed the shock model.
4. Probability Entropy
The three probabilities are normalized and entropy shows whether the classifier is decisive or uncertain.
pTrend = logistic(trendInput) / probabilitySum
Features
Three-state probability model
Trend, mean, and shock probabilities
Dominant confidence and entropy
Sparse regime labels
Movable quant HUD
Input Parameters
Statistical and fast windows
Dominant probability gate
Cooldown
Candle and HUD toggles
HUD position selector
How to Use This Script
Use PRT to decide which style of analysis is more appropriate: continuation, mean reversion, or volatility caution.
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
PRT is original in using normalized logistic probabilities and entropy to classify market regime.
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
Indicator

Hurst Fractal Regime Atlas [JOAT]Hurst Fractal Regime Atlas
Introduction
Hurst Fractal Regime Atlas estimates persistence and mean-reversion regimes using Hurst approximation, fractal dimension, variance ratio, phase coherence, and tension.
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. Hurst Approximation
Rescaled-range behavior estimates whether price is persistent, random-like, or mean-reverting.
2. Fractal Dimension
The Hurst estimate is converted into a roughness measure using dimension logic.
3. Multi-Horizon Coherence
Micro, meso, and macro Hurst readings are compared for agreement.
4. Adaptive Rails
ATR, volatility cluster, and Hurst distance expand or contract the fractal field.
fractalDimension = 2.0 - hurstBlend
Features
Hurst and fractal dimension estimates
Persistence, reversion, and mixed regimes
Coherence and tension scoring
Adaptive fractal rails
Breakout, mean, fade, and unstable events
Input Parameters
Fractal and short horizon windows
ATR length
Persistence and mean-reversion gates
Cooldown
Rails, candles, and HUD toggles
How to Use This Script
Use the HUD regime first. Persistence supports continuation interpretation; reversion supports fading extremes; high tension warns of disagreement.
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
HFA is original in combining Hurst approximation, variance ratio, coherence, tension, and adaptive rails.
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 Indicator

Simple MA TPO
Simple MA TPO
■Description
■Concept & Purpose
This indicator was developed with a single core concept: to discover the "true power" and foster a deeper understanding of the Time Price Opportunity (TPO) profile—often considered a super-tool in market analysis. By combining traditional TPO mechanics with market gravity (Moving Averages), this script aims to provide traders with a clearer, more visual representation of value and price deviation over time.
■Originality & How It Works
While traditional TPO profiles use letters (A, B, C...) to denote time periods and static colors for volume/time areas, this script introduces two highly original mechanics to add value to the community:
Sequential Numbering: Instead of letters, each TPO block is numbered sequentially (1, 2, 3...) based on its formation order. This drastically simplifies reading the flow of time within a session.
MA Deviation Gradient Coloring: The most unique feature is its coloring logic. TPO blocks are not colored randomly. Instead, their color is determined by their deviation from a baseline Moving Average (acting as the market's center of gravity).
■Calculations & Output
To ensure complete transparency in how the visual data is generated, here is the specific calculation used for the block colors:
Formula: Deviation % = ((Price / MA) - 1.0) * 100.0
Why this calculation? This calculates the exact percentage distance between the TPO block's price level and the baseline Moving Average at the time that specific block was formed. It visualizes how "overextended" the market was when time was spent at that price.
Actual Output: The output is a percentage float value (e.g., if the MA is $100 and the block price is $102, the output is 2.0 or 2%). This value is then clamped by the user-defined Max Deviation % input (default 2.0%).
Color Mapping: The clamped percentage is fed into a gradient. Negative deviations (undervalued relative to MA) shift towards Cyan, while positive deviations (overvalued) shift towards Magenta.
■How to Use
Identify Value Areas: Look for the "POC" (Point of Control) line, which indicates the price level where the most time (highest number of blocks) was spent.
Assess Reversion Risk: Blocks that are bright Magenta or bright Cyan indicate that time was spent far away from the Moving Average. Traders can use this to visually gauge if a breakout is sustainable or if a mean-reversion is likely.
Customize Your View: You can adjust the TPO timeframes (Daily/Weekly/Monthly), the block interval (e.g., 30 minutes), and choose your preferred MA type (SMA, EMA, WMA, HMA).
Disclaimer: This indicator is designed for educational and analytical purposes. TPO is a tool for understanding market structure and time spent at price levels, not a standalone trading signal generator. Past performance of price around value areas does not guarantee future results.
説明文
コンセプトと開発目的
このインジケーターは「相場分析におけるスーパーツールであるTPO(マーケットプロファイル)の真の力を見出し、深い理解を得る」というコアコンセプトのもとに開発されました。伝統的なTPOの仕組みと相場の重心(移動平均線)を融合させることで、時間の経過に伴う価値の推移と価格の乖離を、より視覚的かつ明確にトレーダーに提供します。
オリジナリティと機能
従来のTPOプロファイルは時間枠をアルファベット(A、B、C...)で表し、静的な色を使用しますが、このスクリプトはコミュニティに新たな付加価値を提供するために2つの独自機能を備えています。
連番表示: アルファベットの代わりに、各TPOブロックは形成された順番に沿って(1、2、3...)と連番で表示されます。これにより、セッション内での時間の流れを直感的に読み取ることが劇的に容易になります。
MA乖離率によるグラデーション着色: 最大の特徴はその着色ロジックです。TPOブロックは、相場の重心として機能する基準移動平均線(MA)からの「乖離率」に基づいて色が決定されます。
計算式と出力値の根拠
視覚データがどのように生成されているかを完全に透明化するため、ブロックの着色に使用されている具体的な計算式を明記します:
計算式: 乖離率(%) = ((価格 / MA) - 1.0) * 100.0
なぜこの計算なのか? この式は、特定のTPOブロックが形成された瞬間において、その価格水準が基準となる移動平均線からパーセンテージでどの程度離れているか(価格がどれほど伸びきっているか)を正確に測定するために使用されます。
実際の出力値: 出力はパーセンテージの浮動小数点数になります(例:MAが100ドルで、ブロックの価格が102ドルの場合、出力は 2.0 つまり2%になります)。この値は、ユーザーが設定した「最大の限界乖離率」(デフォルト2.0%)によって制限されます。
カラーマッピング: 制限されたパーセンテージはグラデーション関数に渡されます。マイナスの乖離(MAに対して割安)はシアン(水色)に近づき、プラスの乖離(割高)はマゼンタ(赤紫)に近づくように色が変化します。
使用方法
バリューエリアの特定: 最も多くの時間(ブロック数)が費やされた価格帯を示す「POC(Point of Control)」ラインを探し、相場の中心的価値を把握します。
平均回帰リスクの評価: 鮮やかなマゼンタやシアンのブロックは、移動平均線から遠く離れた場所で時間が費やされたことを示します。トレーダーはこれを視覚的な基準として、ブレイクアウトが持続可能か、あるいは平均回帰(MAへの戻り)が起こりやすいかを判断できます。
柔軟なカスタマイズ: TPOの期間(日/週/月)、ブロックの区切り(例:30分)、そして好みのMAタイプ(SMA、EMA、WMA、HMA)を自由に変更できます。
免責事項:このインジケーターは教育および分析目的で設計されています。TPOは市場構造と価格帯での滞在時間を理解するためのツールであり、単独の売買シグナルではありません。バリューエリア周辺での過去の価格動向は、将来の結果を保証するものではありません。
Indicator

KAS VWAP Engine v4.2KAS VWAP Engine v4.2 is an open-source auto-anchored VWAP indicator designed for mean-reversion setups around volume-weighted average price. The anchor automatically resets when price establishes a new structural high or low over a configurable lookback period. A 2-stage state machine ensures signals only fire after a confirmed band-touch followed by an opposite-band close-reclaim.
WHAT IT DOES
- Plots an auto-anchored VWAP that resets on structure breaks (configurable lookback)
- Adds inner and outer ATR-based deviation bands around the VWAP baseline
- Detects mean-reversion entries when price touches the outer band and reclaims the inner band
- Visualizes completed trades as directional vectors with inline P&L labels
- Filters signals through an HTF EMA 200 trend gate (optional) and an ATR Z-Score volatility regime gate (optional)
- Displays a real-time dashboard with current reversion state, VWAP value, price deviation, HTF trend, and ATR filter status
HOW IT WORKS
1. Auto-Anchor Detection
The anchor resets when the current bar high exceeds the highest high of the previous N bars (configurable, default 50), or when the current low breaks below the lowest low. Implementation uses ta.highest(high , swingLen) and ta.lowest(low , swingLen) for the structure-break comparison.
2. Manual VWAP Accumulators
The VWAP uses hlc3 as price source and resets accumulator buffers on each new anchor. This produces a session-style VWAP from each detected structure point. Formula: VWAP = sumSrcVol / sumVol, where sumSrcVol accumulates hlc3 multiplied by volume.
3. ATR Deviation Bands with Bridge
Bands are placed at the VWAP plus/minus inner-multiplier and outer-multiplier times the ATR-14 baseline (SMA-smoothed over 100 bars). On anchor-reset bars, a dedicated bridge variable substitutes hlc3 for the freshly-reset VWAP value, preventing ghost-line artifacts in the visualization.
4. 2-Stage State Machine (Arm to Fire)
Stage 1 (Arm): a touch of the outer band sets the armed state to +1 (long-arm) or -1 (short-arm).
Stage 2 (Fire): a close back inside the inner band fires the entry signal in the same direction.
A signal cooldown (configurable bars) and a VWAP-touch-reset clear the armed state.
5. ATR Z-Score Regime Gate
The ATR-14 z-score is computed against its 100-bar SMA and 100-bar standard deviation. When the z-score falls below -1.0, the regime is classified as Low Vol and signals are blocked (optional filter, on by default).
6. HTF EMA 200 Filter
A request.security call retrieves the EMA-200 from a higher timeframe (default 4h). When enabled, long-reversion signals only fire when close is above the HTF EMA, and short-reversion signals only fire when close is below the HTF EMA.
WHY IT'S UNIQUE
- Unlike standard auto-anchored VWAP scripts that produce ghost-line artifacts when the anchor resets, this indicator substitutes hlc3 on the reset bar via a dedicated bridge variable, providing a continuous, artifact-free anchored VWAP visualization.
- Unlike instant-fire band-touch signals common in VWAP deviation scripts, this indicator uses a 2-stage Arm to Fire state machine: an outer-band touch only arms the setup, and the signal fires only after an inner-band close-reclaim, significantly reducing false signals during volatile band-pierces.
- Unlike static signal markers, this indicator visualizes each completed trade as a directional vector from entry to exit (Take Profit at VWAP, or Stop at opposite outer band) with inline P&L percentage labels, enabling rapid visual back-test review on historical bars.
HOW TO USE
- Add the indicator to a standard candlestick chart on any timeframe (intraday 5m-15m and swing 1h-4h work well)
- Default settings work for most liquid instruments; adjust Structure Lookback (50 bars) based on your timeframe density
- Watch for Revert Long (triangle below bar) or Revert Short (triangle above bar) signals after a touch of the outer band
- The dashboard shows current reversion state, VWAP deviation, HTF trend direction, and whether the ATR regime gate is blocking signals
- Trade trajectory beams visualize each completed setup with TP (return to VWAP) or STOP (extension to opposite band) outcomes
- Combine with your own risk management; the indicator is analytical, not a recommendation
LIMITATIONS
- Mean-reversion logic is designed for ranging or oscillating markets; performance is reduced in strong directional trends
- ATR Z-Score regime detection requires at least 100 bars of history to stabilize
- The HTF EMA 200 filter requires sufficient history on the higher timeframe; on newly-listed instruments or very short timeframes the HTF signal may be unstable
- Signals fire on bar close (barstate.isconfirmed); intra-bar movements are not signaled
- This indicator is for analytical purposes only and does not constitute financial advice or a recommendation to trade
ABOUT
Knecht Alpha Signals delivers Pine Script v6 indicators focused on precision over noise. This open-source release is part of our public toolkit for the PulseWire community. Indicator

KNN Machine Learning Mean Reversion Probability [Dots3Red]█ OVERVIEW
This script applies a K-Nearest Neighbors (KNN) machine learning algorithm to estimate the probability that price will revert to its moving average within a defined number of bars. Rather than predicting momentum direction, it asks a more specific question: how likely is it that this extension snaps back?
The model searches historical bars for situations that looked like the current one — same degree of stretch, same RSI exhaustion profile, same volume behavior — and measures how often those situations ended in a reversion to the basis MA. That proportion becomes the live probability shown on your chart.
█ METHODOLOGY
The indicator follows a supervised machine-learning pipeline with five distinct stages.
1 — Labeling (what we are predicting)
Each historical bar receives a label based on what actually happened next. If price was extended above the basis MA and touched it within the Reversion Window — that bar is labeled a successful reversion. If it did not touch — labeled as no reversion. The same logic applies from below. This is the core distinction from momentum KNN indicators: the target is reversion to fair value , not directional price movement.
2 — Feature engineering (what we measure)
Five features capture how stretched current price conditions are, each Z-score normalized to remove scale bias:
• MA Distance — signed % distance of close from the basis MA. The primary extension signal.
• Bollinger Band position — where price sits within the bands, normalizing extension relative to current volatility.
• RSI deviation — how far RSI has moved from neutral (50). Captures momentum exhaustion.
• Body compression — ratio of candle body to total range. Small bodies near extremes signal hesitation and loss of directional conviction.
• Volume fade — declining volume during an extension is a classic exhaustion signature.
3 — Z-score normalization
All five features are standardized using a rolling mean and standard deviation computed on prior bars only (look-ahead free). This ensures the KNN distance calculation is not biased by features of different scales.
4 — KNN engine
The algorithm scans the historical lookback window for the K most similar past bars, measured by Minkowski Distance across all five features simultaneously. Closer neighbors receive exponentially higher voting weight via a Gaussian Kernel , so the prediction is driven by the most relevant historical analogs — not a simple majority vote.
5 — Dual probability output
Two independent probabilities are maintained and tracked separately:
• P(reversion from above) — for overbought / extended-high setups.
• P(reversion from below) — for oversold / extended-low setups.
They are kept separate because bear-side extensions and bull-side extensions have statistically different behavior — bear moves are typically faster and sharper. A signal fires when the relevant probability crosses the user-defined threshold, and only when price is actually extended (see Extension Gate below).
█ WHAT MAKES THIS DIFFERENT
Most published KNN indicators predict momentum direction — will price go up or down next bar? This indicator predicts something more specific: will price return to its average?
The distinction matters for several reasons:
1 — A high momentum reading can persist for many bars. A stretched reading has a natural gravity pulling it back, and measuring the historical probability of that snap is a more tractable problem than direction forecasting.
2 — The two probability channels are trained on separate populations, accounting for the asymmetry between bull and bear extensions.
3 — The Extension Gate ensures signals only appear when there is actually something to revert from — no signals in flat, choppy, low-volatility conditions.
█ EXTENSION GATE
Even if the KNN model outputs a high reversion probability, no signal appears unless price is beyond Gate Multiplier × ATR from the basis MA. This prevents false signals in low-volatility or ranging conditions where mean reversion setups carry no statistical edge.
█ HOW TO USE
Signal shapes (▲ Rev / ▼ Rev)
Fire when P(reversion) crosses the threshold AND price passes the extension gate. The label at the signal bar shows the exact probability at the moment of firing.
Snap zone fill
When a signal is active, the region between current price and the basis MA is shaded. This is the reversion target zone — where price is statistically expected to return. The fill deactivates automatically once price reverts back through the basis.
Bar colors
• Bright green/red — active probability above the threshold on the current price side.
• Dimmed green/red — probability elevated but below threshold, approaching signal territory.
• No color — neutral or low reversion probability.
Background flash
A faint background confirms the exact bar on which a signal fired.
Recommended workflow
1 — Set the Basis MA to your preferred mean reversion average. EMA 20 is a common starting point for intraday and swing setups.
2 — Tune the Reversion Window to match your typical trade hold time in bars.
3 — Adjust the Extension Gate multiplier to the asset's volatility profile. Crypto typically requires higher values than forex or equities.
4 — Use the Probability Threshold to control signal frequency. 0.65 gives moderate frequency; 0.75 and above is more selective.
5 — Combine with volume analysis or candlestick confirmation at signal bars for additional confluence before entering a position.
█ SETTINGS REFERENCE
KNN Engine
• K Neighbors — how many historical analogs vote. Higher = smoother, slower to react.
• Lookback Window — size of the historical search space in bars.
• Reversion Window — bars within which price must touch the MA to count as a reversion.
• Minkowski p — distance metric exponent. 1 = Manhattan, 2 = Euclidean.
• Gaussian Bandwidth — controls how steeply neighbor weight falls with distance.
• Probability Threshold — minimum confidence required to show a signal.
Feature Settings
• Basis MA type / length — the fair value line all features are measured against.
• Bollinger Band mult — standard deviation multiplier for the BB position feature.
• RSI length — period for the RSI exhaustion feature.
• Volume MA length — baseline for the volume fade feature.
Extension Gate
• Require extension gate — toggle the ATR-based signal filter on/off.
• Gate band multiplier — how many ATRs from basis price must be before signaling.
• Gate ATR length — period for the ATR used in the gate calculation.
█ LIMITATIONS
• KNN is a lazy learner — it does not generalize beyond historical patterns in the lookback window. Strong trending regimes or structural breaks can produce elevated false signals.
• The reversion probability reflects historical frequency, not a guarantee of future behavior.
• On low-bar-count charts (e.g. weekly on newer assets), the lookback window may not contain enough samples to produce stable probability estimates.
• Computation scales with lookback window size. Very large windows may slow chart rendering.
█ DISCLAIMER
This indicator is a decision-support tool, not a trading system. It does not constitute financial advice. Always apply proper risk management and combine with your own analysis.
Algorithm: K-Nearest Neighbors (KNN)
Distance metric: Minkowski Distance
Preprocessing: Z-Score Normalization
Target: Probabilistic Mean Reversion Indicator

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

Z-Score Probability Pro KAMA
Z-Score Probability Pro KAMA, v1.0 by Erika Barker
Hey guys, this is the successor to my original Z-Score Probability HMA Indicator, which you can still use if you prefer that one.
This is version 1.0 of the new rebuild, and it is a pretty big upgrade. The goal was to keep the statistical foundation that made the original useful, but make it more adaptive, cleaner, and better at understanding different market conditions.
What is new
1. Timeframe auto-adaptation
No more constantly re-tuning the indicator when you switch charts.
The lookback now automatically adjusts based on the chart timeframe, using a calendar-style window, defaulting to about 5 trading days. The dashboard also shows the effective lookback being used, so you always know what the script is calculating from.
It works from 1 minute charts all the way up to weekly charts.
2. Better smoothing logic
The original HMA was doing a lot of work at once. In this version, the baseline and the Z-score smoothing are separated so each one can do its own job better.
By default:
* Baseline: KAMA, great for adapting to noisy markets
* Z-score smoothing: ALMA, smoother and cleaner on the oscillator
HMA is still available if you prefer the original feel.
3. Modified Z-Score option
There is now an optional Modified Z-Score mode using MAD, median absolute deviation.
This is useful for markets with big outliers, fat tails, sudden spikes, crypto moves, small caps, and anything that tends to behave a little wild.
When this mode is turned on, the threshold bands automatically adjust.
4. Regime filter using Hurst logic (been needing out on this a lot lately on personal stuff)
This version attempts to classify the market as:
* Trending
* Mean-reverting
* Random
That matters because an extreme Z-score does not always mean the same thing.
In a mean-reverting market, an extreme Z-score can suggest exhaustion.
In a trending market, that same extreme can sometimes mean continuation or breakout strength.
This was one of the biggest things I wanted to improve from the original.
5. Divergence engine
The indicator now includes both regular and hidden divergence.
It can detect:
* Regular bullish divergence
* Regular bearish divergence
* Hidden bullish divergence
* Hidden bearish divergence
Divergences are confirmed using pivots, so they are non-repainting, but they will appear a few bars after the actual pivot. That is the tradeoff for confirmation.
6. Higher-timeframe confirmation
The script can pull Z-score confirmation from a higher timeframe.
You can use the automatic HTF mode or set it manually. HTF values only update after the higher-timeframe candle closes, so this is designed to avoid repainting.
7. Strong Buy and Strong Sell signals
Signals are based on a confluence score instead of just one condition.
The score looks at things like:
* Z-score reversal
* Divergence
* Baseline slope
* Market regime
* Higher-timeframe agreement
* Volume confirmation, when volume is available
You can choose the conviction level:
* Low
* Medium
* High
Medium is the default and should give fewer, cleaner signals.
8. Live dashboard
The dashboard shows:
* Detected timeframe
* Effective lookback
* Current Z-score
* Market regime
* Hurst value
* Higher-timeframe status
* Bull and bear scores
* Conviction threshold
* Last signal
You can move it to any corner of the chart.
9. More stable defaults
The defaults were chosen to be centered in stable performance zones, not over-optimized for one market.
Basically, I did not want this to be something that only looks good on one ticker, one timeframe, during one perfect backtest window.
10. Built in Pine v6
This version uses Pine v6 features, including dynamic higher-timeframe requests and confirmed-bar alert logic.
Repaint disclosure
This indicator is designed to avoid repainting, but there are a few things to know:
* Divergence and Strong Buy/Sell labels appear after pivot confirmation, default is 3 bars later
* Higher-timeframe confirmation only updates after the higher-timeframe candle closes
* Alerts fire on confirmed bars, not intrabar ticks
So, signals are delayed slightly by design, but that is what makes them confirmed.
How to use it
Beginner
Leave everything on default.
Watch the dashboard and look for:
* Strong Buy
* Strong Sell
Medium conviction is probably the best starting point.
Intermediate
Try the Modified Z-Score mode on crypto, small caps, or anything with sharp moves and big outliers.
Turn on Hidden Divergence if you like trading trend continuation setups.
Advanced
You can tune the component weights to match your own strategy.
The indicator is flexible, so you can make it more reversal-focused, more trend-following, or more confirmation-heavy depending on your trading style. Indicator

Trend Master Bundle (5x EMA, DEMA & VWAP) | MouryaThe Trend Master Bundle is a comprehensive, trend-following utility designed to visualize perfect moving average alignment and volume-weighted momentum. By integrating multiple exponential moving averages, a double exponential moving average, and standard deviation VWAP bands, this tool provides a clear, quantitative view of both macro trend direction and intraday mean-reversion zones.
The "Perfect Alignment" Strategy
The core algorithmic logic of this indicator detects strict momentum states where the moving averages fan out in a specific sequence:
Extremely Bullish: Identified when the current price sits above the moving averages, and the MAs are stacked in strict ascending order: 5 EMA > 10 EMA > 20 EMA > 50 EMA > 100 DEMA > 200 EMA. This structural alignment indicates a dominant uptrend.
Extremely Bearish: Identified when the price remains below the moving averages, and they are stacked in descending order: 5 EMA < 10 EMA < 20 EMA < 50 EMA < 100 DEMA < 200 EMA.
Core Indicator Components
5x Exponential Moving Averages: Standard institutional lengths (5, 10, 20, 50, 200) serve as dynamic support and resistance layers.
100-Period DEMA: The Double Exponential Moving Average is utilized to reduce the lag inherent in standard EMAs. It reacts faster to price changes, serving as a highly responsive lead indicator for mid-to-long-term trend transitions.
VWAP with Standard Deviation Bands: The anchored Volume Weighted Average Price calculates the asset's true fair value based on volume and price. The surrounding standard deviation bands help measure market volatility and extension.
Upgraded Visual Features
End-of-Line Tracking Labels: Dynamic text labels automatically track the most recent candle, floating the name of each specific moving average (e.g., "EMA 50", "VWAP") directly at the end of its respective line for instant visual identification.
Dynamic Premium Dashboard: A sleek, non-intrusive dark-mode widget provides a real-time readout of the current trend state (Extremely Bullish, Extremely Bearish, or Neutral) and lists the exact current price values for all active moving averages.
Full Customisation: Every MA length, colour, VWAP anchor, and UI element can be toggled or adjusted via the indicator settings menu to suit individual charting preferences.
Practical Application
Trend Confirmation: Traders can use the dashboard to ensure they are trading in the direction of the dominant momentum.
Pullback Entries: During a confirmed "Extremely Bullish" or "Extremely Bearish" state, the 20 EMA and VWAP baseline often act as areas of interest for trend-continuation setups.
Mean Reversion: Price interaction with the outer VWAP standard deviation bands (Bands #2 and #3) can signal statistically overextended market conditions, helping identify potential exhaustion points or mean-reversion opportunities. Indicator

Sigma Structure [RWCS]What it is:
Sigma Structure is a confluence-based trading indicator that unifies three distinct analytical layers into a single, cohesive view: a Z-Score oscillator measuring price deviation from its 20 EMA, a normalized MACD histogram for momentum context, and an Order Block detection engine that identifies structural demand and supply zones directly on the price chart. The result is an indicator that tells you not just when price is statistically extended, but where that extension is occurring relative to meaningful price structure — giving every signal a location and every location a statistical weight.
How it works:
1. Z-Score layer: Price is measured as the number of standard deviations it sits above or below its 20-period EMA. This produces an oscillator that reads consistently across any asset or timeframe — a reading of +2 on Bitcoin means the same thing structurally as +2 on the S&P or EURUSD. The line color intensifies from faded to full aqua as it moves above zero, and faded to full fuchsia below, so the degree of extension is immediately legible at a glance. Fixed bands at ±1, ±2, and ±3 sigma define the statistical landscape.
2. MACD layer: A standard MACD histogram is computed normally, then linearly scaled so its rolling peak aligns with the ±3σ band. No calculation is modified — only the display axis is shared with the Z-Score. This means crossovers, divergences, and momentum shifts read identically to a standard MACD, but now live in the same visual space as the bands, letting you see momentum and mean-reversion context simultaneously.
3. Order Block layer: The indicator scans for order blocks using a sequential candle method — a bearish candle followed by a configurable number of consecutive bullish candles (demand), or a bullish candle followed by consecutive bearish candles (supply). Detected zones are drawn directly on the price chart as shaded regions with solid top boundaries and dashed bottom boundaries, color-coded aqua for demand and fuchsia for supply. Zones extend rightward bar by bar and self-invalidate the moment price closes through them, so what you see on the chart is always live and relevant.
4. Confluence signals: Two signal types fire when the Z-Score and Order Block layers align. An OB Reversal label appears when price is inside an Order Block while the Z-Score is at or beyond ±2σ — the statistical extension and the structural level are confirming each other as a fade opportunity. An OB Continuation label appears when price pulls back into an Order Block and the Z-Score reclaims zero — the trend is reasserting after a mean-reversion dip into demand or supply.
5. Volatility divergence: A background highlight layer compares price's rolling highs and lows against the rolling highs and lows of realized volatility (standard deviation of log returns). When price makes a new low without a corresponding expansion in realized volatility, a bullish divergence is flagged. The inverse flags bearish divergence. These are not entry signals on their own — they indicate moments where price action and volatility are telling different stories and warrant closer attention.
Possible ways to use it:
1. Reversal setups: When the Z-Score reaches ±2σ or beyond and price simultaneously tags an active Order Block zone, the statistical extension and structural level are aligned. The OB Reversal label marks these bars. Look for MACD histogram compression or a zero cross in the same window for additional confirmation before acting.
2. Trend continuation entries: In trending markets, price frequently pulls back into demand or supply zones and finds support exactly where it should. When the Z-Score crosses back through zero inside an active zone, the OB Continuation label fires — this is your structural retest with momentum confirmation.
3. Divergence as a filter: The volatility divergence highlights flag potential exhaustion in price moves that lack volatility confirmation. Use these as a reason to tighten risk or wait for the OB/Z-Score confluence before entering, rather than chasing the move.
4. EMA trend bias: The fast and slow EMA overlay on the price chart provides a quick structural read. Aligning your OB Reversal or Continuation signals in the direction of the EMA cross adds a higher-timeframe trend filter without requiring a second indicator.
5. Alert-driven scanning: Three configurable alerts cover the ±2σ Trade Zone cross, OB Reversal confluence, and OB Continuation setup. Set these across a watchlist to surface actionable conditions without manual chart monitoring.
Settings guide:
1. EMA / Std Dev Length: Both default to 20, matching a standard Bollinger Band configuration. Increase for smoother, slower signals on higher timeframes.
2. MACD Norm Lookback: Controls how far back the indicator looks to find the MACD histogram's peak for scaling. Higher values produce more stable scaling; lower values make the histogram more reactive to recent momentum.
3. Sequential Candles for OB: The number of consecutive candles required after the origin candle to confirm a block. Higher values produce fewer, higher-quality zones.
4. Max Active Zones: How many demand and supply zones can coexist on each side. Older zones are removed when the limit is reached.
5. Divergence Lookback: The rolling window for comparing price extremes against volatility extremes. Shorter values produce more frequent signals; longer values are more selective.
Disclaimer:
This indicator is published for educational and informational purposes only. Nothing presented here constitutes financial advice, a solicitation, or a recommendation to buy or sell any financial instrument. All trading involves risk, including the possible loss of principal. Past performance of any indicator or methodology is not indicative of future results. You are solely responsible for your own trading decisions. Always conduct your own research and consult a qualified financial professional before making any investment decisions. Indicator

Z-Score Mean Reversion ProZ-Score Mean Reversion Pro is a Strategy designed to identify high-probability mean reversion setups by combining statistical Z-Score extremes with RSI momentum confirmation, Bollinger Band volatility filtering, and EMA trend alignment. It provides clean buy/sell signals, visual trade zones, dashboard data, and alert outputs to assist in short-term reversal trading, intraday setups, and swing mean reversion trades.
🔑 FEATURES
Z-Score Mean Reversion Engine: Detects statistically stretched price moves and highlights potential reversal zones when price deviates too far from its rolling mean.
Multi-Layer Signal Confirmation: Combines RSI exhaustion, Bollinger Band Width volatility checks, and EMA trend filtering to reduce false signals and improve trade quality.
Built-In Risk Management: Includes ATR-based stop loss and take profit logic, plus optional mean reversion exits when price returns toward equilibrium.
⚠️ NOTES & DISCLAIMERS
This script works best on 5m, 15m, 1H, and 4H charts across Forex, Crypto, Indices, and liquid Stocks.
Best suited for mean reversion traders looking to capture exhaustion moves and short-term reversals.
ATR exits are ideal for structured risk management, while Z-Score exits are better for pure statistical reversion setups.
Always use risk management (Stop Loss).
This script is for educational and research purposes only. Always forward test before using live capital.
Strategy

Strategy
