Adaptive Divergence Core [JOAT]Adaptive Divergence Core is an open-source Pine Script v6 oscillator that combines HMA-smoothed RSI behavior, adaptive percentile bands, confirmed divergence lines, and regime fills. It is designed to make oscillator extremes relative to the current chart sample instead of relying only on fixed overbought and oversold levels.
The script is useful when standard oscillator thresholds are too rigid. A market can stay strong or weak for long periods. Adaptive Divergence Core recalculates upper and lower fields from recent oscillator distribution, then plots confirmed divergence only after both price and oscillator pivots are confirmed.
Core Concepts
1. HMA-RSI Core
The oscillator blends RSI on raw price, RSI on HMA-smoothed price, and an HMA-smoothed RSI value. It is centered around zero for easier bullish and bearish reading.
hmaSource = ta.hma(src, hmaLen)
rawRsi = ta.rsi(src, rsiLen)
rsiOnHma = ta.rsi(hmaSource, rsiLen)
smoothedRsi = ta.hma(rawRsi, smoothLen)
core = (rsiOnHma * 0.58 + smoothedRsi * 0.42) - 50.0
2. Adaptive Percentile Bands
The upper and lower bands are calculated from rolling percentiles of the oscillator. This lets the bands adapt to the recent distribution of momentum.
upperRaw = ta.percentile_nearest_rank(core, percentileLength, upperPercentile)
lowerRaw = ta.percentile_nearest_rank(core, percentileLength, lowerPercentile)
3. Extreme Fields
Additional 95th and 5th percentile fields help show deeper oscillator stretch zones beyond the primary adaptive bands.
4. Confirmed Divergence Detection
Bearish divergence requires price to form a higher confirmed pivot high while the oscillator forms a lower confirmed pivot high. Bullish divergence requires price to form a lower confirmed pivot low while the oscillator forms a higher confirmed pivot low.
5. Regime Fill
The script fills the oscillator against zero and against its guide line, making positive and negative regimes easy to read without large markers.
Features
HMA-RSI oscillator: Blends raw RSI, RSI on HMA, and smoothed RSI
Adaptive percentile bands: Upper and lower thresholds adjust to recent oscillator behavior
Extreme bands: Additional outer fields for deeper stretch readings
Confirmed divergence lines: Divergences plot only after price and oscillator pivots confirm
Divergence labels: Small S Div and B Div labels are placed near confirmed divergence lines
Divergence line cap: Old lines are deleted to respect object limits
Optional candle tint: Can color chart candles from the oscillator pane setting
Dashboard: Shows core value, bands, divergence counts, and current field
Alerts: Divergence, band entry, and band release conditions
Input Parameters
Core:
Source: Price source
RSI Length: Base RSI period
HMA Price Length: HMA source smoothing
HMA RSI Smooth: Smoothing for the raw RSI component
Adaptive Bands:
Percentile Length: Lookback used for adaptive thresholds
Upper Percentile: Upper adaptive threshold percentile
Lower Percentile: Lower adaptive threshold percentile
Divergence:
Divergence Left Bars / Right Bars: Pivot confirmation settings
Maximum Divergence Lines: Object cap for plotted divergence lines
Divergence Labels: Shows or hides compact divergence labels
Visuals:
Tint Candles: Optional candle tint from the oscillator state
Show Dashboard: Shows or hides the compact top-right pane dashboard
Palette: Selects the local JOAT color preset
How to Use This Indicator
Step 1: Read the Core Relative to Zero
Values above zero show positive oscillator regime. Values below zero show negative oscillator regime.
Step 2: Use Adaptive Bands
When core enters the upper or lower adaptive band, momentum is stretched relative to its recent sample.
Step 3: Evaluate Divergence After Confirmation
Divergence lines are delayed by pivot confirmation. This is intentional and avoids projecting unconfirmed pivots into the past.
Indicator Limitations
Divergences confirm late because pivots need right-side bars
Adaptive bands depend on the selected lookback and can shift over time
Divergence is context, not a complete trade plan
During strong trends, oscillator stretch can persist for many bars
Originality Statement
Adaptive Divergence Core is original in its HMA-RSI blend, rolling percentile threshold system, confirmed pivot divergence logic, and compact dashboard. It uses public Pine v6 functions to build a distinct oscillator workflow.
Disclaimer
This script is provided for educational and informational use only. It is not financial advice or a recommendation to buy or sell any financial instrument. Trading involves substantial risk of loss. Oscillator divergences can fail or remain early for extended periods. Always use independent analysis and proper risk management.
-Made with passion by jackofalltrades
Indicator

Calibrated Supertrend Strength-Graded & Multi-Timeframe## Calibrated Supertrend — Confirmed, Strength-Graded & Multi-Timeframe (ST ARC)
### What it is
A Supertrend rebuilt to fix the three things that frustrate everyone who uses the
plain version, and to tell you **how trustworthy each trend flip is** before you act
on it. A classic Supertrend uses a **fixed ATR multiplier** (an arbitrary guess that
whipsaws in volatile markets and lags in calm ones), it **flips on noise** (every
marginal poke through the band reverses it), and it gives you **no sense of quality**
(a great flip and a junk flip look identical). ST ARC addresses all three, then
scores every flip 0–100 and — crucially — **calibrates that score to what actually
happened on this symbol**, so the number is accountable rather than decorative.
It runs on **any symbol, asset class, timeframe and market**. The raw data source
and every optional feed are user-selectable; nothing is hard-coded to a market.
### Why these components are combined (mashup rationale)
Each layer removes one specific, nameable failure of the plain Supertrend and feeds
the next — none is decorative:
1. **Adaptive multiplier** — the band width is no longer fixed. The ATR multiplier
becomes a series that scales with a **volatility rank** (how high current ATR
sits versus its own recent history): wider when volatility is high to cut
whipsaw, tighter when calm, and wider still when trend **efficiency** is low
(choppy tape). The ATR *length* can also adapt to the measured dominant cycle.
2. **Confirmation gate (de-whipsaw)** — a raw flip is only **confirmed** when the
close breaches the prior band by a minimum fraction of ATR *and* a minimum number
of bars have passed since the last flip, evaluated on closed bars
(non-repainting). This fixes the "flips on noise" problem.
3. **Regime classifier** — efficiency ratio + trend strength + a volatility-cluster
measure label the market Trend / Range / Volatile, so flips are trusted or
discounted by context.
4. **Multi-timeframe agreement** — three higher-timeframe Supertrends (multiples of
your chart timeframe) are read with no repainting and counted for agreement; a
signal that all higher timeframes oppose can be vetoed.
5. **Flip-strength score + conviction with hard vetoes** — at each flip a 0–100
strength is built from breach depth, trend strength, efficiency, MTF agreement,
regime alignment, volume thrust and volume delta, then gated by hard vetoes
(volatility spike, higher timeframes opposed, a fresh flip inside a chop regime,
cross-asset conflict). The output is one verdict plus a strength grade.
Remove any single layer and a specific Supertrend failure returns — that is the
justification for combining them.
### How it is original
ST ARC keeps a **self-calibrating quality engine**. It records every confirmed flip
and, a fixed window later, checks whether price actually ran a **favourable target
(measured in ATR)** in the flip's direction — i.e. whether the trade *worked*, not
merely whether the line avoided re-flipping. From that it reports, on the dashboard
and on each flip label, the **realized win-rate of past flips at each strength tier**
on this very symbol, plus the average favourable excursion. It can even **auto-learn
the strength threshold** at which flips have historically met a target win-rate and
use that as the action filter. A stock Supertrend tells you nothing about the quality
of its own signals; this one is accountable to its own track record.
### What it plots
- A single **Supertrend line** on price, green up / red down, with the flip triangle
**colour-graded by strength** (strong = solid, weak = faded) and a small
**strength label** on each flip (score + grade).
- An optional **second, slower Supertrend** (thinner line, contrasting colour,
diamond markers) for fast/slow confluence, with a DUAL agreement readout.
- A compact **dashboard**: verdict, regime, direction, the live adaptive multiplier
and ATR length, the flip state with its strength and that tier's realized
win-rate, MTF agreement, the calibration stat, dominant cycle, a risk-based size
reference and any active veto.
### How to use it
1. Trade with the line: long bias while it is below price (green), short while above
(red). The line is a natural trailing stop.
2. Act on **confirmed flips** (the triangles), not raw touches, and weight them by
the **strength score** — strong flips in a Trend regime with higher-timeframe
agreement are the high-quality ones; weak flips in a chop regime are the ones to
skip.
3. Use the **conviction / strength gates** and any active **veto** as a filter; the
optional **auto-learned strength cutoff** suppresses the verdict on flips weaker
than the level that has historically met your target win-rate.
4. The size shown is an ATR-based reference for journaling, not an order.
5. Alerts cover confirmed flips, the conviction verdict, raw flips and the secondary
Supertrend.
### Settings (use on any asset / market)
- **Raw data source** — `hl2`, `hlc3`, `close`, `ohlc4`, or point it at **another
indicator's plot**. This is what lets it work on any instrument or on your own
series.
- **Supertrend core** — ATR length (with optional dominant-cycle adaptive length)
and base multiplier.
- **Adaptive multiplier** — volatility-rank lookback, calm/volatile scaling and an
optional chop-widening term.
- **Confirmation** — minimum breach in ATR, minimum bars between flips, non-repaint
on close.
- **Calibration** — the judging window and the favourable target (in ATR) that
defines a "good" flip; the auto-learn cutoff and its target win-rate.
- **Regime / MTF / conviction weights / secondary Supertrend** — all exposed.
- **Optional feeds (blank = off):** a *volatility-index symbol* (spike veto) and a
*cross-asset symbol* (confluence). Both blank by default, so the script is fully
self-contained on any market.
### Notes
- It is a **study / indicator**, not a strategy, and it places no orders.
- Confirmed flips are evaluated on bar close to avoid intrabar repainting;
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 (including the
flip win-rates) 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 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

Adaptive MACD Regime, Volatility Bands & Conviction# Adaptive MACD — Regime, Volatility Bands & Conviction
## What this is
This is a single, self-contained momentum framework built around **one normalized MACD core**. Instead of plotting a raw MACD and leaving you to judge it, the script surrounds that core with the context a momentum reading needs to be usable: a market-regime filter, an adaptive length stage, a multi-timeframe agreement check, a volatility band, and a conviction score that combines them into one number. It runs on **any symbol and any timeframe** — the price source and every optional reference feed are selectable in Settings.
It is a study/indicator (not a strategy). It does not place orders and does not claim any performance.
---
## Why these components are combined (mashup rationale)
A plain MACD only answers "is momentum up or down right now." On its own it has two well-known weaknesses: it whipsaws during sideways markets, and its fixed 12/26/9 lengths are arbitrary for any given symbol or timeframe. Each module below exists to fix a specific one of those weaknesses, and they are deliberately chained so the output of one informs the next:
1. **Normalized MACD core (L1)** — the MACD histogram is converted to a rolling **z-score**, so a reading of "+2" means the same thing on a low-priced FX pair, a high-priced index, or a 1-minute vs daily chart. Raw MACD values are not comparable across instruments; the z-score is. This is what makes the rest of the framework symbol-agnostic.
2. **Regime filter (L2)** — efficiency ratio + ADX + a volatility-clustering measure classify the market as **Trend / Range / Volatile**. This is used to decide whether a momentum signal should be trusted: MACD crosses are reliable in trends and noisy in ranges, so the regime gates and reweights the core signal rather than treating every cross equally.
3. **Adaptive length stage (L3)** — a dominant-cycle estimate (Ehlers homodyne) retunes the fast/slow/signal lengths toward the market's measured rhythm, instead of a static 12/26/9. You can switch this to a volatility-driven mode or fall back to fixed lengths. This directly addresses the "arbitrary lengths" weakness.
4. **Multi-timeframe confluence (MTF)** — the same MACD logic is evaluated on four higher timeframes, confirmed on bar close so it does not repaint. A single-timeframe cross is weak; agreement across timeframes is the filter.
5. **Volatility band + fade (L4)** — a volume-weighted standard-deviation band around price flags stretched conditions and band-rejection ("fade") setups, used as a mean-reversion counterweight to the trend logic.
6. **Conviction + vetoes (CON)** — all of the above are blended into a single **0–100 conviction score** with hard vetoes (e.g. counter-regime, timeframe disagreement, volatility spike). This is the part that turns several separate readings into one decision so you are not eyeballing five panels.
7. **Risk framework (RISK)** — once there is a signal, it derives an ATR stop, R-multiple targets, and a position-size suggestion from your account equity and risk %. This is shown as thin Entry / Stop / TP1 / TP2 lines on price.
In short: **L1 makes momentum comparable, L2 decides if it can be trusted, L3 tunes it, MTF confirms it, L4 adds a reversion check, CON scores it, and RISK frames it.** None of the layers is decorative — remove any one and the others lose context.
---
## How to use it
1. Add it to any chart and timeframe. It plots in its own lower pane; the trade levels and dashboard overlay on price.
2. Read the **dashboard header**: it shows the current action (BUY / SELL / HOLD / WAIT / FLAT) and the entry/stop.
3. Check **VERDICT + conviction**: a higher score with no active vetoes is a stronger context. Vetoes are listed explicitly so you can see *why* something is blocked.
4. Use **REGIME** to set expectations — trend-following signals make more sense in a Trend regime; the Stretch/Fade rows matter more in Range.
5. The **Entry / Stop / TP1 / TP2 lines** on price show the framework's risk levels for the current signal only; previous trade lines are removed automatically.
6. Optional feeds (reference symbol, volatility index, open interest, cross-asset) are **blank by default** — add your own symbols if you want those confluence inputs, or leave them off. The script degrades gracefully and tells you in the FEEDS row which are live.
---
## Settings worth knowing
- **Price source** — the series the whole engine runs on. Defaults to close; works on any market.
- **Optional reference feeds** — all blank by default and entirely optional, so the script is not tied to any one market or exchange. Enter symbols relevant to your instrument if you want them.
- **Adaptive length driver** — Homodyne (cycle-adaptive), Volatility, or Fixed.
- **Risk & sizing** — account equity, risk %, ATR stop multiple, and value-per-move; the size output is a suggestion only.
- **Dashboard theme** — Auto/Dark/Light; Auto flips colors to stay readable on white or black backgrounds.
- **Name / symbol / timeframe label** — kept on by default so the chart always identifies what is plotted.
---
## What makes it original
It is not a wrapper around a built-in MACD. The core is rebuilt to accept a *series* length (so it can be retuned every bar), normalized to a cross-asset z-score, gated by an explicitly classified regime, and merged with multi-timeframe state into a single weighted conviction score with named vetoes. The volatility-band fade logic and the dominant-cycle length adaptation are integrated into that same score rather than shown as separate, disconnected studies.
---
## Notes and limitations
- Confirm-on-close is on by default to avoid repainting; intrabar values can still update until the bar closes.
- The optional "Call/Put strike" row is a convenience hint derived from price and your strike interval only — **no options-chain data is read and no option P&L is implied.**
- Higher-timeframe and reference-feed requests depend on your data subscription; if a feed is unavailable the script disables the dependent input and continues.
---
## Disclaimer
This script is provided for educational and informational purposes only. It is a technical study, not investment, financial, or trading advice, and not a solicitation to buy or sell any instrument. It does not guarantee any result. Markets involve risk, including loss of capital. Indicator signals, levels, and the position-size suggestion are illustrative and must not be relied on as the basis for any trade. Always 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. Past behavior of any indicator is not indicative of future results.
Indicator

Market Cycle Wave [Gabremoku]Market Cycle Wave is a price-based cycle indicator built to map broad market phases into a readable oscillator and a price-anchored overlay.
Instead of relying on a single signal, the script combines trend, momentum, volatility, and range-position data into a composite cycle score. That score is normalized and smoothed to create an intermediate Cycle Wave, while a slower Secular line provides broader context.
The script has two main views:
- an oscillator pane with the score histogram, Cycle Wave, Secular baseline, and major Cycle Peak / Cycle Trough labels.
- a price overlay with a cycle line, gradient aura, and a thinner secular context line.
The regime model classifies market conditions into Debt Accumulation, Deleveraging, Reflation, and Transition. The goal is not to generate standalone buy/sell signals, but to help traders read where price may sit inside a broader market cycle structure.
How to use it
This indicator works best on broad indices and diversified equity ETFs, where cycle behavior is usually cleaner than on highly erratic single names.
Typical use:
- Daily chart: monitor intermediate cycle shifts
- Weekly chart: study broader regime transitions
Practical reading:
- A rising blue cycle wave can suggest constructive expansion conditions
- A yellow rollover after a mature advance can suggest a weakening cycle structure
- Deep negative readings followed by green recovery can suggest reflation or post-stress repair
- The secular line helps show whether the shorter cycle is moving with or against the broader backdrop
The dashboard summarizes the current regime, state, direction, score, risk posture, and color legend directly on the chart.
How it works
The cycle model uses eight price-based factors:
- Fast EMA vs slow EMA relationship
- Fast EMA slope
- RSI momentum regime
- RSI extremes
- Position inside the rolling yearly range
- Distance from yearly extremes
- ATR volatility regime
- Price position vs the slow EMA
Each factor contributes to a composite score. That score is then normalized, smoothed, and accumulated over a rolling memory window to build a bounded cycle wave around a midpoint.
A second and slower baseline is built through longer smoothing to represent secular context. This creates two distinct layers:
- Cycle Wave: the intermediate cycle, more reactive to market swings
- Secular Baseline: the broader context, slower and less sensitive
Recent Cycle Peak and Cycle Trough labels are pivot-based, so the latest labels need confirmation from future bars. Indicator

Tectonic Regime Protocol [JOAT]Tectonic Regime Protocol
Introduction
Tectonic Regime Protocol is an open-source Pine Script v6 strategy that combines four analytical modules into a single rule-based trading system: a four-state regime classifier, a three-layer trend filter, a six-pillar confluence entry engine, and an adaptive exit module using ATR-based partial take-profit and a regime-adaptive trailing stop.
The strategy is designed for traders who want a fully automated systematic framework to study how regime-gating affects signal quality. Its primary hypothesis is that directional entries made when (1) the market is classified as a trending regime, (2) trend filters across multiple timeframes align, and (3) multiple structural, volume, and momentum inputs agree, produce statistically better outcomes than entries based on any single condition alone.
Strategy Default Properties
Initial capital: $100,000
Order size: 2% of equity per trade
Commission: 0.04% per side
Slippage: 2 ticks
Maximum open positions: 1
These settings represent realistic conditions for a funded discretionary trader using a liquid futures or equity instrument. The 2% equity sizing limits maximum theoretical drawdown from any single trade while providing meaningful position exposure. Commission and slippage values reflect typical institutional-grade execution costs for electronically traded instruments.
Core Concepts
1. Four-State Regime Classifier
The regime module classifies each bar into one of four states using ADX relative to a threshold and the ATR-to-SMA(ATR) ratio: Trend Bull, Trend Bear, Range High-Vol, Range Low-Vol. Only Trend states are eligible for entry. Range classifications suppress all entries regardless of how strong the confluence score is. This is the primary market context filter.
2. Three-Layer Trend Filter
Three independently computed trend conditions must all agree before a long or short entry is considered: close versus VWMA(200) determines whether price is above or below long-term value; the relationship between fast and slow HMA lines determines medium-term momentum direction; and the close versus a 50-period EMA on a higher timeframe provides multi-timeframe context.
3. Six-Pillar Confluence Score
The entry engine scores six market dimensions and requires the composite bull or bear score to exceed 50 of 100 (default, configurable) with a directional lead of at least 8 points above the opposing score. The six pillars are: market structure, OBV slope direction, KAMA position + RSI + WPR composite, swing-low liquidity sweep detection, ATR ratio in productive range, and Fractal Efficiency Ratio above 0.30.
bool longSetup = validRegime and regime == 1 and trendBull
and bull >= confThreshold and (bull - bear) >= confGap
and barstate.isconfirmed
4. Adaptive Exit Module
The exit logic uses partial exits at two take-profit levels. TP1 closes 50% of the position at 1.0× risk distance. TP2 closes the remaining position at 2.0× risk distance. After TP1 is reached, the stop is moved to the entry price (breakeven). The stop before TP1 uses a regime-adaptive ATR trail — the stop multiplier is lower in low-volatility regimes (tighter) and higher in high-volatility regimes (looser). A 30-bar time-based exit closes any remaining position if neither TP nor stop is reached.
5. Non-Repainting Architecture
All entry conditions are evaluated only when barstate.isconfirmed is true. The HTF EMA is requested with lookahead=barmerge.lookahead_off. Pivot-based conditions use confirmed pivot detection with symmetric lookback. No future bar references are used.
Default Settings and Performance Notes
The strategy is published with the default Properties values listed above. Results shown on the publication chart are generated using these exact settings. Commission of 0.04% per side is representative of typical electronic execution on liquid instruments.
Win rate alone does not characterize strategy performance. The strategy is designed around a two-tier partial exit structure targeting positive expectancy (wins × average win greater than losses × average loss) rather than high win rate. The profit factor and average R-multiple are the more relevant metrics for this type of system.
Input Parameters
Regime Module:
ADX Trend Threshold (default: 20)
ATR Ratio High-Vol Threshold (default: 1.2)
Trend Filter:
VWMA Length (default: 200)
Ribbon Fast HMA and Slow HMA lengths
HTF Timeframe for EMA(50) filter (default: 240)
Enable HTF Filter toggle
Confluence Engine:
Min Score (default: 50, range 50–95)
Min Direction Lead (default: 8)
Min FER (default: 0.30)
FER Lookback (default: 14)
Individual pillar weights (Structure, Volume, Momentum, Liquidity, Volatility, FER)
Exit Module:
TP1 RR Multiple (default: 1.0)
TP2 RR Multiple (default: 2.0)
Stop Multiplier for Low / Med / High Volatility Regimes
Max Bars Hold (default: 30)
How to Evaluate This Strategy
Apply it to a liquid instrument with sufficient historical data to generate more than 100 trades. Compare profit factor, Sharpe ratio, average R-multiple, and maximum drawdown — not win rate in isolation. Test it across at least two different instruments or timeframes to assess whether the results reflect genuine structural edge or data-fitting to one specific market.
The strategy is not optimized for any single market. Default parameters are deliberately conservative to avoid overfitting. Users who adjust parameters to improve backtested results should recognize that improvement on historical data does not guarantee improvement on future data.
Strategy Limitations
On lower-timeframe charts with short histories, fewer than 100 trades may result, reducing the statistical reliability of the backtest
The HTF filter uses request.security() with a higher timeframe EMA. In live trading, the HTF value updates when the higher timeframe bar closes, which may differ slightly from live server-side execution
ATR-based stops and targets mean position sizes and outcomes scale with volatility. In abnormally low-volatility environments, commission costs represent a larger proportion of expected gain
The time-based exit at 30 bars may close profitable positions before TP2 is reached in slow-moving markets
Backtested performance on any instrument does not predict future performance. Markets change, and parameters that produced edge historically may not do so in future regimes
Originality Statement
Combining a four-state regime classifier, a three-layer multi-timeframe trend filter, a six-pillar confluence score including Fractal Efficiency Ratio, and a partial-exit adaptive trailing stop system in a single non-repainting open-source strategy is an original integration of methods
The Fractal Efficiency Ratio as a pillar in a multi-factor entry score, and as a required gate condition for entry, is not present in existing open-source Pine Script v6 strategy publications as of this writing
The regime-adaptive stop multiplier — loosening in high-volatility regimes and tightening in low-volatility regimes — is an original stop calibration approach within this strategic framework
The dual entry mode (edge transition OR re-entry when flat with elevated score) increases signal frequency without compromising the fundamental regime and trend filter requirements
Disclaimer
This strategy is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any financial instrument. Backtested results are simulated and do not represent real trading. Simulated results have inherent limitations and may not reflect actual trading outcomes due to market impact, execution differences, and changing market conditions. Past backtested performance does not guarantee future results. Trading involves substantial risk of loss. Always conduct independent due diligence and apply proper risk management before using any strategy with real capital. The author accepts no responsibility for trading losses resulting from use of this strategy.
Made with passion by jackofalltrades
Strategy

Order Flow Asymmetry [JOAT]Order Flow Asymmetry
Introduction
Order Flow Asymmetry is an open-source synthetic institutional order flow indicator that tracks four independent measures of directional institutional activity — Volume-Weighted Momentum, Liquidity Vacuum detection, Microstructure Imbalance scoring, and a dynamic Information Ratio Band system — and classifies the current market into one of four regime states based on trend direction and volatility level. Smart money signals are generated only when regime, VWM direction, imbalance score, and the absence of a liquidity vacuum all align simultaneously.
The core thesis is that institutional participants leave statistical footprints in price and volume data that can be approximated without access to full order book data. When a large participant is absorbing supply, the result is: above-average volume, below-average price movement, high close-to-range ratio biased toward the institutional direction, and a cumulative imbalance in the bid-side proxy. Order Flow Asymmetry tracks these proxies simultaneously rather than relying on any single measure.
Core Concepts
1. Volume-Weighted Momentum (VWM)
VWM weights each bar's price change by its volume — large-volume bars contribute more to the running total than small-volume bars. The cumulative result is then normalized relative to the 20-bar average volume, producing a -50 to +50 reading:
float vwm = ta.cum(ta.change(close) * volume) / ta.ema(volume, 20)
float vwmNorm = (vwm - ta.lowest(vwm,100)) / math.max(ta.highest(vwm,100) - ta.lowest(vwm,100), 1e-9) * 100 - 50
A crossover of zero in either direction is the primary momentum signal.
2. Liquidity Vacuum Detection
A liquidity vacuum occurs when volume collapses below two standard deviations of its 50-bar mean while price moves more than one ATR in the same bar. This pattern indicates a move through a region with no counterparty liquidity — a potential institutional trap. Vacuum bars are marked with three-layer glow boxes and treated as signal inhibitors.
3. Microstructure Imbalance Score
A bar-level bid/ask proxy is computed from close position within the high-low range. Bars closing in the upper half of their range contribute positive imbalance; bars closing in the lower half contribute negative. A 93% decay factor is applied each bar, producing a running imbalance score that emphasizes recent activity while retaining historical context.
4. Four-State Regime Classification
The regime is determined by two binary conditions: ADX above threshold (trending vs. ranging) and ATR ratio above threshold (high vs. low volatility). This produces four states: Trend Bull, Trend Bear, Range High-Vol, Range Low-Vol. Each state receives a distinct background tint. Smart money signals require a Trend state — signals in Range states are suppressed.
5. Information Ratio Bands
Standard deviation bands are computed from the MIDAS VWAP. The band width multiplier is dynamically set by the rolling Sharpe ratio estimate of recent returns — periods with higher risk-adjusted returns produce narrower bands, while periods with lower Sharpe ratios produce wider bands.
float sharpe = ta.ema(ret20, 20) / math.max(ta.stdev(ret20, 20), 1e-8)
float kFactor = math.max(0.5, math.min(3.0, math.abs(sharpe) * 2))
Features
Volume-Weighted Momentum: Cumulative volume-weighted price change normalized to -50/+50 range
Institutional VWAP center line: Thick reference line showing the cumulative volume-weighted average price anchor — the central institutional value reference
VWM gradient fill zones: Bull zone fills between VWAP and upper VWM level in bull theme color; bear zone fills between VWAP and lower VWM level in bear theme color — intensity reflects VWM magnitude
IR Band gradient fill: Subtle gradient fill between upper and lower Information Ratio bands shows the full Sharpe-adjusted deviation range
Regime transition markers: Every regime change draws a vertical dotted line plus a direction label (▲ TrendBull / ▼ TrendBear / ◆ RngHVol / ◇ RngLVol) — institutional regime context at a glance
Absorption / Distribution labels: "Absorption" label when cumulative microstructure imbalance score exceeds extreme threshold; "Distribution" label when it falls below. Identifies potential institutional accumulation/distribution zones
Smart money signal markers: "▲ SMART LONG" / "▼ SMART SHORT" labels with embedded VWM and Imbalance values, plus a vertical dotted line through each signal bar for visual alignment
Liquidity vacuum detection: Volume collapse + ATR-relative move identifies institutional trap zones with 3-layer glow visualization and "Vacuum" text label
Microstructure imbalance score: Decaying cumulative bid/ask proxy normalized by ATR, displayed in dashboard
Four-state regime classification: Trend Bull / Trend Bear / Range High-Vol / Range Low-Vol from ADX and ATR ratio — distinct background tints for each state
Information Ratio Bands: VWAP deviation bands with width dynamically set by rolling Sharpe estimate
Gradient candle coloring by VWM: Bar colors reflect normalized VWM intensity using color.from_gradient() when VWM exceeds threshold in trend direction
Three-layer glow candles (optional): Institutional-style neon glow candle effect
12-row institutional dashboard: Regime, VWM, vacuum state, imbalance score, Sharpe k-factor, IR band levels, signal, win rate, and performance stats
Four color themes: Phantom, Neon, Classic, Solar
Non-repainting: All signals gated by barstate.isconfirmed; all inputs are historical only
Input Parameters
Volume-Weighted Momentum:
Volume Average Length (default: 20)
VWM Cross Threshold (default: 5.0)
Liquidity Vacuum:
Volume Mean Length, Sigma Below Mean, Vacuum Zone Width, Glow Strength
Microstructure Imbalance:
Imbalance Decay Factor (default: 0.93)
Imbalance Signal Gate (default: 15.0)
Regime Classification:
ADX Trend Threshold (default: 25)
ATR Ratio High-Vol Threshold (default: 1.2)
Information Ratio Bands:
Show IR Bands toggle
Sharpe Window (default: 20)
Signal:
Cooldown Bars, TP ATR Multiple, SL ATR Multiple, Show Trade Block, Block Width
How to Use This Indicator
Step 1: Identify the Regime
Check the dashboard Regime row. Smart money signals only fire in Trend Bull or Trend Bear states. During Range states, no signals are generated regardless of VWM direction.
Step 2: Watch for VWM Zero Cross
The VWM crossing zero in the direction of the trend regime is the primary trigger. Ensure no vacuum is active on the signal bar — vacuum bars inhibit signals because they represent suspect moves without genuine counterparty support.
Step 3: Check Imbalance Score
The imbalance score reflects cumulative directional bias in bid/ask proxy. A score above the gate threshold in the trend direction adds confidence. A score contradicting the trend direction is a warning.
Step 4: Use IR Bands as Dynamic Reference
The Information Ratio bands widen in low-Sharpe environments (price distributing far from VWAP) and narrow in high-Sharpe environments (price efficiently priced near VWAP). These bands serve as dynamic reference levels rather than fixed targets.
Indicator Limitations
VWM uses tick volume as a proxy for institutional participation. On forex spot and some crypto venues, tick volume may not accurately represent actual participation
The microstructure imbalance score uses bar close position as a bid/ask proxy. This is an approximation — actual bid-ask data is not available in standard PulseWire data
Regime classification uses ADX and ATR ratio, both of which lag price. A trend beginning explosively will be classified as ranging for several bars until indicators respond
The Information Ratio Band width is driven by a 20-bar Sharpe estimate, which is an extremely short window for a reliable Sharpe computation. It should be interpreted as a dynamic band-width scaler rather than a statistically significant Sharpe ratio
Smart money signals are rare by design — the four-condition gate produces low-frequency output
Originality Statement
The combination of Volume-Weighted Momentum, Liquidity Vacuum detection as a signal inhibitor, a decaying Microstructure Imbalance score, and Information Ratio Bands with Sharpe-driven width — all gated by a four-state regime classification — is an original analytical architecture not replicated in existing open-source Pine Script v6 publications
Treating liquidity vacuums as signal inhibitors rather than signals themselves — suppressing momentum signals that occur immediately after a volume-collapse move — is a novel application of vacuum detection logic
Dynamic VWAP deviation band width driven by a rolling Sharpe ratio estimate rather than a fixed multiplier provides adaptive band boundaries that reflect the current efficiency of price relative to VWAP
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Synthetic order flow measures are approximations that use publicly available price and volume data as proxies for actual institutional activity. Past signal performance does not predict future results. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Entropic Regime Field [JOAT]Entropic Regime Field is an open-source market state classifier that uses three quantitative measures — Fractal Efficiency Ratio, a synthetic Hurst Exponent approximation, and a Garman-Klass volatility estimator — to classify each bar into one of three entropy states: LOW (predictable, directional structure present), TRANSITION (regime shift underway), and HIGH (chaotic, low-predictability environment). Directional signals from an Adaptive Momentum Oscillator are filtered to fire only during LOW entropy states, where momentum signals have historically more reliable edge than during random or chaotic market behavior.
The foundational premise is that markets alternate between periods of organized directional behavior and periods of disorganized random movement. Trading momentum signals indiscriminately across both environments degrades overall performance because the same signal that has edge in a trending market produces random outcomes in a chaotic one. By measuring the structural organization of price movement directly — rather than relying on ADX alone, which is a lagging momentum derivative — Entropic Regime Field attempts to identify when the market's behavior is organized enough for directional signals to have context.
Core Concepts
1. Fractal Efficiency Ratio (FER)
The FER measures how efficiently price has moved over a lookback period — the ratio of the net directional distance to the total path length of individual bar-to-bar changes. A value near 1.0 indicates straight-line directional movement; a value near 0.0 indicates constant reversals:
float ferNet = math.abs(close - close )
float ferPath = math.sum(math.abs(ta.change(close)), ferLen)
float ferVal = ferPath > 0.0 ? ferNet / ferPath : 0.0
2. Synthetic Hurst Exponent
The Hurst Exponent characterizes the memory of a time series. Values above 0.5 indicate persistence (trending), values near 0.5 indicate randomness, and values below 0.5 indicate anti-persistence (mean-reversion). A simplified Hurst estimate is computed using the variance ratio method:
float var1 = ta.variance(ta.change(close, 1), hurstWindow)
float var5 = ta.variance(ta.change(close, 5) / 5, hurstWindow)
float hurstEst= 0.5 * math.log(var1 / var5) / math.log(5) + 0.5
3. Garman-Klass Volatility Estimator
Standard ATR uses only the prior close and current high/low. The Garman-Klass estimator uses all four OHLC prices, producing a more statistically efficient estimate of true volatility:
gkBar = 0.5 * math.pow(math.log(high / math.max(low, syminfo.mintick)), 2.0)
- (2.0 * math.log(2.0) - 1.0) * math.pow(math.log(close / math.max(open, syminfo.mintick)), 2.0)
The GK estimate is averaged over a configurable period and normalized to a 0-100 percentile rank over the trailing 100 bars.
4. Three-Factor Entropy Classification
LOW entropy requires FER above a threshold AND ADX above a minimum AND Hurst estimate above 0.52. HIGH entropy is triggered when FER falls below a lower threshold OR ADX falls below a minimum. TRANSITION is the state between the two.
5. Adaptive Momentum Oscillator (AMO)
The AMO blends three momentum inputs with fixed weights: RSI(14) centered at 50 (40%), Stochastic(14) centered at 50 (35%), and Williams Percent Range(14) centered at -50 (25%). Directional signals fire only in LOW entropy when AMO crosses zero and KAMA confirms via crossover/under.
Features
Fractal Efficiency Ratio: Net directional move divided by total path length, configurable lookback
Synthetic Hurst Exponent: Variance ratio approximation identifying persistent vs. anti-persistent price behavior
Garman-Klass volatility: OHLC-based volatility estimator normalized to percentile rank over 100 bars
Three entropy states: LOW, TRANSITION, HIGH — each with distinct visual treatment
10-line entropy ribbon: EMA lines colored by entropy state for visual history of regime transitions
Adaptive Momentum Oscillator: RSI + Stochastic + WPR composite with fixed optimal weights
Entropy-gated signals: AMO + KAMA confirmation signals fire only in LOW entropy state
Regime background tint: Background tinted by entropy state, cleared after 10 bars
Trade block on signal: ATR-based TP and stop rendered as boxes on signal bars
12-row institutional dashboard: FER, Hurst estimate, GK volatility percentile, ADX, AMO, entropy state, signal, win rate, bars in current state
Non-repainting: All signals gated by barstate.isconfirmed; no future data referenced
Four color themes: Phantom, Neon, Classic, Solar
Input Parameters
Fractal Efficiency:
FER Lookback (default: 14)
LOW Entropy FER Minimum (default: 0.60)
HIGH Entropy FER Maximum (default: 0.35)
Hurst Exponent:
Hurst Window (default: 20)
LOW Entropy Hurst Minimum (default: 0.52)
Garman-Klass Volatility:
GK Averaging Length (default: 14)
ADX Gate:
Min ADX for LOW Entropy (default: 22)
Signal:
AMO Cross Threshold, KAMA Period, Cooldown Bars
TP ATR Multiple, SL ATR Multiple
How to Use This Indicator
Step 1: Read the Entropy State
Check the dashboard. LOW entropy means the market is behaving in an organized, directional way — this is when momentum signals carry more weight. HIGH entropy means the market is chaotic — avoid directional signals.
Step 2: Watch FER and Hurst Together
FER and Hurst are independent measures of market organization. When both agree (high FER AND Hurst > 0.52 simultaneously), the LOW entropy classification is more reliable.
Step 3: Enter on AMO + KAMA Confirmation
Signals fire only when the AMO crosses zero in the signal direction AND price crosses the KAMA level simultaneously. Both conditions must occur on the same confirmed bar in a LOW entropy environment.
Indicator Limitations
The Hurst approximation via variance ratio is a simplified estimate. It should be treated as a directional indicator of persistence, not a precise statistical measure
The FER computation on every bar may affect chart loading performance for very long lookback periods on large datasets
LOW entropy classifications can persist during slow grinding trends that produce high FER but low volatility. These environments may produce signals with narrower ATR-based targets
The GK estimator can return unreliable values when open equals close (as occurs on some synthetic instruments or during gaps)
This indicator classifies entropy state. It does not predict how long the state will persist or when it will change
Originality Statement
The combination of Fractal Efficiency Ratio, synthetic Hurst Exponent via variance ratio, and Garman-Klass volatility estimator as a three-factor entropy classification system gating AMO momentum signals is not replicated in any existing open-source Pine Script v6 publication as of this writing
The Garman-Klass estimator as a volatility input provides a more statistically efficient OHLC-based volatility measure that captures intraday range information not available in ATR
Gating a composite three-input momentum oscillator by an entropy state derived from completely different mathematical principles (efficiency, persistence, and OHLC volatility) rather than using a single lagging derivative like ADX as the sole filter is an original analytical architecture
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Entropy classifications are approximations based on historical price data and do not guarantee future market behavior will repeat. The Hurst approximation used is a simplified estimate, not a statistically rigorous computation. Past win rates do not predict future performance. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Adaptive Momentum Strength Score (AMSS)There is a specific kind of frustration that every serious trader knows.
The setup looks right. The candle closes with conviction. The oscillator confirms. You enter and the move immediately stalls, reverses, or dissolves into noise. Later you realize the volume was weak, volatility never truly expanded, or directional pressure had already started fading before the entry.
That frustration is not a discipline problem. It is an information problem.
Most momentum indicators measure one piece of the puzzle. RSI measures price velocity. Volume indicators measure participation. Bollinger Bands measure volatility state. Each tells part of the story. The Adaptive Momentum Strength Score was built on the conviction that momentum quality can only be evaluated meaningfully when several complementary market forces are read together, not after the fact, but simultaneously, on every bar.
The Core Framework
The purpose of the composite score is straightforward: to answer not just whether price is moving, but whether the move is supported by the conditions that tend to give momentum its staying power.
The score is normalized between 0 and 100 and built from three independent components. The first measures candle impulse relative to ATR not raw candle size, but how decisive the current bar is in the context of what normal looks like for this asset right now. The second measures volume participation by comparing current volume against its moving average, distinguishing genuine momentum expansion from the kind of low-participation drift that precedes failed breakouts far more often than it precedes continuation. The third measures volatility expansion through Bollinger Band width relative to its own average, detecting the transition from compression into expansion as a market begins releasing stored energy.
Each component is independently normalized before combining. By default, volume participation carries the greatest weight of the three — a deliberate choice reflecting the observation that genuine participation tends to be the most reliable differentiator between momentum that follows through and momentum that fades. Candle impulse and volatility expansion carry equal secondary weight, acknowledging that decisive price movement and volatility expansion both contribute meaningfully to momentum quality without either being treated as a primary condition on its own. All weights remain fully adjustable for traders who prefer a different emphasis across different assets or timeframes.
What separates this framework from most traditional oscillators is that momentum strength, directional pressure, market regime, momentum acceleration, and signal confirmation are kept as independent layers that work together while remaining individually interpretable. The goal is not to compress everything into a single binary output but to provide a structured view of how momentum is developing and whether broader conditions are genuinely supportive.
Adaptive Thresholds
A composite score is only as useful as the threshold that determines when it becomes meaningful.
The indicator supports two threshold modes. Fixed mode works cleanly in stable trending environments where volatility expression is consistent. Adaptive mode the recommended default calculates the threshold dynamically using rolling score averages and standard deviation scaling, then clamps it within a defined range. As market character shifts, the threshold recalibrates automatically rather than forcing traders to manually adjust a static level every time volatility conditions change.
The practical consequence is worth understanding directly. In a static-threshold oscillator, a compression phase floods the chart with false crossovers while a genuine expansion phase can produce delayed or missed signals. The adaptive threshold adjusts to both conditions without intervention. The active level is always displayed as the orange reference line, there is never ambiguity about where the signal boundary sits.
The score is additionally classified into Weak, Moderate, and Strong states relative to the active threshold, allowing momentum quality to be evaluated quickly without relying on raw numerical values alone.
Directional Pressure
The score measures momentum magnitude. Direction is handled through a completely separate layer.
Directional bias is established through a two-part confirmation test on every bar. Price must sit on the correct side of a short-period directional EMA, and the average ATR-normalized candle direction over the recent lookback must clear a pressure threshold, meaning a single extended wick or isolated candle cannot flip the directional label on its own. The result is a three-state classification that updates in real time: Bullish, Bearish, or Neutral. This label colors the score line and feeds directly into the signal confirmation logic.
Regime Classification
Not all momentum signals carry equal weight. A score crossover during an expanding market is a categorically different event from the same crossover inside a compressed, coiling environment and treating them identically is one of the more common ways momentum-based approaches produce inconsistent results.
The indicator measures the range of the score over a lookback window and classifies conditions into three states. Compressed means the score has been operating within a narrow band, the market is coiling, energy may be building, and momentum signals in this state generally exhibit lower follow-through and greater variability, although strong expansions can emerge from prolonged compression. Balanced reflects normal trending or ranging conditions. Expanding means the score range has broken above the expansion threshold the market is releasing energy, and momentum signals carry stronger continuation characteristics during this state.
Regime classification can be applied as a filter to triangle signals or used purely as context within the dashboard.
Momentum Velocity
Knowing where the score is tells you the current momentum level. Knowing how fast it is changing tells you something more useful, where momentum is likely heading before price makes it obvious.
The velocity engine calculates the rate of change of the score relative to its own standard deviation, producing a normalized reading that classifies momentum as Accelerating, Decelerating, or Flat. When the score is rising rapidly against its recent volatility baseline, conditions are classified as Accelerating. When the score is fading even if it remains above the threshold the label shifts to Decelerating, and the score line renders at reduced opacity as a visual signal that underlying momentum may be exhausting before price visibly reacts.
For traders who have held into momentum reversals that showed no obvious price-level warning, this layer provides an early internal warning signal within the indicator's architecture that conditions are beginning to shift.
Two Signal Tiers
The indicator produces signals on two distinct levels, and the distinction between them is worth understanding precisely.
Threshold dots appear whenever the score crosses the active threshold while directional pressure is already aligned. They are intentionally sensitive as early directional momentum awareness signals indicating that conditions are beginning to strengthen, even though the broader filter stack may not yet be confirmed. Experienced traders use them to shift attention and begin evaluating whether a fuller setup is developing.
Triangle signals are the fully confirmed output. A triangle only appears when the score crosses the threshold, directional pressure agrees, and every enabled filter in the active gate stack also confirms simultaneously. This is not a smoothed version of the dot signal. It is a categorically different signal type representing the convergence of multiple independent conditions at the same moment.
The separation is deliberate. Dots keep traders informed of developing momentum. Triangles reserve the strongest visual output for the moments that genuinely earn it.
The Signal Gate Stack
Before any triangle reaches the chart it passes through up to four independent gates, stackable in any combination.
The current-timeframe EMA filter blocks signals running counter to local trend structure. The higher-timeframe EMA filter adds a structural second opinion from a broader timeframe, 4-hour by default with an option to use only confirmed closed bars to avoid incomplete higher-timeframe calculations. The regime filter restricts signals during compressed conditions or limits them to expanding phases only. The cooldown gate enforces a minimum bar gap between consecutive signals, suppressing the cluster of repeat triggers that commonly fire around a single momentum event and dilute signal quality.
The dashboard always displays exactly which gates are active. Traders never need to guess why a triangle did or did not appear, the filter logic is visible at all times.
Reading the Indicator: A Practical Workflow
1. Assess market regime first . Check the Info Table before anything else. Compressed conditions mean the score has been coiling in a tight range crossovers here often require greater selectivity, as follow-through tends to be less reliable until expansion begins, and participation should be approached more selectively. Expanding conditions deserve closer attention, as momentum signals generally carry stronger continuation characteristics during these phases.
2. Verify directional alignment. Confirm that the score line color and the Direction label in the dashboard match your intended trade direction. A technically valid score crossover against prevailing directional pressure is a lower-quality setup by design.
3. Watch for the threshold dot on the score pane . A small circle plots on the score line the moment momentum crosses the active threshold while directional pressure is already aligned. This is your early awareness signal. It means conditions are beginning to strengthen, but the broader confirmation stack may not yet be complete. Use it to shift attention to the price chart, not necessarily to trigger execution.
4. Wait for the triangle on the price chart . The triangle is the confirmed execution signal. It only appears when the score has crossed the threshold, directional pressure agrees, and every enabled gate in your active filter stack has confirmed simultaneously. Depending on your settings, this may include EMA alignment, regime validation, and cooldown logic. No triangle means at least one required condition has not been met, regardless of how the score looks in the pane below.
5. Check momentum velocity before entry. An Accelerating label at the point of the triangle adds meaningful weight to the setup. A Decelerating label on an otherwise valid triangle is a caution not necessarily a reason to avoid the trade, but a reminder that momentum quality may be less aggressive, follow-through may develop more gradually, or reversal risk may be beginning to increase.
6. Manage the trade with velocity as context, not as a standalone exit signal . If the score remains above or near the threshold but the line has dimmed signaling Decelerating momentum the move may be losing force even while price continues in the same direction. This does not automatically invalidate the trade or imply immediate exit. Instead, use velocity as an additional layer of context alongside price structure, trend conditions, and your existing risk-management framework.
What This Indicator Is Designed For
The Adaptive Momentum Strength Score is not a standalone trading system and does not attempt to be one. It is a momentum context engine — a structured framework for evaluating whether the conditions behind a price move reflect genuine strength and participation or whether they represent the kind of isolated, low-quality momentum that tends to produce less reliable continuation.
Every design decision in this script traces back to a single conviction: durable edge in trading does not come from reacting faster to a single signal. It comes from reading multiple independent market forces simultaneously and acting only when they converge. That is what this indicator was built to do and that is the only thing it claims to do well.
My Scripts/Indicators/Systems are for educational purposes only! Indicator

Delta Barometer [JOAT]Delta Barometer
Introduction
Delta Barometer is an open-source dual-engine institutional pressure indicator that generates directional signals from two independent momentum measurement systems — an ATR trailing stop with Trend Strength Score, and a cumulative delta volume crossover with Pressure Score — and allows the user to configure how the two engines interact via four hybrid modes.
The core insight is that trend-following signals and momentum signals often disagree during transition periods and agree during high-probability setups. By building both engines independently, assigning each a score that reflects the quality of its reading, and providing modes that require either one engine, either engine, or both engines simultaneously, the indicator lets traders choose the selectivity level appropriate to their strategy. Requiring confluence produces fewer but higher-quality signals; allowing either engine to fire produces more signals with less selectivity.
Core Concepts
1. Engine A: ATR Trailing Stop with Trend Strength Score
A regime-adaptive ATR trailing stop is computed with different multipliers for low, medium, and high volatility environments. The ATR ratio determines the regime. The trail ratchets in one direction only and produces a signal on flip.
A Trend Strength Score (TSS) between 0 and 100 qualifies each trail flip: RSI slope magnitude contributes 40%, volume rate relative to its average contributes 35%, and ATR expansion relative to a shorter ATR period contributes 25%.
float tssScore = (rsiSlopeComp * 0.40 + volRatioComp * 0.35 + atrExpandComp * 0.25) * 100
2. Engine B: Cumulative Delta Volume with Pressure Score
Signed volume (positive when close is above open, negative otherwise) is accumulated into a running cumulative delta. A moving average of the cumulative delta is computed. A crossover of delta above its moving average is a potential bullish signal; a crossunder is bearish.
A Pressure Score between 0 and 100 qualifies each delta crossover: the magnitude of the delta ratio contributes 40%, volume rate relative to average contributes 35%, and candle body size relative to candle range contributes 25%.
3. Four Hybrid Modes
Both Engines: A signal requires both Engine A and Engine B to produce a raw signal simultaneously. Highest selectivity.
Priority A: Engine A signals take precedence; Engine B fills gaps where A is not firing.
Priority B: Engine B signals take precedence; Engine A fills gaps where B is not firing.
Either Engine: A signal fires when either engine produces a raw signal. Highest frequency.
4. Regime Arming
Each engine can be restricted to fire only in compatible volatility regimes — preventing the trailing engine from generating whipsaw signals during volatility compression.
5. Five-State Pressure Candle Coloring
Bar colors reflect the combined pressure state across both engines on a five-level scale: strong bull, moderate bull, neutral, moderate bear, strong bear.
Features
Engine A — ATR trail with TSS: Regime-adaptive trailing stop with Trend Strength Score qualifying each flip signal
Engine B — Delta volume with Pressure Score: Cumulative signed volume crossover with composite Pressure Score qualification
Four hybrid modes: Both Engines, Priority A, Priority B, Either Engine — configurable selectivity
Regime arming: Each engine independently armed for specific volatility regimes
Five-state pressure candle coloring: Strong bull / moderate bull / neutral / moderate bear / strong bear reflected in bar colors
Gradient trail fill: Gradient between trailing stop and close; color inverts with trail direction
Trade block on signal: Entry, stop (correctly positioned above entry for shorts, below for longs), and TP level rendered as colored boxes on confirmed signals. Stop line is bold dashed red with high-contrast label background. Entry always sits visually between the stop and take-profit zones
9-column horizontal dashboard: Mode, regime, TSS, pressure score, trail direction, delta, engine ID, signal state, status — shown in a horizontal table layout at chart bottom
Non-repainting: All signals confirmed on barstate.isconfirmed
Four color themes: Phantom, Neon, Classic, Solar
Backtest tracker: Win rate and expected value tracked per engine type
Input Parameters
Engine A — ATR Trail:
ATR Length, Low/Med/High Regime Multipliers
Regime ATR Lookback, Low/High Vol Thresholds
TSS Lookback and Min TSS Score to fire
Engine B — Delta Volume:
Delta MA Length, Min Pressure Score
RSI Overbought/Oversold gates
Hybrid Mode:
Hybrid Mode: Both Engines / Priority A / Priority B / Either Engine
Engine A and B arming: All / Low Only / Med + High / High Only
Signal:
Cooldown Bars, TP ATR Multiple, SL % from Entry
How to Use This Indicator
Step 1: Select the Hybrid Mode
Start with Either Engine for maximum signal frequency. Switch to Both Engines when you want only the highest-conviction setups. Priority modes are useful when you trust one engine more than the other for a particular asset.
Step 2: Read the 9-Column Dashboard
The horizontal dashboard shows the current state of both engines simultaneously. The ENGINE column shows which engine fired (A, B, or A+B for confluence). The TSS and PRESSURE columns show the raw quality scores of each engine.
Step 3: Verify Trade Block Direction
For LONG signals: the red risk box appears below entry (stop is below) and the green reward box appears above entry (TP is above). For SHORT signals: the red risk box appears above entry (stop is above) and the green reward box appears below entry (TP is below). Entry is always the dividing line between the two zones.
Step 4: Use Regime Arming for Market Fit
If the asset tends to trend strongly, arm Engine A for all regimes. If it is more volatile-momentum driven, arm Engine B for all regimes. Use Med + High arming for Engine A to avoid choppy low-volatility whipsaws.
Indicator Limitations
The TSS score components all lag price by varying amounts. Signals in fast-moving markets may arrive after the optimal entry point
Cumulative delta volume as used here is a proxy. It approximates institutional bias without access to true bid-ask tick data
Both Engines mode will produce very few signals on most assets. Adjust to Priority or Either modes if signal frequency is too low
Regime classification uses ATR ratio, which is a lagging measure. A volatility spike that changes the regime will affect engine arming only after ATR responds
Originality Statement
The dual-engine architecture with four configurable interaction modes — each engine carrying its own qualification score — and per-engine regime arming is an original design not replicated in existing open-source Pine Script v6 publications
The Trend Strength Score weighting RSI slope, volume rate, and ATR expansion as qualification for ATR trail flip signals, combined with a separate Pressure Score for delta crossovers, provides independent signal quality assessment that single-engine indicators do not offer
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past signal statistics do not predict future performance. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Kinetic Ribbon Trail [JOAT]Kinetic Ribbon Trail
Introduction
Kinetic Ribbon Trail is an open-source trend-following indicator built on two structural layers: a 20-line Hull Moving Average gradient ribbon that quantifies the spread and conviction of near-term versus long-term momentum, and a Fibonacci-anchored adaptive trailing stop that adjusts its sensitivity based on the current swing structure and volatility ratio. The two layers interact — the ribbon provides visual context for momentum strength while the trail provides the dynamic level that determines directional bias.
The unique analytical contribution is the ribbon normalization. Most HMA ribbon indicators simply plot multiple lines and fill between them. Kinetic Ribbon Trail computes the signed spread between the fastest and slowest ribbon line, normalizes it by the 200-bar exponential average of that spread, clamps it to a -1 to +1 range, and uses the result to drive a continuous color gradient between the bear and bull theme colors. This means the ribbon's color intensity directly reflects how unusual the current momentum spread is relative to its historical average — not just whether the ribbon is bullish or bearish.
Core Concepts
1. 20-Line HMA Ribbon with rFactor Normalization
Twenty Hull Moving Average lines are computed from a base period, incrementing by a configurable step. The spread between the fastest and slowest line is the primary signal variable:
rSpread = rh01 - rh20
rAvgSpread = ta.ema(math.abs(rSpread), 200)
rFactor = math.max(-1, math.min(1, rSpread / (rAvgSpread * 1.5 + 1e-9)))
rCol = color.from_gradient(rFactor, -1, 1, colorBEAR, colorBULL)
When the fastest line is far above the slowest relative to its recent average, rFactor approaches +1 and the ribbon glows in full bull theme color. The gradient reflects spread magnitude — a bullish spread twice as wide as normal appears more saturated than one just barely positive.
2. Fibonacci Adaptive Trailing Stop
The trailing stop anchors to swing structure rather than to fixed ATR multiples. Confirmed swing highs and lows define a Fibonacci range. Three trail levels are computed from this range at the 0.382, 0.5, and 0.618 Fibonacci retracement. One is selected based on the trail mode: Aggressive, Balanced, or Conservative. A volatility adjustment scales the selected level by the inverse of the current volatility ratio.
The trail ratchets: for longs, it can only move up. For shorts, it can only move down. A flip occurs when price closes through the trail level with body ratio and penetration confirmation.
3. Four-State Regime Detection
A four-state regime classification determines which visual treatments are active: Trend Bull, Trend Bear, Range High-Vol, Range Low-Vol. The classification uses ADX relative to a threshold and the ATR-to-SMA(ATR) ratio. When a regime transition occurs, the chart background is tinted for 10 bars in the corresponding theme color before clearing.
4. Six-Factor Confidence Score
Each signal is assigned a confidence grade (D through A+) based on six weighted factors: swing structure alignment (20%), regime alignment (20%), ADX strength (15%), volume participation (15%), volatility favorability (15%), and SMA50 proximity to trail level (15%). Signals below a user-set minimum grade are suppressed.
Features
20-line HMA gradient ribbon: rFactor-normalized color gradient reflecting momentum spread intensity vs. its 200-bar historical average
19 ribbon fill layers: Adjacent HMA lines filled with gradient opacity layers for depth visualization
Fibonacci adaptive trailing stop: Trail anchored to swing structure at 0.382 / 0.5 / 0.618 Fibonacci levels with volatility adjustment
Trail ratchet with flip confirmation: Trail advances in one direction only; flips require body ratio and penetration confirmation
Gradient trail fill: Fill between trail and close — top color opaque, bottom color transparent
Four-state regime detection: Trend Bull, Trend Bear, Range High-Vol, Range Low-Vol with background tint on transition
Six-factor confidence scoring: A+ / A / B / C / D grading system applied to each signal
Confidence filter: Signals below the minimum confidence grade are suppressed
Trade block on trail flip: Entry, stop, TP1/TP2/TP3 rendered as gradient boxes on confirmed flip signals
Backtest tracker: Win rate and expected value
Four color themes: Phantom, Neon, Classic, Solar
Non-repainting: All signals gated by barstate.isconfirmed
Institutional dashboard: 13-row table with regime, trail level, confidence grade, signal, TP/SL levels, and performance stats
Input Parameters
Ribbon:
Base Length: Fastest HMA period (default: 10)
Step: Increment between each ribbon line (default: 14)
Fibonacci Trail:
Trail Mode: Aggressive (0.618) / Balanced (0.5) / Conservative (0.382) / Auto (regime-adaptive)
Pivot Lookback: Bars required to confirm a swing pivot
Confidence:
Enable Confidence Filter toggle
Min Signal Grade: D / C / B / A / A+
Trade Levels:
Show Trade Block toggle
Risk Preset: Conservative / Balanced / Aggressive / Scalping
Extend Bars: How far lines project right
How to Use This Indicator
Step 1: Read the Ribbon Color
A deeply saturated bull color means the ribbon spread is unusually wide — momentum is strong. A muted or transitional color means the spread is near its historical average — momentum is uncertain.
Step 2: Watch for Trail Flips
A signal fires when the Fibonacci trail flips direction and confidence meets the minimum grade. The trade block appears immediately with entry, stop, and three TP levels.
Step 3: Use Regime Context
The four-state regime in the dashboard tells you whether you are in a trending or ranging environment. High-confidence signals in trending regimes carry more structural weight than the same grade in a ranging regime.
Indicator Limitations
Swing detection uses ta.pivothigh() and ta.pivotlow() with a lookback offset. The Fibonacci levels are computed from swings confirmed bars after they occurred
In markets with very shallow swing structures, the Fibonacci range can be small relative to ATR, causing the trail to cluster near the current price and produce excessive flips
The 20-line ribbon increases visual complexity. Reducing the base length and step can make the ribbon more compact on busy charts
The confidence score uses volume as one factor. On timeframes or instruments where volume is not meaningful, this factor should carry less weight
Regime detection uses ADX, which lags price. A trend that begins explosively may be classified as ranging for several bars before ADX responds
Originality Statement
The rFactor normalization — dividing ribbon spread by a 200-bar EMA of absolute ribbon spread, clamped to -1/+1, driving a continuous color.from_gradient() — is an original approach to HMA ribbon coloring that reflects relative momentum intensity rather than absolute direction
Anchoring a trailing stop to Fibonacci retracements of the current confirmed swing structure, with volatility-ratio adjustment and body/penetration confirmation on flips, is distinct from standard ATR-multiplier trailing stops
The six-factor confidence scoring system applied per signal, producing an A+ to D grade that gates signal output, provides per-trade quality assessment within the indicator itself
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past confidence grades and win rates do not predict future performance. The author accepts no responsibility for trading losses resulting from use of this indicator.
Made with passion by jackofalltrades
Indicator

Volatility Regime Dashboard## Overview
Volatility Regime Dashboard is a context and visualization tool that classifies the
current volatility state of any symbol as **Compressed**, **Normal**, or **Expanded**.
Instead of plotting a single raw volatility line, it combines two independent
normalized measures and only changes the displayed state when both of them agree.
A compact table reports the underlying numbers and how many bars the current regime
has lasted.
This script is a visualization and context tool. It does not generate buy or sell
signals. It does not provide financial advice and makes no performance, accuracy,
or future-result claims.
## What it visualizes
- A line in its own pane showing the **percentile rank of price-normalized ATR**
(0-100), with dashed guides at the compressed and expanded thresholds and a
dotted midline.
- A **regime background shade** (optional) coloring the pane by the current state.
- A **context table** with the regime name, the ATR percentile value, the
Fast/Slow ATR compression ratio, whether the two measures currently agree, the
regime persistence in bars, and the ATR length in use.
## How it works
Two measures are computed independently:
1. **Price-normalized ATR percentile.** ATR is divided by price (so the measure is
comparable across symbols and price levels), then ranked as a percentile over a
user-defined lookback (default 252 bars). A high percentile means current ATR is
large relative to its own recent history; a low percentile means it is small.
2. **Fast/Slow ATR compression ratio.** A fast-window ATR is divided by a
slow-window ATR. A ratio above 1 means range is expanding relative to its
baseline; below 1 means it is compressing.
Each measure is classified into Compressed (-1), Normal (0), or Expanded (+1) using
its own thresholds. The displayed regime uses **hysteresis**: it flips to Expanded
or Compressed only when **both** measures agree on that direction, returns to Normal
only when both measures sit in their middle bands, and otherwise **holds** the prior
regime while the two measures disagree. This reduces flicker compared with reacting
to either measure alone. A persistence counter tracks how many consecutive bars the
current regime has held.
## How to use it
- Read the regime as **situational context** about how active the market currently
is relative to its own recent behavior, not as an instruction to act.
- Watch the percentile line approach the dashed thresholds to anticipate when a
regime change may be confirmed by both measures.
- Use the persistence counter to gauge whether a regime is freshly established or
well established.
- Adjust the lookback and thresholds to match the symbol and timeframe you study;
the defaults suit daily charts and are a starting point, not an optimized set.
## What makes it original
Most volatility tools plot a single raw or smoothed value. This dashboard derives a
**single discrete regime from the agreement of two structurally different measures**
- a within-history percentile rank and a fast-versus-slow ratio - and gates state
changes with hysteresis so the regime persists through brief disagreement. It then
surfaces the **persistence duration** of the current regime. The combination of
cross-measure agreement, hysteresis, and persistence reporting is the contribution;
it is not a re-skin of a built-in ATR, Bollinger, or standard-deviation indicator.
## What it does not do
- Does not generate buy/sell signals.
- Does not give entry/exit, target-level, or position-sizing instructions.
- Does not predict price or forecast performance.
- Does not run a strategy or backtest.
- Does not place or manage orders for you.
## Limitations
- Volatility regime is **descriptive context**, not a forecast; an Expanded or
Compressed state can persist or reverse at any time.
- The percentile rank depends on the lookback window; very small lookbacks make the
state noisy and very large ones make it slow to update.
- On symbols or timeframes with sparse history, the percentile may be unstable until
enough bars are available.
- ATR divided by price assumes price is positive and non-zero; exotic data feeds may
behave unexpectedly.
- Default thresholds are reasonable starting values, not values tuned for any
particular market.
## Suggested chart setup
- Use a liquid, recognizable symbol on a daily timeframe so the percentile lookback
has enough history.
- Keep the chart clean: this indicator opens in its own pane, so remove unrelated
indicators and let the percentile line, threshold guides, regime background, and
table be clearly visible.
- Make sure the indicator name, symbol, and timeframe are visible in any published
screenshot.
---
## Japanese notes / 日本語補足
このスクリプトはボラティリティの状態を「Compressed(収縮)」「Normal(通常)」
「Expanded(拡大)」として表示する、コンテキスト把握用の可視化ツールです。価格で
正規化したATRのパーセンタイル順位と、ファスト/スロー期間のATR比率という2つの独立
した指標を用い、両者が一致したときだけ状態を変更するヒステリシス方式を採用していま
す。表には各指標の数値と、現在の状態が何本のバー継続しているかを表示します。
これは相場の状況を把握するための可視化ツールであり、売買の指示は行いません。投資
助言ではなく、将来の値動きや運用成績に関する主張も一切行いません。新規の建玉や手
仕舞い、ポジションサイズの提案も行いません。しきい値やルックバックは銘柄や時間足に
合わせて調整してください(初期値は最適化されたものではありません)。
Indicator

V-AEMA VMR [LB]Concept
The V-AEMA VMR (Volume-Adaptive Exponential Moving Average with Volatility-Modulated Regime) is a hybrid trend-following indicator that combines an EMA baseline with a volatility-based drift component. It produces a dynamic core line whose colour reflects the trend regime, surrounded by two levels of adaptive bands that expand or contract based on volume intensity. The indicator generates directional entry signals when price breaks the first band in the direction of the trend, and projects take-profit zones when price fully exits both bands.
Mathematical Foundation
The core line (Hybrid Line) is a weighted blend of a standard EMA and a volatility-shifted version of that same EMA :
HybridLine = EMA * W + (EMA + Drift) * (1 - W)
where the drift is derived from the Z-Score of price relative to the EMA, scaled by ATR :
Drift = Z_Score * ATR * 0.35
Z_Score = (Price - EMA) / StdDev(Price, L_vola)
Band width starts from a base volatility measure combining standard deviation and ATR :
BaseWidth = StdDev * 0.65 + ATR * 0.35
This base is then adjusted by a volume ratio and user-defined multipliers :
UpperWidth = BaseWidth * (BaseUpMult + (VolRatio - 1) * VolImpactUp)
LowerWidth = BaseWidth * (BaseDnMult + (VolRatio - 1) * VolImpactDn)
where VolRatio = min(max(Volume / SMA(Volume, L_vol), 0.35), 2.50) .
Two band levels are generated : Band 1 at HybridLine +/- Width, and Band 2 (extreme) at HybridLine +/- Width * 1.55 (upper) / 1.40 (lower).
What Problem Does It Solve ?
Conventional envelope indicators (Bollinger Bands, Keltner Channels) apply fixed multipliers to a single volatility metric and ignore volume dynamics. The V-AEMA VMR adapts its band width to both volatility and volume surges, producing wider bands during high-participation moves and narrower bands during quiet periods. The hybrid core line reduces pure EMA lag by incorporating a volatility offset, while the dual-band structure filters signals by strength : a break of Band 1 triggers an entry, while a break of Band 2 confirms an explosive move and projects a take-profit zone.
How To Interpret
Core line colour – cyan/green indicates the hybrid line is rising (bull regime) ; magenta/red indicates it is falling (bear regime).
Cloud and bands – the area between Band 1 and Band 2 forms a halo that thickens when volume expands. Narrow bands suggest low conviction or consolidation.
Entry signals – a triangle appears below the bar when price crosses above Upper Band 1 while the hybrid line is rising (long). A triangle appears above the bar when price crosses below Lower Band 1 while the hybrid line is falling (short). These signals are confirmed by the trend direction.
Take-profit zones – when the entire bar (high and low for shorts, low and high for longs) clears the extreme band (Band 2) in the direction of the signal, a coloured box is projected forward. The box represents a potential target zone based on the breakout amplitude and ATR, scaled by the TP Factor.
Info panel – displays the current regime (BULL/BEAR), the volume ratio (values above 1.0 indicate above-average participation), and the current upper/lower deviation values in price units.
Parameters
EMA Length – period of the base exponential moving average (default 55).
Volatility Length – period for the standard deviation used in the Z-Score calculation (default 34).
Volume Length – period for the volume moving average used in the volume ratio (default 34).
EMA Weight – blend ratio between the pure EMA and the volatility-drifted version. Higher values produce a smoother line ; lower values make it more reactive to volatility (default 0.80).
Upper Base Deviation – core multiplier for the upper band width before volume adjustment (default 1.55).
Lower Base Deviation – core multiplier for the lower band width before volume adjustment (default 1.05).
Volume Impact Upper/Lower – sensitivity of the upper and lower bands to the volume ratio. Higher values make bands expand more aggressively when volume surges (default 0.95 / 0.55).
ATR Length – period of the Average True Range used in band width and TP zone calculations (default 14).
Show Cloud – toggles the filled areas between bands.
Show Info Panel – toggles the real-time dashboard.
Show Signals – toggles the entry triangles.
Show TP Zones – toggles the take-profit projection boxes.
TP Projection Bars – how many bars forward the TP zone extends.
TP Factor – scales the height of the TP zone relative to the breakout range.
Max Historical TP Zones – limits the number of TP boxes kept on the chart.
Reference
This indicator is a proprietary design synthesising concepts from adaptive moving averages (Kaufman, Ehlers), volatility envelopes (Bollinger, Keltner), and volume-weighted band models. It does not correspond to a single academic publication. Indicator

Sentinel Cascade [JOAT]Sentinel Cascade
Sentinel Cascade is a three-stage adaptive Supertrend overlay. Where a classic Supertrend uses one fixed-ATR band, this script chains three Supertrend stages on top of each other and modulates each stage's width with a different regime signal. Bands tighten when the market is trending cleanly and widen when volatility expands or behavior turns mean-reverting.
What makes it different
A standard Supertrend gives one binary direction state. Sentinel Cascade gives three nested direction states that act like a confluence stack. Alignment of all three is the highest-conviction read.
The ATR feeding the Supertrend is smoothed through a Kaufman Efficiency Ratio. Trend-efficient periods get a faster ATR response. Choppy periods get a slower response.
Stage 2's width scales with a volume Z-score. High-volume bars widen the band so transient noise is less likely to flip the stage.
Stage 3's width scales with a lightweight two-point Hurst estimator (R/S over short and long windows). Trending Hurst above 0.5 widens. Mean-reverting Hurst below 0.5 tightens.
A Sentinel pulse fires only when Stage 3 flips AND Stage 2 confirms the new direction within three bars. A coincidence filter for higher-quality regime shifts.
How it works
Compute a basis price as the midpoint of the recent highest high and lowest low.
Compute a KAMA-smoothed ATR from the basis.
Build Stage 1 as a Supertrend on the basis using the KAMA-ATR and the Stage 1 factor.
Build Stage 2 as a Supertrend on Stage 1's output, with its factor multiplied by a clamped volume-Z modulator.
Build Stage 3 as a Supertrend on Stage 2's output, with its factor multiplied by a clamped Hurst modulator.
Track the Sentinel pulse, the ATR-percentile regime (squeeze / normal / expansion), and a running count of intraday Stage 3 flips.
Reading the chart
Three stacked trend lines. Stage 1 thickest, Stage 3 thinnest. Colors flip between bull and bear on direction changes.
A gradient ribbon between Stage 1 (or Stage 2 by user choice) and Stage 3 brightens when the stack is spread, fades when it converges.
An optional iridescent candle recolor scales tint with distance from Stage 3.
A horizontal sight-line projects Stage 3's current level back into history so past respect or rejection at that level is visible.
Persistent flip markers record each Stage 3 flip and retroactively append an OK or FAIL tag after a user-defined persistence window.
A right-edge state block summarizes alignment of all three stages plus the ATR squeeze and expansion read.
Signals
Stage 3 bull / bear shift (any flip)
Cascade alignment (all three stages agree)
Stage 2 retest / bounce inside an active trend
ATR squeeze and expansion entry (percentile-based)
All signals are gated on barstate.isconfirmed or barstate.ishistory. No future-bar referencing. No lookahead_on.
Inputs
Cascade : range basis length, ATR period, KAMA efficiency length, Stage 1 / 2 / 3 factors.
Regime : volume-Z lookback, Hurst short / long windows.
Visual : bullish color, bearish color, toggles for ribbon, sentinel pulse, iridescent candles, bounce markers, ribbon anchor.
On-chart : stage value labels, flip timeline labels, squeeze background tint, Stage 3 cloud, sight-line, state block, daily flip counter.
Dashboard : position, size, watermark row.
How traders use this
Trend continuation : take in the direction of Stage 3 when price retests Stage 2 from the trending side.
High-conviction entries : wait for cascade alignment (all three stages agree) before sizing up.
Mean-reversion fades : when Hurst is clearly below 0.5 and a Stage 3 flip prints near recent extremes, the new trend is statistically less likely to persist.
Volatility context : ATR percentile regime tells you whether the move is happening in a compressed, normal, or extended volatility environment. Sizing should account for that.
Limitations
The two-point Hurst estimator is a fast approximation, not the full rescaled-range statistic. It is monotonically meaningful but is not a precise persistence coefficient.
Like every Supertrend variant, this is a trend-following construct. It is best on instruments with clear directional regimes and worst in extended choppy ranges.
Pivots and percentile-based regime classifications need warm-up bars before their values stabilize.
Past behavior is not a guarantee of future behavior. No indicator can remove market uncertainty.
Compatibility
Pine Script v6, single-file open-source indicator. Works on any symbol and any timeframe. Uses no request.security calls. Non-repainting beyond the normal Supertrend right-bar reactivity inherent to band ratchet logic.
Defaults
Mint bullish color, red bearish color, top-right medium dashboard, all on-chart visualizations on. Open the inputs panel to tune for your instrument or to declutter for screenshots.
Indicator

Stochastic Histogram Regime [Gabremoku]Stochastic Histogram Regime is a refined Stochastic-based momentum oscillator that transforms classic %K / %D logic into a mid-centered histogram regime model with adaptive zones, squeeze detection, and sequential BUY/SELL signaling.
Instead of using the traditional 0–100 Stochastic layout alone, this script recenters the oscillator around its midline and highlights:
momentum expansion and recovery phases
adaptive extreme zones
K/D compression regimes
sequential crossover signals
squeeze-aware signal styling
a compact live dashboard
The Stochastic Oscillator measures where the current close sits relative to its recent price range, and its two core lines — %K and %D — are commonly used to spot momentum shifts, overbought/oversold conditions, and crossover signals.
What it shows
📊 Mid-centered stochastic histogram — instead of plotting Stochastic only in its standard form, the script centers the histogram around the 50 level so bullish and bearish pressure become easier to compare visually.
📈 %K line and ghost %D line — the main momentum line stays visually dominant, while %D acts as a softer confirmation layer.
🎯 Adaptive zones — rather than relying only on static 80/20 thresholds, the script calculates percentile-based extreme zones from recent Stochastic behavior. Traditional Stochastic readings above 80 are often considered overbought and readings below 20 oversold, but adaptive thresholds can better reflect changing market behavior.
🗜️ Combined squeeze regime — the script measures both:
compression around the midline
compression between %K and %D
This creates a composite squeeze state that helps identify low-momentum contraction phases before expansion.
🚦 Sequential BUY/SELL state machine — primary signals are filtered through K/D crossover logic, slope confirmation, and optional extreme-zone requirements.
🔺 Follow-up triangles — repeated same-direction confirmations after the first primary signal can be shown as lighter continuation markers.
🪧 Minimal dashboard — displays state, K/D values, adaptive zone range, slope, and squeeze status.
Core logic
The script is built around the idea that the Stochastic Oscillator is not just an overbought/oversold tool, but a momentum regime detector.
Classic Stochastic compares the latest close to the recent high-low range and is typically interpreted through:
%K and %D crossovers
movement around 80/20 zones
and changes in momentum before price fully reacts
Your script extends that by:
recentering the oscillator around 50
using histogram structure for directional emphasis
adapting extreme zones to recent behavior
and combining crossover quality with slope and squeeze context
This makes it more structured than a standard Stochastic display.
State model
The indicator classifies momentum into five readable states:
Bull Impulse
Bull Recovery
Bear Impulse
Bear Recovery
Neutral
This adds nuance to the usual Stochastic reading because it separates:
strong directional continuation
weaker recovery phases
and non-directional compression
In practice:
Bull Impulse suggests K is above D, above the mid-neutral area, and still rising
Bear Impulse suggests K is below D, below the mid-neutral area, and still falling
recovery states identify improving momentum before full expansion
Signal logic
The script uses a filtered signal engine based on %K / %D crossovers, which are among the most common Stochastic signals.
Primary BUY and SELL signals can be filtered by:
extreme zone location
K slope confirmation
signal mode: Aggressive, Balanced, or Strict
This helps reduce the classic problem of noisy Stochastic crossovers in sideways conditions. Stochastic crossovers are useful, but they generally become more meaningful when combined with trend or momentum context rather than taken in isolation.
How to read it
A practical reading method is:
Use the histogram around the midline to read directional pressure.
Use adaptive zones to identify statistically stretched momentum.
Use %K / %D crossovers for trigger logic.
Use the squeeze state to identify contraction before expansion.
Treat follow-up triangles as continuation confirmation, not as fresh primary entries.
In general:
positive histogram with rising K = improving bullish momentum
negative histogram with falling K = improving bearish momentum
squeeze ON = compressed momentum regime
BUY/SELL labels = primary filtered crossover signals
Features
✅ Mid-centered stochastic histogram
✅ %K and ghost %D structure
✅ Percentile-based adaptive extreme zones
✅ Neutral zone around the 50 midline
✅ Composite squeeze detection
✅ Sequential BUY / SELL state machine
✅ Optional follow-up continuation markers
✅ Overlay and pane signal display options
✅ Minimal live dashboard
✅ Alert conditions for BUY, SELL, and squeeze state
Notes
This indicator is designed to improve the readability of Stochastic momentum structure, especially in transitions between compression, recovery, and impulse phases. Like all Stochastic-based tools, it can produce noisy signals in choppy markets, and overbought/oversold readings should generally be interpreted as momentum context rather than automatic reversal calls.
Author: Gabremoku
Pine Script v6 Indicator

Hurst Exponent Strategy [Fast + Weekly]## Overview
The **Hurst Exponent Strategy ** is an advanced quantitative tool that calculates the Hurst Exponent ($H$) using the Rescaled Range ($R/S$) analysis. Instead of tracking directional momentum or price overlays, this indicator measures the **statistical memory** and fractal dimension of financial time series to detect market regimes.
It helps traders identify whether an asset is trending, mean-reverting, or trapped in a state of pure noise (chaos).
---
## The Mathematics of Market Regimes
The indicator evaluates the price action and plots values between 0 and 1, anchored to a theoretical center line of **0.5 (Random Walk)**:
- **$H > 0.60$ (Trend / Persistent):** The market possesses long-term memory. Price movements tend to be followed by movements in the same direction. Ideal for trend-following strategies.
- **$H < 0.45$ (Elastic / Anti-Persistent):** The market behaves like a rubber band (Mean Reversion). Price movements are consistently followed by reversals. Ideal for grid, mean-reversion, or range-bound strategies.
- **$0.45 \le H \le 0.60$ (Chaos / Random Walk):** The price action mimics a Brownian motion. Movements are random, noise is high, and directional edge is minimal.
---
## Dual Timeframe Framework
To avoid fighting macro market structures, this script calculates two separate Hurst metrics simultaneously:
1. **Fast Hurst (Cyan Line):** Calculated on the current chart timeframe. It responds quickly to micro-regime shifts, pinpointing when a consolidation is breaking into a trend or expanding into chaos.
2. **Macro Hurst (Orange Line):** Multi-timeframe execution locked exclusively to the **Weekly ("W") chart**. It acts as a structural filter, keeping you aligned with the true macro nature of the asset.
Both exponents feature an optional built-in **Smoothing filter (SMA)** to remove high-frequency mathematical noise without heavily lagging the structural reading.
---
## Real-Time Informative Legend
The top-right dashboard monitors the live mathematical output of both exponents:
- Displays exact numerical values down to 4 decimal places.
- Dynamically classifies the market state into **TREND** (Green), **ELASTICO** (Red), or **CAOS** (Gray) for instant visual confirmation.
---
Disclaimer: This tool calculates mathematical probabilities based on historical fractal dimensions. It does not provide entry/exit arrows or guarantee profits. Use it as a regime filter alongside your preferred execution strategy. Indicator

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

Goertzel Algorithm [LB]🔬 Concept
The Goertzel Algorithm, developed by Gerald Goertzel in 1958, is a digital signal processing technique that efficiently computes individual terms of the Discrete Fourier Transform (DFT). Unlike a full FFT which calculates all frequency bins, the Goertzel Algorithm targets a single predetermined frequency — making it the optimal tool for detecting the presence and power of a specific cycle period within a price series.
📐 Mathematical Foundation
The algorithm implements a second‑order recursive filter with a resonance at the target frequency. For a target period T , the normalized angular frequency is :
ω = 2π / T
The recurrence relation is applied to each sample x in the window :
Q = x + 2·cos(ω)·Q - Q
After processing N samples, the complex DFT coefficient is extracted without storing intermediate values :
Re = Q - Q ·cos(ω)
Im = Q ·sin(ω)
The output is the squared magnitude (power) of that frequency component :
Power = Re² + Im²
This approach requires only one multiply and two additions per sample, making it substantially lighter than a full FFT when monitoring a single cycle.
🎯 What Problem Does It Solve ?
Classic oscillators and moving averages operate blindly across all frequencies, mixing signal and noise. FFT‑based indicators attempt spectral analysis but compute hundreds of unnecessary frequency bins, wasting computational resources and introducing lag. The Goertzel Algorithm isolates the exact cycle period the trader wants to monitor, delivering pure frequency‑domain intelligence with minimal overhead.
📊 How To Interpret
Power rising and sustained at high levels → the target cycle period is strongly present in the price action ; the market is respecting the chosen rhythm.
Power declining toward zero → the target cycle has faded ; the market is no longer oscillating at that frequency.
Sharp power spike → the cycle has suddenly emerged ; potential entry signal when a known period (e.g., 20‑bar) becomes active.
Compare multiple instances with different periods → add the indicator twice with different target periods (e.g., 10 and 20 bars) to see which cycle dominates.
⚙️ Parameters
Target Period (bars) – the exact cycle length to detect ; typical values are 10, 20, 50, or any dominant cycle observed on the chart.
Analysis Window Length – number of bars over which the algorithm computes the power ; longer windows give more frequency resolution but slower response.
Source – price data used as input (close, HLC3, etc.).
📚 Reference
Goertzel G., "An Algorithm for the Evaluation of Finite Trigonometric Series", The American Mathematical Monthly, Vol. 65, No. 1, pp. 34‑35, January 1958.
Proakis J.G. & Manolakis D.G., "Digital Signal Processing : Principles, Algorithms, and Applications", Chapter 6 – Efficient Computation of the DFT, Prentice Hall, 1996. Indicator

Indicator

SAO RUBIQ Regime v1.1# SAO · RUBIQ — Regime Visualizer
**by SNP420 · Jarvis Claudos · Finexus s.r.o.**
*Pine Script v6 · Build 2026-05-26*
---
## What is it
A research-grade market regime overlay that classifies every confirmed
bar into one of **five regimes** and paints the chart accordingly.
Born out of a simple insight:
> *"The right algorithm in the wrong phase of the market still fails —
> even when it is 100% correct under ideal conditions."*
This is the central thesis of the **SAO · RUBIQ** project: every
strategy lives or dies inside a specific regime × timeframe cell.
Without active regime perception, every trading system is necessarily
under-performing on the bars it was not designed for. This indicator
makes those cells visible.
## The five regimes
| Regime | Meaning |
| ------------- | -------------------------------------------------------- |
| **BULL_CALM** | Trending up with low realized volatility |
| **BEAR_CALM** | Trending down with low realized volatility |
| **RANGE** | Sideways with narrow Bollinger width |
| **CHOPPY** | Sideways with high noise / many directional flips |
| **STRESS** | Volatility spike — any 2 of {rv, ATR z-score, bar range} |
| *UNCERTAIN* | Fallback — nothing fits cleanly (no box drawn) |
Priority order: **STRESS > BULL > BEAR > RANGE > CHOPPY > UNCERTAIN.**
## How it works
The indicator computes the full RUBIQ v1.1 feature stack on every bar:
- ATR(14), ADX/DI(14), Bollinger(20, 2)
- 20-bar realized volatility, 30-bar directional flips
- HH / HL / LH / LL pivot-swing counts in a 30-bar window
- 500-bar rolling medians for BBwidth, RV, ATR, bar range
- ATR z-score, bar-range ratio, price drift in ATR units
It then applies a calibrated rule set (per-feature thresholds derived
from EUR/USD M30 2024-2025 baseline) and assigns one of the six labels.
A hysteresis smoother (`min_run = 5` bars, configurable) suppresses
flicker — a regime is only committed after enough confirming bars.
## Visualization (FX-Sessions-style)
- **Dashed segment boxes** — one box per confirmed regime run, sized
to that segment's high/low range. Mirrors the FX Market Sessions look.
- **Background tint** — semi-transparent regime color over the active span.
- **Bar color** (off by default) — paints OHLC bars with the regime color.
- **Segment label** — regime name anchored to the top of the box.
- **Info table** (top-right) — current state + live feature values.
- **Stats table** (bottom-right) — N bars and % share per regime across
the visible history.
UNCERTAIN bars deliberately render no box and no tint — keeps the
chart clean and matches the "no session" look of FX Sessions.
## Settings worth knowing
- **Calibrated v1.1 rules** (default on) — ~45% confident coverage on
EUR/USD M30. Turn off for strict v1 (~6% coverage, mostly UNCERTAIN —
useful for research only).
- **Hysteresis min_run** — bars of consistent raw state before commit.
Bigger value = less flicker, more boundary lag.
- **Norm median lookback** (500) — window for the rolling median of
BBwidth / RV / ATR / bar range. Lower it for faster adaptation.
- **Swing / drift window** (30) — pivot-count window and `price_drift_atr`
reference horizon.
- **All six regime colors** — fully overridable.
## Sanity-check expectation (EUR/USD M30, 2 years)
If the calibration baseline holds on your data window, the stats
table should land near:
| State | Share |
| --------- | ------ |
| BULL_CALM | ~12% |
| BEAR_CALM | ~12% |
| RANGE | ~7% |
| CHOPPY | ~10% |
| STRESS | ~3.5% |
| UNCERTAIN | ~55% |
Any major divergence on a fresh window = signal to re-validate
(regime shift, threshold drift, or data-feed alignment).
## Honest limitations — please read
- **Tuned to EUR/USD M30 vol scale.** Features themselves are
TF-agnostic, but the cut points (`rv20_norm < 1.8`, `ADX > 20`,
`price_drift_atr > 1.5`, etc.) were calibrated on M30. On H1, D1,
crypto or equities the regime distribution will be approximate
unless you re-tune.
- **v1.1 direction-mapping is incomplete.** Validation diagonal score
is 1/5 — BEAR_CALM bars in the 2024-2025 baseline have a slight
*positive* forward drift. The labels are statistically informative
(shuffle MC p<0.001) but trade-direction routing needs a v1.2 fix.
**Treat this indicator as a labeled regime overlay for research, not
as a stand-alone trade-direction signal.**
- **Streaming hysteresis ≠ offline two-sided smoothing.** Boundary
detection lags by approximately `min_run - 1` bars in real time.
## Alerts
Five alert conditions ship in:
- Regime → STRESS
- Regime → BULL_CALM
- Regime → BEAR_CALM
- Regime → RANGE
- Regime → CHOPPY
Each fires on transition (state differs from previous bar).
## Credits & attribution
- **Visual style** inspired by *FX Market Sessions* by **boitoki**
(Mozilla Public License 2.0). The segment-box-per-run pattern is
borrowed from that script; all classifier logic and feature math
is original to SAO · RUBIQ.
- **RUBIQ thesis** — *Rubik's-cube model of the market*: the right
algorithm in the wrong market phase still fails. Distilled from
100+ failed variants across the SAO portfolio.
- **Built by** SNP420 · Jarvis Claudos · Finexus s.r.o.
## License
Same as the parent SAO_RUBIQ project. Use freely, modify freely,
attribute when republishing.
---
*"Trh je proměnlivé prostředí. RUBIQ je centrální nervová soustava,
která to řeší pro všechny SAO strategie."*
— SNP420
Indicator

Crypto Ultimate Indicator v2═══════════════════════════════════════════════
CRYPTO ULTIMATE INDICATOR (CUI)
═══════════════════════════════════════════════
A multi-layer confluence system for crypto traders. Stacks 12+ independent technical layers — trend, momentum, volume, regime, multi-timeframe bias, and Smart Money Concepts — and fires Buy/Sell signals only when enough of them agree. Every signal comes with a confidence score, three take-profit levels, position size recommendation, and live outcome tracking.
Built for 4H and Daily crypto charts. No proprietary "secret sauce" — every component is documented and every input is exposed.
━━━━━━━ WHY THIS EXISTS ━━━━━━━
Most multi-indicator scripts stack correlated trend filters (more EMAs, more oscillators) and call it "confluence." That just adds the illusion of agreement without adding independent information.
CUI's filter stack is built from genuinely different signal sources, so when they align, that alignment carries real weight:
• Trend regime — HMA + Supertrend + EMA Ribbon
• Momentum — RSI with proper pivot-to-pivot divergence
• Volume flow — body-weighted Volume Delta + CVD divergence
• Volatility state — Bollinger squeeze + squeeze-release timing
• Market structure — composite of ADX, Choppiness Index, BB-width percentile
• Multi-timeframe — weighted Daily / Weekly / Custom HTF (all offset, no repaint)
• Liquidity & gaps — Fair Value Gaps + Liquidity Sweep detection
• External context — optional BTC trend filter for alt trading
A Buy or Sell only fires when the relevant subset of these align. A built-in "Why-Not" diagnostic table shows you exactly which filter is blocking a near-signal at any moment — turning the indicator into a tunable system rather than a black box.
━━━━━━━ CORE FEATURES ━━━━━━━
TREND & MOMENTUM
▸ Hull Moving Average (configurable length)
▸ Supertrend with ATR factor
▸ 5-EMA Ribbon (8/13/21/34/55) with stacking score
▸ RSI with consecutive-pivot divergence detection
▸ MACD and Stochastic RSI (data window)
VOLUME
▸ Body-weighted Volume Delta (not naive close-position)
▸ Cumulative Volume Delta (CVD)
▸ CVD divergence at confirmed pivots
VOLATILITY & REGIME
▸ Bollinger Bands with squeeze detection and release timing
▸ Composite regime classifier (ADX × CHOP × BB-width)
▸ Background tint for trending vs ranging states
▸ Regime transition labels
SMART MONEY CONCEPTS
▸ Fair Value Gap zones (bullish and bearish)
▸ Liquidity Sweep detection
MULTI-TIMEFRAME
▸ Daily / Weekly / User-defined custom HTF
▸ Weighted confluence score (D 1.0x + W 1.5x + Custom 0.75x)
▸ Optional HTF pivot-based S/R lines
BTC CONTEXT (for alt traders)
▸ Optional BTC trend filter
▸ Relative strength vs BTC
SIGNAL ENGINE
▸ 0-100 confidence score
▸ Configurable minimum confidence threshold
▸ Auto-tune presets (Aggressive / Balanced / Conservative / Custom)
▸ Confirmation bar requirement
▸ Minimum spacing between signals
TRADE MANAGEMENT
▸ Three take-profit levels (TP1/TP2/TP3) with configurable ATR multipliers
▸ Custom % allocation per target
▸ Adaptive SL/TP — different distances in trending vs ranging conditions
▸ Break-even stop activation after TP1
▸ Chandelier ATR trailing stop on runner portion
▸ Position size calculator (account size × risk % × confidence multiplier)
LIVE TRACKING & DIAGNOSTICS
▸ Main dashboard with all current state
▸ Signal log table — last N trades with live TP/SL outcomes
▸ Why-Not diagnostic — which filter is currently blocking each direction
▸ Regime stats — win rate broken down by trending vs ranging
ALERTS
▸ 15+ classic alertcondition triggers
▸ Optional JSON webhook payload for bot integration
━━━━━━━ HOW A BUY SIGNAL FIRES ━━━━━━━
All of the following must be true on the signal bar:
1. HMA trending up
2. RSI above 50
3. Volume delta positive
4. EMA Ribbon score ≥ +3 (at least 4 of 5 aligned bullish)
5. Supertrend bullish
6. HTF confluence score ≥ +1.5
7. Confidence score ≥ user minimum
8. BTC trend bullish (if BTC filter enabled)
9. Price not inside opposing FVG zone (if FVG filter enabled)
10. Market not in strong ranging mode
11. Price more than 0.5 ATR from upper resistance zone
12. Candle body > 50% of range
13. Minimum bars elapsed since last signal
14. Confirmation bar (if enabled)
A Sell signal requires the inverse. On 4H BTC expect roughly 1-3 signals per week in normal conditions. If you see fewer, drop the confidence floor or switch to the Aggressive preset.
━━━━━━━ RECOMMENDED USE ━━━━━━━
▸ Primary: 4H on BTC/USDT, ETH/USDT, and majors
▸ Also works: Daily, 12H, 8H
▸ Use caution below 1H — noise increases, news spikes can trigger wicks
▸ Low-liquidity alts: bump ATR period to 21
WORKFLOW
1. Start on the Balanced preset
2. Watch the dashboard and Why-Not panel for a few sessions
3. Adjust the confidence floor based on signal frequency
4. Enable Regime Stats after chart history accumulates
5. For bots: enable JSON webhook alerts, route via "Any alert() function call"
━━━━━━━ REPAINT DISCLOSURE ━━━━━━━
Full transparency on what does and doesn't repaint:
▸ HMA, Supertrend, EMA Ribbon: repaint on the developing current bar (use bar-close confirmation for live trading)
▸ HTF confluence (D/W/Custom): all use offset — fetch last closed HTF bar only — NO intra-period repaint, NO lookahead
▸ RSI and CVD divergence labels: plotted at confirmed pivot bar (5 bars after the actual pivot). Do NOT appear and disappear.
▸ FVG zones: drawn on confirmation bar of the 3-bar gap pattern. Do not repaint once drawn.
▸ Liquidity sweeps: detected on bar close
▸ Trade outcomes (signal log): evaluated on each closing bar
▸ Regime transition labels: confirmed on bar close
━━━━━━━ HONEST LIMITATIONS ━━━━━━━
▸ This is a decision-support tool, not a complete trading system. Risk management, position discipline, and execution matter more than any indicator.
▸ Signal outcomes in the Regime Stats table are based on bar-close evaluation. Real-fill slippage is not modeled.
▸ Volume Delta is approximated from candle structure, not true tick-level bid/ask (PulseWire doesn't expose that without premium feeds).
▸ FVG and liquidity sweep are simplified interpretations of those concepts — pure SMC purists may prefer dedicated tools.
▸ The regime classifier is a heuristic composite. It works well on liquid crypto pairs but can lag at sharp inflection points.
▸ Past performance does not predict future results.
━━━━━━━ SETTINGS OVERVIEW ━━━━━━━
The script has many inputs, grouped by function. For first-time users, the most important groups are:
▸ Preset & Theme → pick Balanced to start
▸ UI Sizing → table text and label sizes
▸ Signal Engine → set Minimum Confidence Score
▸ Tiered Exits → TP/SL multipliers and % allocation
▸ Position Sizing → account size and risk per trade
▸ Alerts & Webhooks → enable JSON for bot trading
Default state shows a clean chart: HMA, Supertrend, BB, regime tint, signal labels, plus three tables (dashboard, signal log, HTF panel). Everything else is one toggle away — EMA Ribbon, FVG boxes, ATR zones, HTF S/R lines, CVD divergence labels, sweep markers, Why-Not diagnostic, Regime Stats.
━━━━━━━ WHAT'S NOT INCLUDED ━━━━━━━
▸ Full strategy() backtest — this is an indicator(). A companion strategy script may be released separately.
▸ Funding rate / open interest overlays — require specific tickers not universally available
▸ Chart pattern recognition (H&S, wedges, etc.)
━━━━━━━ CREDITS ━━━━━━━
Built on Pine Script v6. Uses PulseWire built-ins: ta.supertrend, ta.dmi, ta.bb, ta.macd, ta.rsi, ta.pivothigh, ta.pivotlow, ta.valuewhen. Choppiness Index, CVD, FVG detection, liquidity sweep logic, regime classifier, confidence scoring, trade tracking, and confluence weighting are custom implementations.
═══════════════════════════════════════════════
Indicator

Nexus Kinetic Reactor [JOAT]Nexus Kinetic Reactor
Introduction
Nexus Kinetic Reactor estimates price as a noisy state process. It tracks state, velocity, uncertainty, confidence, and optional projection cones.
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. Recursive State Estimate
A smoothing lambda updates the estimated price state bar by bar.
2. Velocity Regime
Changes in the state estimate create velocity and acceleration-style context.
3. Uncertainty Bands
Noise windows and sigma bands show how uncertain the current estimate is.
4. Confidence Gate
Signals require tracking confidence and expectancy thresholds before labels appear.
state := state + lambdaAdjustment * (price - state)
Features
Recursive price-state estimator
Velocity and acceleration regime logic
Uncertainty bands
Projection cone
Blocked signal markers and dashboard
Input Parameters
Smoothing lambda and noise window
ATR length and velocity threshold
Minimum confidence and expectancy
Band sigma and projection bars
Cone, candle, and panel toggles
How to Use This Script
Use the state estimate and uncertainty bands as kinetic context. Labels only appear when the model clears confidence and expectancy gates.
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
Nexus is original in combining state estimation, velocity gating, uncertainty bands, expectancy filtering, and projection visualization.
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
