Auction Regime Router Entropy Gate & Hurst MemoryAuction Regime Router — Entropy Gate & Hurst Memory
What it is
Every structure playbook fails in the wrong regime. Fading the value-area edge works when price is anti-persistent (stretches snap back); riding a breakout works when price is persistent (moves feed on themselves); and nothing structural works when the tape is noise. This tool measures two things — how much structure exists, and what kind it is — and routes to a plain-language answer: FADES VIABLE / BREAKOUTS VIABLE / STAND ASIDE. It decides which of your tools to trust, never buy or sell.
The two measurements (and how they work together)
Permutation entropy (Bandt–Pompe 2002) — the gate. It measures how disordered the recent price sequence is from the frequencies of ordinal patterns (which of the 6 orderings each price triplet takes). High entropy = all patterns equally likely = noise = no structural edge. The gate is self-calibrated: entropy is ranked against its own recent history, so "noisy" means noisy for this symbol and timeframe.
Hurst exponent (Hurst 1951; Mandelbrot) — the router. Memory via diffusion scaling: how the dispersion of K-bar returns grows with K. H > 0.5 = persistent → continuation regime; H < 0.5 = anti-persistent → reversion regime. Research supports the routing: mean reversion is empirically more probable and faster during anti-persistent periods.
The mashup logic is a hierarchy, not a mixture: the entropy gate overrides the Hurst read. If the tape is noise, the router says STAND ASIDE regardless of what H says — because a memory estimate on noise is meaningless.
The honesty steps
A dead zone around H = 0.5 (default 0.45–0.55): near a random walk the memory read is unreliable, so the router says MIXED rather than pretending. Practitioners commonly require a margin before activating a playbook; both thresholds are inputs.
A minimum-dwell filter (the standard anti-chattering design from switched-systems control): a new regime is announced only after it survives a set number of confirmed bars, so the read doesn't flip-flop bar to bar. The cost is that many bars of lag — stated, and adjustable.
Estimates are proxies from bar data with overlapping windows — descriptive of the recent past, not a prediction. The dashboard shows the state, how long it has persisted (regime age), how dominant it has been recently (stability %), and any pending regime with a countdown — nothing more.
How to use it
Add to any liquid symbol/timeframe; defaults suit intraday index futures. The script requests no external data of any kind, so it runs on every plan and every symbol.
Glance at the regime lane — the thin colored strip at the bottom of the pane: blue = continuation, violet = reversion, amber = noise, gray = mixed. The palette is deliberately direction-neutral — no green or red anywhere in regime coding, so nothing can be misread as a buy or sell.
The HTF STACK row shows the raw regime on three higher timeframes derived as multiples of the chart (defaults 3×, 5×, 15× — so a 5m chart reads 15m/25m/75m automatically, adapting to any chart). A ✓ in green = every timeframe agrees on the same actionable regime (strongest context). A ⚠ in amber = a higher timeframe reads NOISE or the opposite regime while the chart claims a playbook (weakest — reduce or wait).
Read the dashboard for detail: REVERSION → your value-area fade / band-reversion tools are in their element; CONTINUATION → your breakout / drive tools are; NOISE → the gate is closed, stand aside; MIXED → no clear routing, reduce. STABILITY shows how settled the read is; PENDING shows a forming regime with a countdown.
Regime-change tags print only on announced (dwell-confirmed) changes; alerts fire on entering each state.
Best used as the selector above your structure toolkit rather than as a standalone display.
What makes it original
Hurst and entropy oscillators exist. What this adds: (1) the hierarchy — a self-calibrated entropy gate that can veto the memory read, instead of two numbers side by side; (2) routing to auction playbooks in plain language (fade vs breakout viability), not a raw statistic; (3) honest dead zones, a minimum-dwell announcement filter, and stability/pending context instead of a binary flip at H = 0.500. It is a decision-hygiene tool for structure traders.
Concept credits
Ordinal-pattern (permutation) entropy — C. Bandt & B. Pompe (2002). Long-memory / rescaled-range analysis — H. E. Hurst (1951); fractal market framing — B. Mandelbrot. Regime-gated strategy selection — standard quantitative practice. Implementation and charting design are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. Regime labels are descriptive statistics of recent bars; regimes change without warning and estimates are proxies. Validate independently and manage your own risk. Indicator

Adaptive Predictability Engine Entropy Gate, Regime RouterAdaptive Predictability Engine — Entropy Gate, Regime Router & Expert Committee
What it is
The Adaptive Predictability Engine is a governed decision framework, not another confluence average. It refuses to treat all market conditions as tradable. It applies a strict hierarchy: first it asks whether price is forecastable at all right now; if it is, it decides whether trend-style or reversion-style logic is appropriate; and only then does a small committee of transparent experts vote — with the committee continuously re-weighting itself toward whichever experts have been correct recently. When the market is unpredictable, the whole engine stands aside and shows nothing to trade.
It plots directly on price: long/short signals, the live entry/target/stop of the active trade, a plain-language dashboard, and an optional self-calibration panel that scores past signals in R-multiple expectancy (not just win rate).
Why these components are combined (mashup justification)
This is a deliberate, dependent stack — each layer conditions the next, so removing any one changes the layer below it. That is the difference between a governed engine and a bag of averaged indicators.
Predictability gate (permutation entropy + structure). Permutation entropy (Bandt–Pompe) measures the ordinal randomness of recent price across three time scales; this is blended with |Hurst − 0.5|, the distance of the market from a random walk, which is high for strong trends and strong mean-reversion. The blended predictability is percentile-ranked so the gate self-tunes per symbol and timeframe. If the tape is unpredictable, nothing downstream may fire. This is the master switch, and it is why the engine spends much of its time deliberately doing nothing.
Regime router (Hurst exponent). When structure exists, the Hurst exponent (generalized, via a structure-function slope) decides whether it is persistent (trend) or anti-persistent (mean-revert), and routes weight toward the appropriate family of experts rather than averaging trend and reversion logic together.
Expert committee (Hedge / multiplicative weights). Six deliberately diverse experts — price trend, volume-weighted price, order-flow delta, momentum exhaustion, volatility extreme, and range extreme — each cast a directional vote. Their weights update every bar by exponential regret (right experts gain influence, wrong ones lose it), with fixed-share regularization so no single expert can dominate and make the vote fragile.
Distribution-shift guard. If the recent return distribution moves materially versus a reference window, the engine freezes learning and cuts conviction until conditions settle, so stale weights don't drive trades through a regime change.
The output is a single decision = the regret-weighted vote of only the currently-appropriate experts, gated to zero whenever the tape is unpredictable.
How to use it
Add it to any liquid symbol and timeframe. Defaults are tuned for index futures (e.g. NIFTY) but every input is adjustable, and the Data source group lets you repoint price and volume for any market.
Watch the dashboard headline: LONG / SHORT / WAIT / STAND ASIDE. When a signal fires, the engine draws the entry, ATR target, and ATR stop so the action is concrete.
Treat the shaded background as a hard "do not trade" — the engine has judged the tape unpredictable.
Open the Edge calibration (advanced) panel to see, per market memory, the past R-expectancy of the engine's own signals versus a direction-matched baseline. Positive expectancy means the sample was profitable before costs; this is descriptive of the past, not a forward guarantee.
Use the Ablation (research) toggles to switch each layer off and see, on your own data, whether it earns its place.
What makes it original
Most published tools average indicators and hope. This one inverts the approach by asking whether to act at all before what to do, using information-theoretic predictability (permutation entropy) as a master gate, a memory estimate (Hurst) as a router, and online regret-minimization (Hedge) to arbitrate a diverse expert set — with built-in R-expectancy self-calibration so users can judge it honestly rather than on a cherry-picked screenshot. The order-flow expert reads finest-available lower-timeframe signed volume with automatic fallback. The coupling and governance order are the contribution; the individual estimators are classical and credited below.
Concept credits
Permutation entropy — Bandt & Pompe. Hurst exponent / long-range dependence — H. E. Hurst; Mandelbrot. Hedge / multiplicative-weights online learning — Freund & Schapire; Littlestone & Warmuth; Vovk. Efficiency/structure framing — Kaufman. Triple-barrier labelling and R-multiple expectancy — M. López de Prado. Wilson score interval — E. B. Wilson. Synthesis, governance design, and implementation are the author's own.
Important disclaimer
Research and education only. Not financial advice, not a signal service, not a guarantee of future results. No indicator has an inherent edge. The calibration panel is a descriptive summary of past behaviour on the current chart — not a backtest and not a forward prediction. Always validate independently, apply realistic costs and slippage, and manage risk. You are solely responsible for your trading decisions. Indicator

Adaptive Consensus Trail Structure, Regime & SelfAdaptive Consensus Trail — Structure, Regime & Self-Test
A trailing stop that sits on the agreement of several structural references, adapts to the market regime, and forward-tests its own signals so the numbers it shows are measured, not asserted.
What it is
Most trailing stops follow one idea — an ATR band, a SuperTrend, a moving average. This one places the stop where a small committee of independent structural references agree, reads how confident that agreement is, widens or tightens itself according to the market regime, and then continuously audits its own flips and reports the edge it actually produced on your data.
The committee has five members, each locating support/resistance from a different lens:
Anchored VWAP band — fair value for the session/week/month
Session / naked volume Point-of-Control — the price the most volume traded at, carried forward until revisited
Fair-Value-Gap midpoint — unfilled imbalance
Swing pivot — structural memory
Order-flow absorption — where aggressive buying/selling was absorbed (via Bulk Volume Classification)
Why these parts belong in one script (mashup justification)
Each reference alone whipsaws on an index, and each is right in different conditions. They are combined because they correct one another, and the entire value of the script is in that interaction — not in any single line:
A reliability layer scores every reference's historical respect rate with a Wilson lower bound, so a reference that keeps getting ignored loses its vote instead of dragging the stop around.
A consensus layer keeps only the densest agreeing cluster of references, so the stop sits on genuine agreement rather than on an average nobody respects, and far-apart references never force a permanent "no signal."
A regime layer (efficiency ratio + ADX + band-width + a volatility-cluster read + a Hurst persistence estimate) widens the band and tightens the flip confirmation in chop — this is what removes the whipsaw.
A self-test layer forward-scores every flip and recalibrates the confidence number so it means what it says.
Split apart, these are five overlays that each mislead in a range. Wired together, they are one self-correcting, self-auditing trail. That is the reason for combining them.
How it works (six layers)
References are computed on the bar close.
Reliability — rolling-capped respect counts per reference give a Wilson lower-bound "trust." POC is a magnet, so it is judged by forward reaction (did price reject away before breaking through?), not a same-bar close, which keeps its trust honest.
Consensus — the densest agreeing cluster within an ATR band becomes the trail's target; the envelope and confidence are measured on that cluster only.
Adaptive backbone — an efficiency-ratio / regime-adaptive band (Adaptive, Chandelier, or Blend) that widens in chop.
The trail — high confidence pulls the stop toward structure (floored a minimum ATR off price); low confidence rides the wide band, so it flips less in noise.
Self-test — every flip is forward-resolved by triple-barrier first-touch against an unconditional base rate, split by strength tier and by regime, with a walk-forward in-sample→out-of-sample check, a runs test of independence, a Brier score, and a confidence recalibration.
How to use it
Read the top banner for the one-line bias — BULLISH / BEARISH / WAIT — and the READ legend for what to do. The coloured line is your stop: support in an uptrend, resistance in a downtrend. BUY / SELL labels print only on confirmed, sufficiently-confident, higher-timeframe-aligned flips.
The dashboard gives detail top-down: each reference's level and trust, the consensus, raw → calibrated confidence, regime (with Hurst and ADX), the higher-timeframe invalidation stop, and a FULL / HALF / STAND-ASIDE suggestion.
Before sizing, open the Self-Test panel and read the Edge column (hit% − base%), not the raw hit-rate. A ★ means the edge's confidence interval clears the base rate. Prefer signals where the walk-forward change isn't badly negative and the runs test isn't "streaky." Being honest about it: on many indices this tool shows real edge in range and volatile regimes on higher timeframes and little-to-none on very low timeframes or once a trend is already confirmed — the panel makes that transparent so you can pick your spots.
Works on any market
Set the Price source, and for symbols with no native volume set a Borrow-volume proxy (e.g. a futures contract). The panel theme adapts to your chart background automatically. Backbone: Adaptive / Chandelier / Blend. Absorption: order-flow (BVC) or simple. An optional intrabar resolution builds a finer volume profile where available.
Originality
The committee-of-references design, the cluster-not-average consensus, the reliability weighting that lets references lose their vote, the forward-reaction POC respect test, and the confidence self-calibration are the author's own work. The underlying techniques are standard and fully credited below.
Non-repaint
References, regime, consensus and the trail all evaluate on the close of the bar; the live bar is provisional and settles on close. Self-test events are logged and resolved only on confirmed bars and resolve on bars after their trigger at fixed barriers, so hit / base / edge use no look-ahead. The higher-timeframe stop uses a lookahead-off request.
Concept credits
Wilson score interval (E. B. Wilson); efficiency ratio (P. Kaufman); ADX / DMI / ATR / volatility-stop lineage (J. W. Wilder); anchored VWAP (industry standard); volume profile / value area / point-of-control — Market Profile (J. P. Steidlmayer, developed by J. F. Dalton); triple-barrier first-touch labelling (M. López de Prado); runs test of randomness (A. Wald & J. Wolfowitz); rescaled-range / Hurst exponent (H. E. Hurst); Brier score (G. W. Brier); Bulk Volume Classification / VPIN (D. Easley, M. López de Prado & M. O'Hara); reliability-bin (isotonic-style) calibration is standard forecasting practice.
Limitations & disclaimer
"Absorption" is a volume proxy — base data has no true tick order flow, so the buy/sell split is estimated from bar moves, not measured. Confidence is context, not a promise of profit. The self-test is descriptive of past behaviour on the loaded symbol (fixed barriers, no costs or slippage) — a study aid, not a backtest and not a guarantee. A measured edge is what flips did historically here, not a forecast.
This script is for research and education only. It is not financial advice, not a recommendation to buy or sell, and not a guarantee of any outcome. Trading carries risk of loss; your decisions are your own. Test on your own data and use independent risk management before relying on it. Indicator

Indicator

[ A L P H A X ] VECTOR - Regime-Adaptive Flow EngineAlphaX VECTOR — Regime-Adaptive Flow Engine: Kaufman ER Regime Classification, KAMA Vector Line, Multi-Component Flow Score & Scalping-Optimized Entry Playbooks
AlphaX VECTOR is a professional-grade scalping system built around a fundamentally different architectural premise from every other indicator in the AlphaX suite: the market regime is identified first, and the entry playbook is selected automatically to match that regime. Most scalping systems apply the same entry logic regardless of whether the market is trending, ranging, or chopping — and then wonder why the same setup works brilliantly in one context and fails consistently in another. VECTOR solves this at the architectural level by running a three-metric regime classification engine (Efficiency Ratio, Choppiness Index, and ADX) that determines the current market character on every bar and locks in one of four states: Trend Bull, Trend Bear, Balance/Range, or Chop. Each state activates a different set of entry playbooks — micro-pullbacks to the Vector Line in trends, micro-impulse breaks in balance or trend, mean-reversion fades at band extremes in balance — and all entries are filtered through a 6-component Flow Vector score that measures the directional conviction of the current market from five independent dimensions. The result is a system where every signal is not just directionally filtered, but regime-appropriate — built for M1 through M15 scalping on gold, forex, indices, and crypto.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧭 The Core Philosophy — Regime First, Setup Second
The single biggest failure mode in scalping is applying trend-following entries in choppy markets and mean-reversion entries in trending markets. The market character changes continuously — a trending gold session can collapse into a tight range within minutes, and a balance period can explode into a directional impulse with no warning. Any fixed system that ignores this regime cycle will have extended periods of consistent losses whenever the market shifts character.
VECTOR's architecture inverts the standard approach. Instead of picking a setup type and then trying to filter bad signals, VECTOR determines the market's current character first — with three independent quantitative measurements — and then selects the correct playbook for that character. In Trend Bull, only pullback and impulse break setups fire. In Balance, only impulse breaks and band fades fire. In Chop, nothing fires. The dashboard explicitly tells you the active playbook at all times: SCALP PULLBACK ▲, SCALP PULLBACK ▼, SCALP FADE / BREAK, or NO TRADES.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 The Regime Engine — Three Independent Classifiers
The regime is determined on every bar by three completely independent measurements. The combination of all three produces a robust, multi-dimensional picture of market character that no single indicator alone could provide.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Kaufman Efficiency Ratio (ER)
The Efficiency Ratio measures how directionally efficient price movement has been over the lookback period (default: 10 bars). It divides the net directional change in price by the total path traveled — the sum of all individual bar-to-bar movements. A ratio close to 1.0 means every bar moved in the same direction — maximum efficiency, maximum trend. A ratio close to 0.0 means the total path traveled far exceeds the net movement — price oscillated back and forth with no net progress — maximum chop, minimum efficiency.
ER thresholds:
ER ≥ 0.35 (trend minimum) — price is moving with high directional efficiency. The market is trending and momentum setups are appropriate
ER ≤ 0.22 (chop maximum) — price is oscillating with low efficiency. Combined with low ADX, this triggers the CHOP regime and blocks all signals
Between thresholds — transitional state. Not clear trend, not clear chop
The ER is displayed live on the dashboard with color coding — yellow-green when in trend territory, orange when in chop territory, neutral otherwise. This single number tells you the fundamental quality of price direction at any given moment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Choppiness Index
The Choppiness Index (CI) provides an independent measure of market randomness using a logarithmic ratio formula. It calculates the sum of all individual ATR readings over the lookback period (default: 14 bars) divided by the total high-low range of that period. High CI values indicate the range of the period was consumed by oscillating ATRs — choppy movement. Low CI values indicate the period's range was established by directional movement.
CI interpretation:
CI above 61.8 — the market is in a Golden Ratio chop zone. Institutional consensus is absent. All signals are suppressed when this threshold is exceeded (configurable, default: 61.0)
CI below 38.2 — maximum trending efficiency. In practice, CI values this low indicate an impulsive directional move in progress
CI between 38.2 and 61.8 — transitional territory, neither pure trend nor pure chop
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ADX (Average Directional Index)
The ADX provides the most widely recognized trend strength measure, confirming whether a directional bias measured by ER and CI is backed by genuine momentum. ADX above the configured minimum (default: 20) is required for Trend Bull or Trend Bear regime classification. Below the minimum, even if ER is high and CI is low, the system classifies as Balance rather than Trend — the directional efficiency exists but the momentum confirmation is absent.
Combined regime logic:
CHOP (0) — CI above threshold OR (ER below chop max AND ADX below trend min). The market is in an untradeable oscillating state. Dashboard shows ⛔ CHOP — STAND ASIDE. All signals blocked
TREND BULL (1) — not chop, ADX above trend min, ER above trend min, Flow Vector positive, price above Vector Line. Playbook: SCALP PULLBACK ▲
TREND BEAR (2) — same conditions with Flow Vector negative and price below Vector Line. Playbook: SCALP PULLBACK ▼
BALANCE (3) — not chop, but ADX or ER conditions for trend not met. Market is directional enough for scalping but not in a clear trend. Playbook: SCALP FADE / BREAK
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 The KAMA Vector Line — Adaptive Trend Reference
The Vector Line is a Kaufman Adaptive Moving Average (KAMA) — the same ER-weighted adaptive EMA that forms the basis of the regime classification. It is the central price reference for all pullback entries and a key component of the Flow Vector score.
Why KAMA over a standard EMA: A standard EMA responds with the same speed regardless of market conditions. In a trending market, the EMA lags price and creates false pullback signals. In a choppy market, it whipsaws. KAMA self-adjusts — it moves quickly in trending conditions (tracking price closely) and moves slowly in choppy conditions (staying stable). This means the Vector Line acts as an accurate, self-calibrating trend reference that naturally tightens around price during strong trends and widens away from price during chop.
Vector Line color coding: The line is plotted in gradient color based on the current Flow Vector score — bright yellow-green when the Flow Vector is strongly positive (above the Strong Vector threshold), bright red when strongly negative, fading to semi-transparent in neutral territory. At a glance, the Vector Line's color tells you the directional conviction of the current market.
Vector Line price: The exact current Vector Line price is displayed on the dashboard as VECTOR LINE in real time — the precise price level where pullback entries are being monitored.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ The Flow Vector — 6-Component Directional Score
The Flow Vector is a composite directional score ranging from -100 (maximum bearish conviction) to +100 (maximum bullish conviction). It is computed on every bar from six independent measurements, each capturing a different dimension of directional bias.
Component 1 — EMA Stack (up to ±22 points):
A triple EMA (8/21/50) full stack alignment — EMA 8 above EMA 21 above EMA 50, with price above EMA 8 — scores +22 points for bull, -22 for bear stack. Partial alignment (price simply above or below EMA 21) scores ±8. This is the momentum structure layer.
Component 2 — Vector Line Slope (up to ±18 points):
Whether the KAMA Vector Line is currently rising or falling. A rising Vector Line in a bull trend confirms the adaptive average is itself accelerating — ±18 points. This ensures the entry direction is aligned with the KAMA's own momentum, not fighting it.
Component 3 — OBV Slope (up to ±15 points):
The slope of On-Balance Volume over the configured lookback period (default: 10 bars). A rising OBV slope means net buying pressure is accumulating (each up-close bar adds volume, each down-close subtracts). A falling slope confirms net selling. ±15 points. This is the volume accumulation/distribution layer — independent of price movement.
Component 4 — Volume Delta (up to ±12 points):
The estimated directional volume pressure — bull volume EMA minus bear volume EMA using the candle range position method. ±12 points. This captures intrabar volume directional bias as opposed to OBV's inter-bar accumulation bias.
Component 5 — HTF EMA Bias (up to ±18 points):
The higher timeframe EMA structure — fast EMA above slow EMA with close above fast EMA (bull) or the inverse (bear). ±18 points. This ensures the Flow Vector reflects the macro institutional direction, not just the current timeframe's local momentum.
Component 6 — Price vs Vector Line (up to ±15 points):
Whether the current close is above or below the KAMA Vector Line. ±15 points. Price above the Vector Line in a bull regime confirms the pullback has not reached the Vector Line yet (trend intact). Price below confirms the line has been reached or breached (potential reversal zone).
Flow Vector thresholds:
+40 to +100 — strong bull flow. Setup A (Trend Micro-Pullback) long entries require this minimum
+65 to +100 — extreme bull flow. Used as a fade signal when combined with upper balance band touch
-40 to -100 — strong bear flow. Setup A short entries require this minimum
-65 to -100 — extreme bear flow. Fade signal condition for lower band touches
-39 to +39 — neutral flow. Directional conviction insufficient for Trend regime entries
Flow Acceleration:
In addition to the absolute score, VECTOR checks whether the Flow Vector is currently accelerating — increasing for two consecutive bars (bull) or decreasing for two consecutive bars (bear). Acceleration is a hard requirement for Setup A (Trend Micro-Pullback) entries, ensuring the entry occurs when flow is building rather than stalling or reversing.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🕯 Scalping Candle Quality — The Pin Bar Filter
VECTOR applies a specific, tight candle quality standard for all entry types — the scalping pin bar. All four conditions must be simultaneously true:
Bull pin bar requirements:
Bullish close (close above open)
Lower wick covers at least 42% of the total bar range — the rejection of the low is dominant
Upper wick is at most 32% of the total range — no significant selling into the close
Body size at least 0.10× ATR — not a doji or near-doji
Close in the upper 28% of the bar range (upper quartile) — the bar closed strongly bullish
Bear pin bar requirements: The mirror conditions — upper wick dominant (42%+ of range), lower wick minimal (32% max), small minimum body, close in the lower quartile.
Why this specific candle quality standard for scalping: Scalping entries are executed in the wick of the signal candle — buying at the low of a bull pin bar, selling at the high of a bear pin bar. A candle that lacks a dominant rejection wick provides no clear structural fill level. The upper quartile close requirement for bulls ensures the rejection was decisive — not a bar that dipped into support and then closed mediocre. These parameters are significantly stricter than the standard 50% wick filter used in MERIDIAN and PIVOT, reflecting the precision required for scalping entries.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🏷 Four Setup Types — Regime-Gated Playbooks
VECTOR implements four distinct setup types, each activated only in the appropriate regime state. The active playbook is displayed on the dashboard as a PLAYBOOK row, telling you exactly which setups are available right now.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup A — Trend Micro-Pullback (Regime: Trend Bull or Trend Bear only)
The primary VECTOR scalp entry. Fires in Trend Bull regime for longs, Trend Bear for shorts.
Full condition stack for long:
Regime is Trend Bull (regime == 1)
Flow Vector is strongly bullish (≥ +40)
Flow Vector is accelerating (rising for two consecutive bars)
Price has touched the EMA 8 or Vector Line from above — the micro-pullback has reached the trend reference level. Touch tolerance is ±0.22× ATR (configurable)
A qualifying bull pin bar has formed at the touch
The recent 5-bar low has dipped into the EMA 8 / Vector Line zone (confirming the touch was genuine, not just proximity)
Price is not extended above the Vector Line by more than the maximum extension setting (default: 1.0× ATR) — the anti-chase filter
RSI(7) is between 40 and 70 — not already overbought, not in a capitulation zone
Why this is the core scalp setup: In a confirmed Trend Bull regime with accelerating flow, the EMA 8 and Vector Line are the natural pullback magnets. Institutional buyers who are long in the trend use these levels to add on dips. The pin bar at the level confirms they stepped in. The anti-extension filter prevents chasing a move that has already run 1× ATR above the Vector Line — exactly the stretch that precedes a deeper pullback.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup B — Micro Impulse Break (Regime: Trend or Balance)
A momentum continuation scalp that fires when price breaks out of a micro swing range with a qualifying body and volume delta confirmation.
Key conditions for long:
Regime is Trend Bull or Balance (the setup fires across both regimes as momentum can develop in either)
Price closes above the highest high of the last 4 bars (configurable lookback) on the previous bar — a genuine micro swing break
The break bar's body meets the minimum body threshold (default: 0.85× the impulse body minimum × ATR)
Volume delta is positive — buying pressure drove the break
A qualifying bull pin bar is present on the break bar
HTF bias aligns — long only when the higher timeframe confirms bullish
Price is not over-extended above the Vector Line (anti-chase filter)
What this setup captures: The breakout from a micro consolidation range with volume confirmation — the intrabar equivalent of a structure break. On a 1-minute chart, a 4-bar micro range that breaks with a strong body and bull delta is a clean scalp entry with a tight stop at the bottom of the range. In Balance regime, this setup provides the best entries because the market character does not support pullback trades but does support momentum breaks on sufficient flow.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup C — Range Fade / Band Extreme (Regime: Balance only)
The mean-reversion scalp. Fires only in Balance regime when price reaches the outer balance band with an exhausted or reversing Flow Vector.
Short fade conditions:
Regime is Balance (regime == 3)
Price has touched the upper balance band (within 0.08× ATR of the upper band)
The Flow Vector is either in extreme bull territory (≥ +65, meaning the move to the band is overextended) OR the flow is beginning to fade (Flow Vector is falling and was recently above +53)
A qualifying bear pin bar confirms the rejection at the band
RSI(7) is above 58 — confirming the RSI is elevated at the band touch, consistent with a reversal setup
Why band fades only fire in Balance: In a Trend Bull regime, price touching the upper balance band is a continuation event — the trend is simply pushing to the next level. Fading that in a trend produces the most reliable losses in scalping. Setup C is therefore hard-gated to Balance regime only, where the market has proven it is oscillating rather than trending, and the balance band genuinely represents a mean-reversion boundary.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Setup D — Vector Shift / Flow Zero-Cross (Off by default)
A legacy setup type that fires when the Flow Vector crosses from negative to positive (long) or positive to negative (short) with a strong body candle and positive volume delta. Off by default on fast timeframes because flow zero-crosses on M1–M5 produce excessive noise. Available for traders who want to experiment with flow momentum entries on H1+ timeframes where the zero-cross carries more structural weight.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🧠 The 7-Point Scalp-Weighted Confluence Score
VECTOR uses a setup-weighted scoring system specifically calibrated for scalping frequency and quality:
Score structure:
Setup Type (up to 2 points) — primary setups (Trend Micro-Pullback, Micro Impulse) score 2 points. Secondary setups (Range Fade, Vector Shift) score 1 point. This weighting reflects that Setup A and B have more prerequisite conditions and are inherently higher quality
Flow Acceleration (1 point) — Flow Vector is actively building in the signal direction over the last two bars. Ensures the entry coincides with momentum building, not stalling
HTF Bias (1 point) — higher timeframe EMA confirms the signal direction
Volume Expansion (1 point) — current bar volume exceeds the volume average by the configured minimum (default: 1.05×)
Non-Chop Market (1 point) — the market is not in Chop regime. This point is also enforced as a hard gate — signals cannot fire in Chop regardless of the score
RSI(7) Filter (1 point) — the 7-period RSI is in the acceptable zone for the signal direction (40–70 for longs, 30–60 for shorts)
Maximum score: 7. Default minimum: 4. The scalp-weighted system means that a Setup A or B entry with flow acceleration, HTF alignment, and volume can reach 5 points from the setup type, flow, HTF, and volume components alone — a clean high-quality signal. Setup C entries require more supporting factors to reach the threshold because their 1-point setup score means more of the other layers must confirm.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🛡 Anti-Chase & Quality Filters
VECTOR includes several anti-chase and quality gates specifically designed for scalping precision that do not appear in the other AlphaX indicators.
Extension Filter: No long signal fires if price is already above the Vector Line by more than the configured maximum extension (default: 1.0× ATR). No short signal fires if price is already below by that much. This single filter eliminates the most common scalping failure — entering a pullback after it has already run too far from the reference level, leaving insufficient room for the signal to develop before hitting the stop.
Dip/Rip Confirmation: For Setup A entries, the 5-bar lowest low (bull) or highest high (bear) must have reached within a tight ATR tolerance of the reference lines. This confirms that the touch was genuine — price actually dipped into the zone — rather than just being close to it without contacting it.
RSI(7) Micro Filter: A 7-period RSI gate blocks entries when RSI is already overbought (above 70 for longs) or in a knife-catch zone (below 40 for shorts). On scalping timeframes, entering a long when 7-bar RSI is already at 75 means you are entering after the move is exhausted. This filter alone dramatically reduces the worst class of setup A false signals — those that occur when price is touching the EMA 8 on the way back down through it rather than bouncing off it.
Flow Acceleration Requirement: Setup A requires the Flow Vector to be accelerating (not just positive) for two consecutive bars. A stale, high but flat Flow Vector indicates the move is decelerating — the opposite of the momentum condition that produces clean scalp continuations.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Scalp Entry Reference — Wick-Based Positioning
Unlike the other AlphaX indicators where the entry is taken on the close or next open, VECTOR's entry reference is the rejection wick of the signal candle — specifically the bar's low (for bull signals) or high (for bear signals). This is the optimal scalp fill zone.
Why the wick, not the close: A scalp pin bar with a 42%+ lower wick has a significant low-to-close range. Entering at the close gives up nearly half that range unnecessarily. The institutional scalp entry is at the wick extreme — the exact level where buyers stepped in and stopped the selling. A limit order at the bar's low (bull) captures the optimal risk/reward because the stop goes below that low, and the full bar range is available as immediate profit space.
Entry reference visualization: A cross marker is plotted at the signal bar's low (bull) or high (bear) — the wick entry reference — distinct from the signal triangle. This gives you the precise price at which to place a limit order if you prefer limit entry over market-on-open execution.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📊 Live Dashboard
The 17-row real-time dashboard displays the complete internal state across five sections.
REGIME
Market Regime — current regime state with icon: ⛔ CHOP — STAND ASIDE, ▲ TREND BULL, ▼ TREND BEAR, or ◆ BALANCE / RANGE. This is the primary trading context indicator
Playbook — the active setup playbook matching the current regime: NO TRADES, SCALP PULLBACK ▲, SCALP PULLBACK ▼, or SCALP FADE / BREAK. Tells you exactly which setup types can fire
Flow Vector — the live composite Flow Vector score with + or - sign. Yellow-green when strongly positive, red when strongly negative, neutral otherwise
METRICS
Efficiency — current Kaufman Efficiency Ratio value. Yellow-green when in trend territory (≥ threshold), orange when in chop territory (≤ chop max)
Chop Index — current Choppiness Index value. Orange when above the stand-aside threshold
ADX — current ADX value. Yellow-green when above the trend minimum
Vol Delta — ▲ BUYERS or ▼ SELLERS based on the current volume delta direction
FILTERS
HTF Bias — ▲ BULL, ▼ BEAR, or — FLAT
Session — ✓ ACTIVE or ✗ OFF
CONFLUENCE
Bull Score — live 0–7 score. Background highlights yellow-green when threshold is met and regime is not Chop
Bear Score — live 0–7 score. Background highlights red when threshold is met and regime is not Chop
Vector Line — the exact current KAMA Vector Line price, color-coded by Flow Vector strength
Live confluence label: During non-chop regimes, a small B x/7 · S x/7 label appears near the Vector Line on the current bar, updating in real time.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📈 Chart Visual System
KAMA Vector Line — the adaptive trend reference line, color-coded by Flow Vector strength. Bright yellow-green when bull flow is strong, bright red when bear flow is strong, fading to semi-transparent in neutral/weak territory
Balance Bands (upper, lower, midline) — the Bollinger-style bands used as reference for Balance regime and Setup C fade entries. Purple-tinted at low opacity
▲ Label with setup tag (below bar, yellow-green) — bull scalp signal. Tag shows A, B, C, or D identifying which setup type fired. Tooltip shows the full setup description
▼ Label with setup tag (above bar, red) — bear scalp signal
Entry Reference Cross (× marker) — plotted at the signal bar's low (bull) or high (bear) — the optimal scalp limit entry price
SL Guide (red dotted circles) — stop loss reference below the EMA 8 and Vector Line minimum (bull) or above (bear), plus ATR buffer
TP Guide (yellow-green dotted circles) — dynamically computed reward target at R multiple
Regime Change Labels (optional) — small labels at regime transition bars showing TREND ▲, TREND ▼, or BALANCE. Off by default — regime visible on dashboard
Live confluence label — B x/7 · S x/7 near the Vector Line on the current bar
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚀 How to Trade with AlphaX VECTOR — Step by Step
Step 1 — Read the Regime First
Check the Market Regime row on the dashboard. ⛔ CHOP — do nothing, close the chart if needed. ◆ BALANCE — Setup B and C available. ▲ TREND BULL or ▼ TREND BEAR — Setup A is active
Check the Playbook row — it tells you exactly which setup type is currently firing-eligible
Note the Flow Vector value. Above +40 in Trend Bull is the optimal Setup A environment. Below +40 but still positive suggests the trend may be weakening
Step 2 — Prepare the Level
In Trend Bull, identify where the Vector Line is currently sitting (Vector Line on dashboard). This is your Setup A anchor level — watch for price to pull back toward it
Note the EMA 8 on the chart. For Setup A, price must touch either EMA 8 or the Vector Line — whichever is closest to price is the active support
In Balance, note where the upper and lower balance bands sit. These are the Setup C fade boundaries
Step 3 — Enter on the Signal Label
A ▲ label below the bar with setup tag is the core scalp signal — Trend Micro-Pullback long. All conditions including regime, flow acceleration, line touch, pin bar, RSI, and extension filter are confirmed
The entry reference × marker shows the wick low — the optimal limit order price
The SL guide is at the minimum of EMA 8, Vector Line, and the bar low, minus ATR buffer. This is a tight structural stop designed for scalping
The TP guide is at the R-multiple target. Default 2.0R for a tight scalp stop produces a larger absolute target than most other AlphaX indicators due to the compressed ATR-based stops
Step 4 — Manage the Scalp
Scalp trades in VECTOR are short-duration by design — move the stop to breakeven after any meaningful move in your favor
Watch the Flow Vector on the live label — if it drops below +40 during a long trade, the bull flow is weakening. Consider taking profit early
If the regime changes to Chop during an open trade, take profit immediately — the market character has changed and the setup's underlying logic no longer applies
Setup A targets in strong Trend Bull regimes can be extended toward the band extremes. In strong trends, the first R-target is often just the beginning of a larger move
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Identifying Low-Quality Conditions — When Not to Trade
Stand aside when:
Market Regime shows ⛔ CHOP — this is the clearest possible signal to step back. No signals will fire, and any manual entries during chop carry statistically negative expectation on scalping timeframes
Chop Index above 61 on the dashboard — even if regime hasn't fully shifted to CHOP, a CI above 61 is a warning that market character is deteriorating. Reduce size or stop trading
Flow Vector is between -39 and +39 — the directional conviction is insufficient for Setup A. In this zone, the market is neither clearly bullish nor bearish at the flow level. Wait for the vector to commit above ±40
Flow Vector is high but flat (no acceleration) — a Flow Vector at +55 that has been flat for 5 bars means the momentum is stale. Setup A requires active acceleration, not just a high score. The signal will be blocked, but the absence of acceleration is itself a warning
HTF Bias opposes the signal direction — scalping against the higher timeframe institutional flow is the highest-risk scalp. If HTF shows BEAR and you are attempting Setup A longs, every entry is fundamentally counter-trend
RSI(7) is above 70 at a bull pin bar — the 7-bar RSI filter will block the signal, but if you see a bull pin at the Vector Line with RSI at 72, it is a warning that the touch is occurring after an overbought condition rather than at a healthy pullback
Regime changes rapidly between states — if the regime is cycling between Trend Bull and Balance or Balance and Chop multiple times per session, the market is in an indecisive transition phase. These transitions produce the most noise and the lowest signal quality across all setup types
The ideal VECTOR scalp setup:
Trend Bull or Trend Bear regime sustained for 5+ bars
Flow Vector at ±55 or above, actively accelerating
HTF aligned with regime direction
Price pulling back cleanly to the Vector Line / EMA 8 zone with a tight, contained range
Bull or bear pin bar with lower/upper wick of 50%+ of range, closing in the upper/lower quartile
RSI(7) between 45–60 for longs or 40–55 for shorts — the healthy pullback RSI zone
Volume above average, volume delta confirming direction
Score at 5/7 or higher
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚡ Key Features
🧭 Three-metric regime classification engine — Kaufman Efficiency Ratio, Choppiness Index, and ADX combined to classify every bar as Trend Bull, Trend Bear, Balance, or Chop
📊 Active playbook display — dashboard tells you exactly which setup type is eligible right now: SCALP PULLBACK ▲/▼, SCALP FADE / BREAK, or NO TRADES
📈 KAMA Vector Line — adaptive moving average that tightens in trends and stabilizes in chop, providing the most accurate scalp reference line available
⚡ 6-component Flow Vector — EMA Stack, KAMA Slope, OBV Slope, Volume Delta, HTF Bias, and Price vs Vector Line combined into a -100 to +100 directional conviction score
🔴 Flow Acceleration detection — Setup A requires the Flow Vector to be actively building for two consecutive bars, blocking stale or decelerating flow entries
🏷 Four regime-gated setup types — Setup A (Trend Micro-Pullback), Setup B (Micro Impulse Break), Setup C (Balance Band Fade), Setup D (Vector Shift, off by default)
🕯 Strict scalping pin bar standard — lower/upper wick ≥ 42% of range, opposing wick ≤ 32%, minimum body, close in upper/lower quartile — the highest candle quality standard in the AlphaX suite
🛡 Anti-chase extension filter — blocks signals when price has already moved too far from the Vector Line, eliminating chasing entries
📍 Wick-based entry reference — × marker at the signal bar's wick extreme for optimal limit order placement
🔢 RSI(7) micro filter — 7-period RSI gates block overbought longs and oversold shorts at the exact scalp entry bar
📊 Live Efficiency, Choppiness, and ADX metrics on dashboard — the three regime classification inputs displayed with live values and color-coded thresholds
🎨 Flow Vector–colored Vector Line — line color reflects directional conviction in real time from strong bull to neutral to strong bear
📊 17-row live dashboard — Regime, Playbook, Flow Vector, Efficiency, Chop Index, ADX, Vol Delta, HTF Bias, Session, Confluence, and Vector Line price updated every bar
🔔 5 alert conditions — long entry, short entry, chop warning, trend bull regime change, trend bear regime change
⚙ Fully configurable — ER lookback and thresholds, CI length and maximum, ADX length and minimum, KAMA parameters, OBV and delta lengths, flow vector thresholds, all four setup enables, pullback tolerance, anti-chase extension, impulse body minimum, confluence minimum, HTF timeframe and EMAs, volume filter, session, SL/TP parameters, and all colors are independently adjustable
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚙ Settings Reference
Regime Engine
ATR Length — ATR lookback for all ATR-relative calculations (default: 14)
Efficiency Ratio Length — Kaufman ER lookback period (default: 10)
ER Min for Trend Regime — minimum ER to qualify as trend (default: 0.35)
ER Max for Chop Regime — maximum ER that contributes to chop classification (default: 0.22)
Choppiness Index Length — CI calculation lookback (default: 14)
Chop Index — Stand Aside Above — CI threshold above which all signals are suppressed (default: 61.0)
ADX Length — ADX calculation lookback (default: 14)
ADX Min for Trend — minimum ADX for Trend Bull or Trend Bear classification (default: 20.0)
Balance Band Length / Mult — parameters for the balance band Bollinger calculation (defaults: 20 / 2.0)
Flow Vector
Vector Line (KAMA) Length — KAMA lookback period (default: 21)
KAMA Fast / KAMA Slow — KAMA smoothing constants (defaults: 2 / 30)
OBV Slope Length — lookback bars for OBV slope calculation (default: 10)
Volume Delta Length — EMA smoothing for volume delta estimation (default: 14)
Strong Vector Threshold — minimum absolute Flow Vector for strong directional condition (default: 40)
Extreme Vector (range fade) — Flow Vector level triggering the extreme condition for Setup C fades (default: 65)
Entries & Confluence (Scalping)
Setup A · Trend Micro-Pullback — toggle the primary trend scalp setup
Setup B · Micro Impulse Break — toggle the momentum continuation scalp
Setup C · Range Fade (band extreme) — toggle the balance band mean-reversion scalp
Setup D · Vector Shift (legacy) — toggle the flow zero-cross setup (default: off)
Pullback Touch Tolerance (xATR) — ATR tolerance for EMA 8 / Vector Line touch detection (default: 0.22)
Impulse Min Body (xATR) — minimum body size for Setup B impulse and Setup D shift candles (default: 0.55)
Max Extension from Vector (xATR) — maximum allowed distance from Vector Line before anti-chase blocks the signal (default: 1.0)
Micro Swing Lookback — bars for the Setup B micro swing high/low reference (default: 4)
Min Confluence Layers (of 7) — minimum score to fire a signal (default: 4)
Show Entry Signals — toggle signal labels
Show Confluence Label — toggle the live B/S score label near the Vector Line
Signal Cooldown (bars) — minimum bars between consecutive signals (default: 3)
Filters
HTF Trend Filter — toggle higher timeframe EMA alignment requirement
HTF Timeframe — higher timeframe for EMA data (default: 60-minute)
HTF Fast / Slow EMA — EMA periods on the HTF (defaults: 21 / 55)
Volume Confirm — toggle volume expansion requirement
Min Volume vs Avg — minimum volume ratio (default: 1.05)
Volume Avg Length — SMA length for volume baseline (default: 20)
Session Filter — toggle active hours restriction (default: off)
Active Session — configurable session window
Exit Guidance
Show SL / TP Guides — toggle stop and target circle plots
SL Distance (xATR) — ATR buffer added beyond the EMA 8 / Vector Line stop anchor (default: 0.85)
TP Reward (R) — take profit as a multiple of the actual risk (default: 2.0)
Display
Show Vector Line (KAMA) — toggle the adaptive trend reference line
Show Balance Bands — toggle the BB-style balance band plots
Show Regime Change Labels — toggle small regime transition labels on regime-change bars (default: off)
Show Dashboard — toggle the full dashboard
Dashboard Position — Top Left / Top Right / Bottom Left / Bottom Right
Colors
Bull / Bull Bright — yellow-green family for bullish signals and indicators
Bear / Bear Bright — red family for bearish signals
Chop / Caution — orange for chop regime and caution states
Balance / Vector — purple for balance bands, Vector Line neutral state, and equilibrium elements
SL Guide / TP Guide — stop and target circle colors
Dash Text / Dash BG / Dash Header / Dash Section / Dash Frame — full dashboard color control
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🔔 Alert Conditions (5 total)
Entry Alerts
Vector Long — scalp long signal fired. Wick rejection entry confirmed with all regime and confluence conditions met
Vector Short — scalp short signal fired
Regime Alerts
Vector Chop Warning — market has entered Chop regime. Stand aside until regime clears
Vector Trend Bull — market has transitioned to Trend Bull regime. Watch Vector Line for Setup A pullback opportunities
Vector Trend Bear — market has transitioned to Trend Bear regime. Watch Vector Line for Setup A short pullback opportunities
All alert messages are formatted as const strings for clean webhook and notification platform integration.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎯 Recommended Settings by Instrument & Timeframe
The default configuration is optimized for XAUUSD, major forex pairs, and crypto on M1–M5 :
Cooldown at 3 bars — fast timeframes produce setups in rapid succession. A 3-bar cooldown prevents back-to-back signals on consecutive bars while allowing reasonable signal frequency
SL at 0.85× ATR — tight scalp stop anchored to the EMA 8 / Vector Line zone. The strict pin bar requirement ensures the signal bar's wick provides meaningful structural support, so the stop does not need to be large
TP at 2.0R — on M1–M5 with a 0.85× ATR stop, 2.0R produces a tight, achievable target during normal trending conditions
HTF at 60-minute — the standard intraday reference for M1–M5 scalping
Volume at 1.05× average — a very low multiplier appropriate for scalping timeframes where volume spikes are smaller and entry bars do not always show dramatic volume expansion
For other instruments or timeframes, adjust:
M15–H1 intraday — increase ER Length to 14, increase Chop Length to 20, increase CI stand-aside to 62, increase ADX minimum to 22, increase Cooldown to 6, increase TP to 2.5–3.0R
Crypto (BTC, ETH) — increase ATR Length to 20 for smoother ATR on high-volatility instruments, increase ER threshold to 0.40 for trend classification on more volatile assets
Indices (NAS100, US30) — use session filter restricted to market hours, increase ADX minimum to 22, consider enabling Setup D for the sharper zero-cross moves typical of index momentum
Fewer, higher-quality signals — raise Min Confluence to 5–6, increase ER trend minimum to 0.40, reduce CI stand-aside to 58, increase pullback touch tolerance slightly to 0.25 for tighter reference line proximity
Higher signal frequency — lower Min Confluence to 3, enable Setup D, reduce cooldown to 2, disable HTF filter on fast timeframes where the 60-minute EMA can lag too much
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
👥 Who This Is For
⚡ Pure scalpers on M1–M5 — VECTOR is the only indicator in the AlphaX suite specifically designed for sub-5-minute scalping. Every parameter — the pin bar standard, the wick entry reference, the tight ATR stop, the acceleration requirement, the anti-chase filter — is calibrated for fast-timeframe execution
🧭 Regime-aware traders — traders who understand that different market conditions require different strategies will immediately recognize the value of having the regime identified and the playbook selected automatically
🎯 Precision entry traders — the wick-entry reference and the strict pin bar requirements make VECTOR ideal for traders who want precise fill zones rather than market-on-close entries
📊 Traders who study market microstructure — the Efficiency Ratio, Choppiness Index, and KAMA components expose the internal mechanics of market character in ways that standard trend indicators do not
🔴 Traders who are burned by chasing — the anti-extension filter and RSI(7) gate are built specifically to stop the two most common scalping failures: entering too late after the move has already extended, and entering when momentum is actually exhausted
⚠ Traders who overtrade in choppy conditions — the Chop regime is the most powerful feature for discipline. When the dashboard shows ⛔ CHOP — STAND ASIDE, the system enforces what many traders cannot enforce themselves
🏦 Gold and forex scalpers — the default settings are calibrated for XAUUSD and major forex pairs, which exhibit the clearest regime cycling of any liquid instruments due to their session-driven institutional flows
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
📝 Notes
All signals are confirmed on bar close — the indicator is non-repainting by design. All regime classification, Flow Vector, setup conditions, and confluence scoring finalize on confirmed bars only
The KAMA Vector Line has a warm-up period equal to the KAMA Length setting. On charts with insufficient bar history, the Vector Line may not display correctly until enough bars accumulate
The Efficiency Ratio and Choppiness Index require their full lookback periods to produce accurate readings. On charts with fewer bars than the longest lookback, readings may be imprecise during the initial warm-up period
The anti-chase extension filter uses the distance from close to the Vector Line. In fast-moving scalp conditions, this filter can sometimes block entries that a discretionary trader would take. Increase the extension maximum if this becomes a frequent issue on your instrument
The signal cooldown of 3 bars is deliberately short for scalping timeframes. On M1 charts, 3 bars = 3 minutes — sufficient to prevent back-to-back duplicate signals while allowing rapid sequential setups in trending conditions
Setup D (Vector Shift) is off by default and is not recommended for M1–M5 scalping. Flow Vector zero-crosses on fast timeframes occur too frequently and with insufficient signal-to-noise ratio to be useful without additional filtering. Consider enabling it only on H1+ timeframes
The balance bands in VECTOR are Bollinger-style ATR-smoothed bands used purely as visual references and Setup C trigger levels. They are not the same as the ANCHOR adaptive bands and do not produce trailing stop functionality
The indicator does not track open positions or P&L and does not connect to any broker or account
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Disclaimer
This indicator is a technical analysis and visualization tool intended for educational and informational purposes only. It does not constitute financial advice or a recommendation to buy or sell any financial instrument. All signals are generated from historical and real-time price data using mathematical calculations — their accuracy or profitability is not guaranteed. Past performance of any signal type does not guarantee future results. Always conduct your own analysis, use proper risk management, and consult a licensed financial advisor before making any trading decisions. The author accepts no responsibility for any losses incurred from the use of this indicator.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Built for scalpers who know that trading the wrong setup in the wrong regime is not a signal problem — it is a system architecture problem. Indicator

AI SuperTrend [PickMyTrade]THE PROBLEM WITH A FIXED MULTIPLIER
Every standard SuperTrend applies the same ATR multiplier across all market conditions — the same constant during a strong trending breakout, a narrow choppy range, and a volatility spike. A value calibrated for one regime is miscalibrated for the others. Most traders compensate by manually switching timeframes or parameters. This script automates that decision.
The question it asks: what if the ATR multiplier were selected from historical bars that most resembled the current market regime — matched by Hurst state and volatility rank — rather than set by the user as a fixed constant?
────────────────────────────────────────
THREE AI LAYERS
Layer 1 — Hurst Exponent (Regime Gate)
The Hurst Exponent is computed via Rescaled Range (R/S) Analysis. It measures the degree of long-range dependence (memory) in the price series:
H ≥ 0.55 → Persistent (trending) — SuperTrend active, signals enabled
H ≈ 0.50 → Random walk — candles turn gray, no signal generated
H ≤ 0.45 → Anti-persistent (mean-reverting) — signals suppressed
The Hurst gate is the first filter. Signals only fire when market structure is historically associated with persistence — not randomness or mean-reversion.
Layer 2 — Garman-Klass Volatility Rank
Garman-Klass (1980) estimates realized volatility from OHLC prices rather than close-to-close returns, capturing intrabar price range and making it more sensitive to volatility changes. The current reading is percentile-ranked against recent history (0–100%) and used as the second feature dimension for the KNN search.
Layer 3 — KNN Multiplier Optimizer
K-Nearest Neighbors searches a rolling memory bank of feature pairs from previous bars. For each current bar it finds the K most similar historical bars by Euclidean distance in that 2D feature space. From those neighbors it retrieves the ATR multipliers that were in effect — weighted by the profitability of the bar that followed. The result is the AI Multiplier: a context-aware value drawn from the most similar past conditions, not a fixed constant.
────────────────────────────────────────
WHAT YOU SEE ON THE CHART
Candle color — the defining visual. Orange = bull trend regime, blue = bear trend regime, gray = random walk or mean-reverting. The regime state is readable on every bar without checking the table.
Signals — ● (circle) marks trend flips with Hurst ≥ 0.65, the high-conviction threshold. ▲▼ (triangle) marks standard threshold crossings. No signal fires in gray (random or mean-reverting) regimes.
SL / TP lines — dashed lines drawn automatically at each signal bar, sized from current ATR × the AI Multiplier active at that bar.
Info table (top right) — live display of Hurst value, Regime label, Direction, AI Multiplier, Vol Rank, and KNN memory bar count. Shows WARMUP until KNN has stored enough bars to begin optimizing.
────────────────────────────────────────
HOW TO USE
A signal requires all three conditions to be true simultaneously:
KNN is warmed up (table shows ● LIVE)
Hurst confirms a trending regime (H ≥ Trend Threshold input)
Price is on the correct side of the EMA filter
Circle signals (●) indicate Hurst has exceeded 0.65 — stronger persistence than the standard threshold. Triangle signals (▲▼) are at the user-defined threshold. Gray candles indicate the market is not in a trending regime; reducing exposure or standing aside is appropriate during those periods.
The regime background shading (faint orange or blue fill) shows when the SuperTrend is in an active directional state.
────────────────────────────────────────
INPUTS
AI Engine — Hurst Lookback, KNN Neighbors (K), KNN Memory (bars), Trend Threshold, Mean-Revert Threshold
SuperTrend — ATR Length, Base Multiplier, Volatility Window, EMA Period
Visual — Bull/Bear colors, SL/TP lines toggle, SL ATR Multiplier, Risk:Reward ratio, Regime Background
Display — Zen Mode (hides labels and table), Show Info Table
ALERTS
Three alert conditions: Long Signal, Short Signal, Any Signal.
────────────────────────────────────────
NOTES
KNN requires warmup equal to the KNN Memory setting before the AI Multiplier activates. During warmup the base multiplier scaled by Hurst and volatility rank is used instead.
No repainting. All signals are confirmed on bar close. KNN stores lagged values only.
Garman-Klass citation: Garman, M. & Klass, M. (1980). On the Estimation of Security Price Volatilities from Historical Data. Journal of Business , 53(1), 67–78.
Indicator

Adaptive SuperTrend -, Regime Filter & Buy/Sell Signals [LunqFX]Adaptive SuperTrend is a self-tuning trend indicator for PulseWire that fixes the biggest flaw of the classic SuperTrend: a fixed multiplier that whipsaws in choppy markets and lags in fast ones. This version makes the SuperTrend multiplier adaptive — it automatically widens in high volatility and tightens in low volatility — and layers a regime filter and a momentum filter on top to deliver clean, non-repainting Buy/Sell signals with an automatic take-profit / stop-loss ladder and live performance stats. It works on forex, crypto, stocks, indices, futures, gold (XAUUSD) and Bitcoin (BTCUSD), on any timeframe, for scalping, day trading and swing trading. Built in Pine Script v6. Keywords: adaptive supertrend, supertrend, trend, trend following, buy sell signals, regime filter, ATR trailing stop, volatility, momentum, take profit, stop loss, risk reward, trend reversal, no repaint, scalping, day trading, swing trading.
◆ WHY ADAPTIVE
A normal SuperTrend uses one fixed multiplier for every market and every condition, so it gets shaken out in volatile phases and reacts too slowly in calm ones. Adaptive SuperTrend ranks current volatility against its own recent history (0–100%) and maps that onto a multiplier range — wide when the market is wild, tight when it is calm — with zero manual tuning. The same settings behave sensibly on EURUSD, BTCUSD and the S&P 500.
◆ WHAT IT DOES
Adaptive trend line + fill — a volatility-adjusted trailing stop that flips turquoise (up) / magenta (down).
Filtered Buy/Sell signals — a trend flip only fires as a signal when two filters agree.
Auto TP/SL ladder — on every signal it draws the stop (on the trend line) and TP1 / TP2 / TP3 at 1R / 2R / 3R, so you get a complete trade plan instantly.
Conviction Score 0–100 — one number summarising how strong the current setup is.
Live win-rate stats — the script tracks its own past signals on the fly.
Neon trend candles + a clean live dashboard.
◆ HOW IT WORKS (the concepts)
Adaptive multiplier: ATR is ranked by percentile over a lookback window; the percentile sets the SuperTrend multiplier between your min and max.
SuperTrend core: the standard trailing-stop formula, flipping direction when price closes beyond the band.
Regime filter (Kaufman Efficiency Ratio): directional travel divided by total path = how trending vs choppy the market is. Signals are blocked in low-efficiency (range) conditions to cut false signals.
Momentum check: a flip is only taken when price is on the matching side of its momentum EMA.
Conviction Score: a weighted blend of trend efficiency, momentum agreement and trend-line slope (0–100).
Live stats: each signal is tracked sequentially — a “win” = price reaches TP1 (1R) before the stop — with no lookahead.
◆ HOW TO USE IT
Take BUY / SELL labels in the direction of the new trend; the SL and TP1/2/3 ladder give you the exact plan and risk/reward.
Favour signals with a high Conviction Score and a TRENDING regime; stand aside when the dashboard shows RANGE.
Manage the trade to TP1/TP2/TP3 or trail with the adaptive line.
Tune Min/Max multiplier for tighter or looser stops and Efficiency threshold for how strict the range filter is.
Combine with your own support/resistance, structure or higher-timeframe bias for confluence.
◆ SETTINGS
Adaptive Trend: ATR length, min/max multiplier, volatility window.
Regime Filter: on/off, efficiency length, trend threshold.
Momentum Check: on/off, momentum EMA.
Visuals: trend fill, glow, neon candles, Buy/Sell labels.
Trade Levels & Stats: auto TP/SL ladder, live signal stats.
Panel: show/hide, position, background, accent.
◆ ALERTS
Buy signal · Sell signal · Trend flip up · Trend flip down.
◆ ORIGINALITY
The SuperTrend trailing-stop formula is a standard, public technique, implemented here from scratch. The adaptive volatility-percentile multiplier, the regime filter integration, the Conviction Score, the R-based TP/SL ladder and the live win-rate engine are my own original work. No third-party or copied code is used.
◆ LIMITATIONS
This is a trend/volatility tool, not a complete system — always confirm with price action and risk management.
Like all trend-following tools, it can chop in tight ranges; the regime filter reduces but cannot eliminate this.
The fixed-R stop in the ladder is a planning aid (constant 1R), separate from the trailing adaptive line — they are different stops by design.
The live win-rate is the indicator’s own TP1-vs-stop estimate; if a single bar tags both the stop and TP1 it is counted as a win, so treat the stat as indicative, not exact.
Past performance and live stats do not guarantee future results.
◆ NON-REPAINTING
Trend, regime, signals and stats are computed from confirmed bar data with no security() lookahead. A signal printed on a closed bar stays. As with any live tool, the forming bar updates in real time and settles on close.
Adaptive SuperTrend is an educational analysis tool, not financial advice. Always do your own research and manage risk. © LunqFX. Indicator

Fractal Dimension Index [JOAT]FRACTAL DIMENSION INDEX
A proper Higuchi-method Fractal Dimension Index that tells you whether the market is currently trending (D approaches 1.0 — a smooth, linear path), chopping (D approaches 2.0 — a noisy, plane-filling random walk), or somewhere in between. Unlike volatility, FDI does not care about how much price moved — it cares about how convoluted the path was getting there . That makes it the single cleanest regime-classification number in technical analysis.
What FDI measures
The fractal dimension of a curve is a number between 1.0 (a perfect line) and 2.0 (a curve dense enough to fill a plane). For price series:
D ≈ 1.0–1.4 — the price path is close to a straight line. The market is trending; momentum tools work, reversion tools don't.
D ≈ 1.4–1.6 — the path is in a transitional regime. Use neutral tools.
D ≈ 1.6–2.0 — the path is chaotic and self-intersecting. The market is chopping; reversion tools work, momentum tools whipsaw.
The Higuchi-paper canonical thresholds are 1.4 (trend) and 1.6 (chop); both are configurable.
Higuchi algorithm — done properly
The implementation is the standard Higuchi method:
For each k from 1 to k_max (configurable, default 8), compute the average curve length L(k) across k starting offsets, normalised by the window length N.
Build the k_max pairs (log k, −log L(k)) .
Fit a least-squares line through those pairs; the slope is the fractal dimension D .
Apply optional EMA smoothing (configurable, default 5 bars) to suppress per-bar jitter.
A minimum-valid-pairs guard (default 3) prevents D from being computed when too few (k, L) pairs are finite, and a warmup-bars gate (default 50) prevents wild D values on sparse early data.
Regime classification with hysteresis
Raw D is mapped to one of three regimes — Trending / Random / Chop — using the two-threshold scheme. Two extra alert thresholds ( Extreme Trend D < 1.30 and Extreme Chop D > 1.70) flag the high-conviction tail cases.
Visual system
Background tint by regime — pastel mint for trend, coral for chop, cream for random. Transparency configurable (default 88, institutional-subtle).
Regime-change markers — tiny up/down/circle glyphs above price at every confirmed flip.
Optional candle tinting by regime (off by default to preserve user's chart style).
Optional D-line companion — when enabled, the smoothed D is plotted as a series. Because the script is overlay, pin the line to its own scale (right-click → Pin to scale → No Scale). For a true sub-pane, add the indicator a second time and drag that instance into a new pane.
Right-side floating label — anchored N bars right of the live close showing current D and a regime glyph. Configurable size, offset, regime text.
Optional reference horizontal lines at D = 1.4 / 1.5 / 1.6 when the D-line is shown.
A locked Pastel palette (mint trend / coral chop / cream random on a warm-white ground) gives the indicator a distinctive soft-institutional look.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Current D value and smoothed D value.
Regime classification with glyph.
Bars in current regime.
Distance to nearest threshold.
Extreme-state badge when in tail regions.
Alerts
Four alert conditions, each independently controllable:
Regime Flip (any classification change)
Extreme Trend (D crosses below 1.30)
Extreme Chop (D crosses above 1.70)
D Series Crosses 1.5 (the random-walk centre)
How to read it
Two reads, in order of conviction:
Regime classification + bars in regime — the more bars the current regime has persisted, the more reliable the read. Brand-new flips can flicker; multi-bar confirmed regimes do not.
Extreme regime alerts — when D crosses below 1.30, the market is in an extremely directional regime — momentum trades are the highest-conviction setups. When D crosses above 1.70, the market is in pathological chop — fade extremes, do not chase breakouts.
The single most useful workflow is to use FDI as a meta-filter — pair every signal-generating indicator with FDI regime. Trend signals from a momentum tool become high-conviction when D < 1.4; reversion signals from a Z-score oscillator become high-conviction when D > 1.6. The Suggested JOAT Indicator dashboard rows in Hurst Regime Sentinel and Entropy Oscillator follow exactly this principle.
Suggested settings
Defaults (window 30, k_max 8, EMA smoothing 5, warmup 50) are tuned for 15m–1H. For lower timeframes drop window to 20 and EMA to 3. For HTF (4H+) raise window to 50 and EMA to 8. The Higuchi-paper thresholds (1.4 / 1.6) are intentionally classical — tighten only if you find the regime classification too sensitive on your instrument.
Originality / what's reused
The Higuchi fractal-dimension algorithm is the textbook 1988 method — a public-domain piece of applied mathematics, implemented from the paper. The implementation here — the bounded-loop Higuchi pipeline with minimum-pairs guard and warmup gate, the two-threshold regime classifier with extreme-tail alerts, the pastel-palette regime tint, the pin-to-scale D-line companion logic, the right-side floating label, and the dashboard — is JOAT-original. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. The Higuchi loop, the regime classifier, the alert logic, and the dashboard are isolated modules — adapt any single piece without reading the whole file. Forks welcome with credit.
Limitations
Higuchi D is statistical — it tells you about recent path complexity , not future direction. A trending regime (D < 1.4) does not say which way; it says momentum tools should work. Combine with a directional indicator. The algorithm uses bounded Pine loops; very large window values increase compile cost. D is smoothed (EMA-filtered) by default, which trades some lag for substantially reduced flicker; turn smoothing off to see raw D.
—
-made with passion by jackofalltrades
Indicator

Entropy Oscillator [JOAT]ENTROPY OSCILLATOR
A pane oscillator that measures the Shannon entropy of recent returns — the information-theoretic measure of how uncertain (chaotic) vs how predictable (directional) the recent distribution of price moves has been. Low entropy = the market is in a directional regime; high entropy = the market is chopping. Unlike volatility, entropy does not care about how big moves are — only how concentrated their distribution is. That distinction is what makes it one of the cleanest regime-classification tools in quantitative finance.
Shannon entropy, applied to markets
For a sequence of N recent log returns, the script:
Bins the returns into B equal-width bins across the empirical range.
Computes the probability of each bin (count / N).
Computes the Shannon entropy: H = −Σ p(i) · log(p(i)) over non-zero bins.
Normalises to by dividing by log(B) — the maximum possible entropy for B bins, which corresponds to a perfectly uniform distribution.
A perfectly uniform distribution (returns evenly spread across all bins → chaotic chop) produces normalised entropy of 1.0. A perfectly concentrated distribution (all returns in one bin → directional regime) produces entropy of 0. Real markets sit in between, and the script's job is to tell you where.
Two-threshold regime classification
Normalised entropy < low threshold (default 0.30) → DIRECTIONAL regime. The distribution of returns is concentrated; momentum tools work.
Normalised entropy > high threshold (default 0.70) → CHOP regime. The distribution is spread; reversion tools work.
Between the thresholds → MIXED regime. Neither side has the edge.
The thresholds are the spec-default institutional values; tighten or loosen for your instrument.
Slope-coloured entropy line
The smoothed entropy series is plotted in the pane with a slope-driven colour gradient — bull colour when entropy is falling toward directional, bear colour when entropy is rising toward chop. At a glance you can see which way the regime is moving even before it has crossed a threshold.
Visual system (pane + chart overlay)
In the pane:
Slope-coloured entropy line.
Threshold lines at low / 0.5 / high (toggleable).
Translucent fill zones for the low and high regions.
Pane background tint by current regime (toggleable).
On the chart (force_overlay):
Bar colouring — chart bars tinted by regime (cool when directional, hot when chop, neutral when mixed). Off by default.
Overlay background — subtle bgcolor projected onto the main chart marking the current regime. Off by default.
A locked Crimson Pulse palette (electric blue directional / lime-yellow chop / muted mauve mixed on a crimson-black ground) gives the pane a distinctive structural identity.
Regime Suggestion dashboard row
Like its sister script Hurst Regime Sentinel, Entropy Oscillator exposes a Suggested JOAT Indicator row that names the best companion script for the current regime. Defaults: AlphaTrend / Kalman Quantum Drift / Doppler Velocity Shift family for Directional regimes; Z-Score Reversion / Heisenberg Uncertainty Bands / Brownian Motion Residual / Renaissance Mean Reversion for Chop; Liquidity Magnet / Schrödinger Zone Probability / Fractal Dimension Index for Mixed. Every suggestion is user-configurable — you pick from the JOAT suite which tool the dashboard recommends per regime.
Dashboard
Monospaced table positionable to any of nine corners. Surfaces:
Current normalised entropy value.
Smoothed entropy and its slope direction.
Regime classification.
Bars in current regime.
Distance from entropy to nearest threshold.
Source series + window length + bin count in use.
Suggested JOAT Indicator (toggleable).
Alerts
Three alert conditions, each independently controllable:
Cross into Low Entropy (directional regime entry).
Cross into High Entropy (chop regime entry).
Any Regime Change (any classification flip).
How to read it
Two reads, in order of conviction:
Entry into Low Entropy — the directional commitment signal. The recent distribution of returns has narrowed; the market is in a momentum regime. Pair with a directional indicator (the dashboard's suggestion row tells you which).
Entry into High Entropy — the chop confirmation signal. Returns are widely distributed; momentum tools whipsaw, reversion tools work. Pair with a reversion indicator.
The "slope of entropy" itself is the leading read — when the line is falling toward the low threshold, a directional regime is forming; when it is rising toward the high threshold, chop is building. You do not need to wait for the threshold cross if you trust the slope gradient.
Suggested settings
Defaults (window 50 returns, 10 bins, EMA smoothing 3) are tuned for 15m–4H on liquid markets. The rule of thumb is window / bins ≥ 5 so each bin has enough samples to be statistically meaningful. For lower timeframes drop window to 30 and bins to 6. For HTF raise window to 100 and bins to 12.
Originality / what's reused
Shannon entropy is textbook 1948 information theory — public domain. The implementation here — the rolling N-return histogram pipeline with configurable bins, the log(B)-normalised entropy formula, the two-threshold regime classifier with mixed centre, the slope-coloured entropy line, the chart-overlay bar-colouring projection from the pane, and the user-configurable Suggested JOAT Indicator dashboard row — is JOAT-original. No third-party code reused.
Open source
Published open-source under the default Mozilla Public License 2.0. The histogram + entropy loop, the regime classifier, the slope-colour pipeline, and the dashboard are isolated modules. Forks welcome with credit.
Limitations
Shannon entropy describes the recent distribution of returns — it does not predict direction. A directional regime tells you momentum tools should work; it does not say which way. The histogram is sensitive to bin count and window length; the rule-of-thumb window / bins ≥ 5 is the default sanity check. EMA smoothing trades some lag for substantially reduced flicker; turn smoothing to 1 to see raw entropy.
—
-made with passion by jackofalltrades
Indicator

APEX Trend & Signal Engine [Viprasol]APEX Trend & Signal Engine — Regime-Aware Dual-Mode Toolkit
═══════════════════════════════════════════════════════════
THE PROBLEM IT SOLVES
═══════════════════════════════════════════════════════════
The single most expensive mistake in trading is using the wrong style for the
conditions — trend-following a sideways range (death by a thousand whipsaws), or
mean-reverting a strong trend (fighting a freight train). Most indicators apply ONE
style blindly and let you find out the hard way.
APEX reads the market REGIME first, tells you which style fits right now, and only
fires signals that match. When the market is trending it trend-follows; when it's
ranging it mean-reverts. Same tool, opposite logic, applied at the right time.
═══════════════════════════════════════════════════════════
HOW THE FOUR PILLARS WORK TOGETHER
═══════════════════════════════════════════════════════════
Every trade decision rests on four questions, and APEX answers each:
1. BIAS — long or short? A multi-factor Trend Midline (your choice of 8 MA types)
colored by a consensus of price position, slope, and directional movement.
2. REGIME — trend or range? ADX + Kaufman Efficiency Ratio classify the regime and
pick the favored mode (trend-follow vs mean-revert). This is the engine's core.
3. LOCATION — where is fair value? A premium/discount model: longs are only allowed
in discount (below equilibrium), shorts only in premium (above). Better entries,
better risk-reward.
4. SIGNAL + FILTER — the trigger, gated by regime, location, and trend-cloud
confluence, so low-quality signals are filtered out.
═══════════════════════════════════════════════════════════
SIGNALS
═══════════════════════════════════════════════════════════
• In a TRENDING regime: momentum entries in the trend direction (baseline reclaim with
rising/falling slope and directional-movement agreement).
• In a RANGING regime: mean-reversion entries when price tags an extreme band and
reverts.
• A colored dot marks a confluent signal; a gray ✕ marks a signal that LACKS confluence
(a hint to exit the opposite position rather than enter).
• Take-profit markers flag when price reaches an ATR-based target after a signal.
═══════════════════════════════════════════════════════════
FOUR OPTIONAL OVERLAYS
═══════════════════════════════════════════════════════════
• TREND MIDLINE — an MA baseline colored by multi-factor consensus (blue long / red
short / gray neutral-exhaustion), filled to price.
• ADAPTIVE ZONE — a Supertrend rendered as a dynamic support/resistance ZONE (support
beneath price in uptrends, resistance above in downtrends) rather than flip signals.
• TREND CLOUD — a modified Ichimoku Kumo (Donchian, EMA, or HMA engine) for trend
context; bullish above, bearish below.
• EXTREME ZONES — multi-band standard-deviation gradient zones marking where price is
statistically stretched and prone to revert (mean-reversion).
Each is independently toggleable so you keep the chart as clean as you like.
═══════════════════════════════════════════════════════════
5-STATE CANDLE COLORING & DASHBOARD
═══════════════════════════════════════════════════════════
Candles paint in five states from a 0-10 trend-strength score: strong buy, buy,
neutral, sell, strong sell (strong states solid, weaker states faded).
The dashboard reports, at a glance: Favored Mode (trend-follow / mean-revert), Regime
(trending/ranging + bias), Trend (increasing/decreasing), Strength (0-10), Volatility
(increasing/decreasing), Location (premium/discount), Session (Tokyo/London/NY/Void),
and the current Signal.
═══════════════════════════════════════════════════════════
HOW TO USE
═══════════════════════════════════════════════════════════
1. Leave Mode on "Auto" and read the dashboard's Favored Mode — trade with the regime.
2. Take colored signals that agree with the trend; treat gray ✕ marks as exit cues.
3. Respect Location — favor longs in discount, shorts in premium.
4. Use the Adaptive Zone / Extreme Zones as entry and target reference levels.
5. Tune Trend/Fast lengths and the ADX threshold to your market and timeframe.
═══════════════════════════════════════════════════════════
HONEST LIMITATIONS — PLEASE READ
═══════════════════════════════════════════════════════════
• No indicator predicts the future. APEX organizes context and signals; it does not
guarantee outcomes. Confirm on closed bars.
• Regime classification has a transition lag — the first bars of a new trend or range
can be mislabeled. The favored-mode readout is guidance, not gospel.
• Session hours are set in UTC and adjustable; verify they match your instrument.
• Volume-dependent and synthetic-feed instruments may read differently.
• Take-profit markers use a simple ATR target on one tracked signal — they are a
reference, not a backtest. This is a decision-support tool, not financial advice.
═══════════════════════════════════════════════════════════
CREDITS & ORIGINALITY
═══════════════════════════════════════════════════════════
This is an original toolkit built from public-domain technical-analysis methods,
implemented from their published formulas: Supertrend (Olivier Seban), Ichimoku Kinko
Hyo (Goichi Hosoda), Bollinger Bands / %B (John Bollinger), ADX/DMI (J. Welles Wilder),
Efficiency Ratio (Perry Kaufman), and the premium/discount equilibrium concept. The
regime-aware dual-mode architecture, the confluence/location gating, the strength model,
the overlays' construction, and all code are original Viprasol work. No third-party Pine
code is reused and no proprietary algorithms are included.
Indicator

Trend Efficiency Exhaustion Regime-Gated & CalibratedTrend Efficiency Exhaustion — Regime-Gated & Calibrated
What it is
A single-pane oscillator that measures when a trend is losing efficiency and turns that into graded, forward-calibrated exhaustion and ignition signals. It is built around one question — "is this efficiency-exhaustion event actually worth acting on?" — and every component in the script exists to answer that one question rather than to add an independent signal.
It plots, in one pane: an efficiency-gap histogram, a fast efficiency line, event markers, a regime "weather-strip" ribbon, and an information table that states the read in plain language. It is symbol- and timeframe-agnostic; defaults are tuned for NIFTY / BANKNIFTY but a Source input and a VIX-symbol input let you use it on any instrument in any market.
The core idea — efficiency, not a magic multiplier
The Efficiency Ratio is the net move divided by the total path travelled over a window: ER = |close − close | / Σ|close − close |, bounded 0–1. A value near 1 means price moved in a straight, efficient line (trend); near 0 means it wandered (chop).
Reading efficiency at two horizons gives the central signal:
Efficiency Gap = ER_fast − ER_slow. When the fast read rolls over while the slow read is still elevated, the trend is losing efficiency under an otherwise intact trend — the classic exhaustion tell.
Displacement percentile ranks the current leg's travel against recent completed legs on this symbol and timeframe, so "stretched" is defined by the instrument's own recent behaviour rather than a fixed price > k·ATR multiplier.
Exhaustion = a stretched leg with fast efficiency rolling over, under a genuine trend. Ignition = fast efficiency surging from a young leg (continuation).
Why these components belong in ONE script (how the mashup works together)
This is a mashup by design, but it is not a stack of indicators each drawing its own signal. Every layer is a gate or a grade on the same event, feeding one decision pipeline:
Efficiency (dual-horizon Efficiency Ratio) — detects the candidate event (exhaustion / ignition).
Regime engine (Efficiency + ADX + a self-exciting volatility-cluster intensity) — decides when the event is even allowed to fire. Exhaustion is only meaningful inside a real trend; it is suppressed in chaotic, news-driven volatility. The regime is rendered as a continuous 5-state read (strong-trend / trend / neutral / reversion / chaos).
Variance ratio (Lo-MacKinlay) — a second, short-window-reliable lens that confirms a real trend existed to exhaust (VR > 1 = trending, < 1 = mean-reverting, ≈ 1 = random walk), with a significance z-statistic.
Ornstein-Uhlenbeck half-life — quality gate: if the estimated mean-reversion half-life is longer than the evaluation horizon, the expected reversion is too slow to pay off in time, so the exhaustion call is rejected.
Implied-volatility (VIX) state — quality gate: exhaustion is more reliable when implied volatility is elevated but stable (fear present, not spiking). The gate blocks exhaustion during a volatility spike.
Divergence quality — grades each exhaustion on the price↔efficiency divergence at the extreme: the slope of the efficiency drop between successive same-side pivots, how developed the swing is, and whether volume waned into the extreme. Weak-divergence setups are filtered out.
Forward calibration — the scorekeeper. Each fired event is logged as a hypothesis and resolved a fixed number of bars later against an ATR-scaled move, then summarised as a realised hit-rate versus an unconditional base rate.
Take any single layer away and the remaining pipeline still describes the same one event — they are complementary measurements of a single hypothesis (a trend running out of efficiency), which is precisely why they belong together rather than as separate scripts. The regime, variance-ratio, OU and VIX layers never plot their own buy/sell calls; they only decide whether the efficiency-exhaustion event is trustworthy.
The part most scripts skip — forward calibration
Most indicators emit a score and never check whether that score was right. Here, every event is queued and resolved N bars later against moveATR × ATR, in R-multiples. The information table reports, per class (Exhaustion / Ignition):
n — resolved sample size
Hit% with a Wilson 95% interval (so you see how stable the rate is)
Base% — the unconditional same-horizon move rate (the honest benchmark)
Edge = Hit% − Base%, marked * when a z-test clears 95%
MFE / MAE in R (how far it ran for you vs against you)
a recency-weighted hit-rate and a regime-conditional hit-rate for the current regime
If Edge is not positive, the signal is not adding information over chance on your chart — and the script tells you so instead of hiding it.
How to use it
Ribbon = context. Don't fade a strong trend; stand aside in chaos.
Histogram rolling over + a marker = the trigger.
Verdict line = the plain-language call (e.g. "TREND · watch for exhaustion", "EXHAUSTION ↓ · fade the up-move (edge +12%*)", "CHAOS · stand aside"), with the calibrated edge appended when the live class is calibrated.
Chart View: Clean (default) shows only the decision elements; Full adds the slow-ER line, displacement %, all reference levels and the divergence glow for analysis.
Information Table: Compact (default) is the key-info panel — verdict, efficiency/displacement/regime, variance-ratio/OU/VIX, best calibrated edge. Pro adds the full per-class calibration table with confidence intervals, recency and regime-conditional rows.
Treat it as a context-and-confirmation overlay on your own process, not an autotrading signal. Paper-trade first and confirm the Edge column is positive on your symbol and timeframe before relying on a class.
Originality
The novelty is not any single formula — those are credited below — but the closed loop: a self-referential displacement percentile (no fixed multiplier), a regime engine and four independent quality gates that all condition one event, and a forward-calibration layer that scores that event against its own base rate with confidence intervals, recency weighting and regime conditioning. Everything is original Pine; no third-party script code is reused.
Inputs, data & markets
Source (group 1) sets the raw series the whole engine reads — change it to use any instrument in any market.
Defaults are tuned for NIFTY / BANKNIFTY; the VIX Symbol defaults to NSE:INDIAVIX. For other markets, change the Source, the ER horizons and the VIX symbol (e.g. CBOE:VIX). A missing VIX symbol auto-disables that gate.
Inputs are organised institutionally: Source & Efficiency · Regime & Variance-Ratio · Displacement · Events · Quality Gates · Calibration · Display · Theme · Exports. The table colour scheme adapts automatically to a light or dark chart background.
Non-repaint
Efficiency is read on confirmed closes, legs are taken from confirmed pivots, events fire on barstate.isconfirmed, and there are no dynamic-length ta.* calls. Forward statistics are in-sample, close-to-close, with no costs, slippage or stops — a study aid, not a backtest.
Concept credits (original Pine re-derivations)
Efficiency Ratio — Perry Kaufman
Variance-ratio test — Andrew Lo & Craig MacKinlay (1988)
ADX / Directional Movement — J. Welles Wilder
Self-exciting (Hawkes) intensity — Alan G. Hawkes (1971)
Mean-reversion half-life — Ornstein & Uhlenbeck process
Score confidence interval — Edwin B. Wilson (1927)
Dominant-cycle homodyne discriminator — John F. Ehlers
Disclaimer
For education and information only. Not financial advice and not a recommendation to buy or sell anything. Past performance does not guarantee future results. The forward statistics are in-sample and idealised (close-to-close, no costs/slippage/stops). Always do your own analysis and manage your own risk; paper-trade before risking real money. Indicator

Multi Cycle KST OscillatorMulti-Cycle KST Oscillator — Publication Description
What it does
The Multi-Cycle KST Oscillator is a momentum oscillator built on the Know Sure Thing (KST) — a summed, weighted blend of four smoothed Rate-of-Change series. The standard KST plots one line. This script computes three KSTs at short, intermediate and long cycle lengths, reads their alignment, and wraps the plotted short-term KST in five decision-support modules so the momentum reading is filtered, contextualized and scored rather than read at face value. A single 0–100 Confidence value summarizes everything, and the oscillator line is colored by it.
Why these components are combined (the reason for the mashup)
KST on its own is a momentum (rate-of-change) factor, and it lags by construction. Adding more momentum tools such as RSI, MACD or Stochastic would only restate the same information. So every module added here is deliberately orthogonal to momentum — each answers a question the KST cannot answer by itself:
Long-term KST direction — the regime gate. A slower KST decides which side to trade. Short-term buy crosses are only trusted when the long-term cycle is rising, short crosses only when it is falling. This is the core of the multi-cycle idea: trade the shorter cycle in the direction of the longer one.
ADX/DMI regime filter — trade only in a real trend. Momentum crosses whipsaw in sideways markets, so signals are suppressed and the background is shaded while ADX is below threshold.
Higher-timeframe filter — alignment with the bigger picture. The same momentum direction is read from a higher, confirmed (non-repainting) timeframe to drop counter-trend crosses.
Price/KST divergence — early warning. Because the oscillator measures momentum, a price high against a lower oscillator high (or the inverse) flags fading momentum before the signal-line cross. Regular and hidden divergences are detected from confirmed pivots.
Efficiency-Ratio conviction scaler — how much to trust it now. A Kaufman Efficiency Ratio scales the Confidence up in clean trends and down in chop. It is a magnitude scaler, never a direction vote, so it cannot double-count momentum.
How the parts work together
Each module feeds one combined output. The plotted oscillator is the short-term KST (optionally standardized). A Buy or Sell is raised only when the short-term KST crosses its signal line AND the long-term cycle agrees AND the regime and higher-timeframe filters agree AND Confidence clears its threshold. Confidence itself is a weighted vote across the four orthogonal inputs (KST-vs-signal, long-term direction, price location, divergence), scaled by the Efficiency Ratio and clamped to 0–100. Divergence labels and the ATR stop/target are context around that one decision.
What makes it original
It is not a KST with other indicators drawn beside it. It turns a single KST line into a three-cycle alignment model with a long-term regime gate, then standardizes the result so its bands carry a consistent statistical meaning across instruments, and fuses five orthogonal checks into one bounded Confidence reading with explicit buy/sell gating. The combined output — "is momentum turning, in a real trend, in line with the larger cycle, and how much should I trust it" — does not exist in the source indicator.
How to use it
Pick an Oscillator mode: Raw (native KST), Z-Score, or Robust Z (median/MAD, least sensitive to spikes).
Green = up-cycle momentum, red = down-cycle; further from zero and brighter = stronger and higher conviction. Warn / Extreme bands mark stretched readings.
Buy / Sell triangles fire only when the cross, the long-term gate, the regime and higher-timeframe filters, and the Confidence threshold all agree. Treat them as points to investigate, not automatic entries.
Use divergences as early warning of fading momentum, and the two dashboards for the full read: right panel = Bias, Confidence, Signal, Cycle alignment, Oscillator; left panel = Long-term KST, Regime, Divergence, ATR Stop and Target.
The dashboards adapt to your chart's background brightness so both stay legible on dark or light themes.
Settings and defaults
Inputs are grouped and numbered: Data Source, the three KST cycles, Normalization & Display, Threshold Bands, Confirmation Filters, Divergence, Confidence Engine, Risk Targets, Signals & Alerts, and Visuals & Dashboard. Defaults follow the classic KST values and are tuned for NSE NIFTY on intraday charts. Because the Price / High / Low sources are user-selectable, the engine works on any instrument or even another indicator's output — for other assets, adjust the ROC/SMA lengths, the higher timeframe and the ATR period to suit.
Concept credit
The Know Sure Thing (KST) oscillator was created by Martin J. Pring. This script is an original multi-cycle implementation built around that public concept and is not affiliated with, nor endorsed by, its originator.
Honest limitations
KST is lagging by construction; this confirms moves, it does not predict them. Confidence (0–100) is an ordinal heuristic for how aligned the components are — it is not a probability or a win rate. Divergence is computed on confirmed pivots and therefore prints a few bars after the pivot forms; that latency is inherent to honest pivot detection. Signals confirm on bar close (non-repainting) by default, and the higher-timeframe filter uses the previous confirmed higher-timeframe bar. Backtest any settings on your own market before relying on them.
Disclaimer
For research and educational purposes only. This is not financial advice, not an investment recommendation, and not a solicitation to trade. Indicators describe past price behavior; they do not predict the future. Trading involves substantial risk of loss. Test on out-of-sample data and make your own decisions. The author accepts no liability for any use of this script. Indicator

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

Market Adaptive Trend [Interakktive]Market Adaptive Trend (MAT) is a diagnostic trend tool that re-tunes its own responsiveness to the live volatility regime — and shows you, in plain English, why it tightened or loosened.
Most "adaptive" trend tools hide their adaptation behind math you cannot audit. MAT does the opposite: it adapts AND it narrates. Every adjustment it makes is shown on the chart, in words, so you can see the reasoning rather than trust a black box.
This is a market-state diagnostic tool, not a signal generator.
█ THE CORE IDEA
A fixed-length moving average has one flaw: it responds the same way in calm markets and violent ones. In a clean trend it lags; in a chop it whipsaws. MAT addresses this by letting the live volatility regime govern how responsive the trend line is — the link most adaptive tools never expose.
MAT continuously measures relative volatility: current ATR divided by its own longer-run average. A reading near 1.00 means volatility is at this market's own baseline; above means more volatile than usual; below means calmer. That single ratio classifies the market into one of three regimes, and each regime changes how the line behaves.
█ THE THREE REGIMES
RIDING (calm) — Volatility below baseline. The line loosens and leans toward its slower estimate, so it rides a clean trend without being shaken out by minor noise.
TIGHTENING (balanced) — Volatility near baseline. The line sits in a balanced blend — neither chasing nor lagging — typical of coiling, pre-expansion conditions.
GUARDED (volatile / stretched) — Volatility above baseline. The line damps its response and becomes slow to flip, and candles tint amber as a caution that conditions are stretched and a flip here is lower-confidence.
█ HOW THE LINE IS BUILT
MAT blends a fast and a slow estimate of price. The blend weight is not fixed — it shifts with the regime above, scaled by an Adaptation Strength input (0 = a fixed blend, 1 = full regime governance). The blended target then drives the visible line through an error-feedback step, so the line moves toward its target proportionally rather than snapping. The calculation uses only confirmed historical data, contains no lookahead, and does not repaint.
█ THE HUD
A compact on-chart panel reports, in plain language:
- Trend — UP / DOWN
- Regime — RIDING / TIGHTENING / GUARDED, with a plain-English volatility descriptor (very calm → below normal → near normal → slightly elevated → high)
- Responsiveness — LOW / MED / HIGH (how reactive the line currently is)
- Read — a one-line summary of the current state
No raw scores are presented as the message — the panel is meant to be read at a glance.
█ HOW TRADERS USE MAT
MAT is designed to provide context, not entries. Common uses:
- Reading whether the current environment favours riding (RIDING) or caution (GUARDED)
- Avoiding low-confidence flips when the regime is GUARDED and conditions are stretched
- Using the regime read as a filter alongside your own entry method
- Framing trend direction with an honest sense of how much to trust it right now
█ SETTINGS OVERVIEW
Adaptive Baseline
- Source, Fast estimate length, Slow estimate length
- Adaptation Strength (how strongly the regime governs responsiveness)
Regime Governor
- Volatility baseline length, ATR length
- Calm threshold (below = RIDING), Volatile threshold (above = GUARDED)
Visual
- Adaptive line, Gradient fill, Edge glow, Color candles, Line width
HUD
- Show HUD, Position, Size
█ DISCLAIMER
This indicator is a market context and diagnostic tool only. It does not generate trade signals, entries, or exits. Past behaviour does not guarantee future price action. Always combine with independent analysis and proper risk management. Indicator

Event HorizonEvent Horizon is a historical analog projection fan designed to answer one practical question:
What has price tended to do after market conditions similar to the current one?
Instead of using a fixed crossover, oscillator threshold, or trend flip, this indicator builds a market fingerprint from the current chart, searches historical bars for similar conditions, and projects how those past analogs moved forward. The result is a visual forward fan showing possible path behavior, consensus direction, dispersion, confidence, and the closest historical analog path.
The goal is not to predict the future with certainty. The goal is to give traders a structured way to compare the current setup against similar historical environments and quickly see whether the analogs are aligned, scattered, bullish, bearish, or not useful.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
What makes this script different
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Most projection tools draw a channel, regression, moving average extension, or volatility cone from a fixed formula.
Event Horizon uses a historical analog engine. Each bar is converted into a multi-factor feature profile, then compared against prior market states using weighted Euclidean similarity. The closest historical analogs are used to create a forward projection fan.
The script combines:
• Historical analog matching
• Weighted Euclidean distance
• Regime-aware scoring
• Volatility and trend-state filtering
• Consensus projection logic
• Closest historical path overlay
• Agreement and confidence scoring
• Directional historical event dots
• A visual fan that shows uncertainty instead of one hard prediction
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How it works
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Market fingerprint
The script measures the current market using multiple dimensions, including:
• Recent price movement
• Trend slope
• ATR expansion and compression
• Candle range and body behavior
• Wick imbalance
• Position relative to recent structure
• Breakout distance
• Volume ratio and volume trend
• ATR percentile
• ADX / trend strength
• Historical shape samples
This creates a multi-dimensional profile of the current setup.
2. Historical analog search
The current profile is compared to historical profiles on the same chart. Similarity is calculated with weighted Euclidean distance, so higher-value features such as trend, volatility regime, and price-shape behavior can matter more than smaller candle details.
Closer historical examples receive stronger match scores.
3. Regime awareness
The script also classifies the current environment into regimes such as trend, compression, volatility expansion, volume shock, or range/chop. Historical examples from incompatible regimes are penalized, helping reduce weak comparisons.
4. Forward projection
Once the best analogs are selected, the script looks at what actually happened after those historical setups. Those forward moves are normalized and projected from the current anchor point.
5. Consensus and confidence
The indicator summarizes the analog group with:
• Directional bias
• Agreement percentage
• Dispersion
• Confidence score
• Edge state: TRADEABLE, CAUTION, or NO EDGE
• Historical self-test statistics
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How to read the fan
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
The colored fan shows the projected analog field.
The colored median shows the consensus path of the analog set.
The white line shows the closest visible historical analog path. It is not a guaranteed target. It is the path taken by the most similar past setup selected by the engine.
The wider the fan, the more disagreement there is between analogs.
The tighter the fan, the more historically aligned the analogs are.
The confidence and edge label are important. A bullish-looking fan with low confidence or high dispersion should be treated differently than a bullish fan with strong agreement and cleaner regime structure.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Historical dots
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Historical event dots help visually review where prior projection events occurred.
• Bullish projection dots appear below price
• Bearish projection dots appear above price
• Mixed or neutral readings are visually separated
This makes it easier to inspect whether the indicator has been identifying useful directional conditions on the current symbol and timeframe.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
How to use it
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
For newer traders:
1. Start on the Daily or 4H chart.
2. Look at the colored median.
3. Check whether the white analog path agrees with the median.
4. Check confidence and agreement.
5. Avoid forcing trades when the label says NO EDGE or when dispersion is high.
A stronger bullish read usually has:
• Median path rising
• White analog path also rising
• Agreement above roughly 65%
• Confidence above roughly 70
• Low or medium dispersion
• Edge state showing TRADEABLE or CAUTION, not NO EDGE
A weaker or avoidable read usually has:
• Median and white path disagreeing
• Agreement near 50%
• High dispersion
• Low confidence
• Range/chop regime
• NO EDGE label
For experienced traders:
Use the fan as an analog-based context layer. It is most useful when combined with your own structure, liquidity, trend, support/resistance, volume, or macro view. The script is designed to show whether historical analog behavior supports or conflicts with the trade idea you already see on the chart.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Suggested settings
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Balanced stocks / ETFs:
• Mode: Current Bar Projection
• Visual Mode: Cinematic
• Fan Style: Hybrid Swarm + Contours
• Horizon: 30
• Memory Lookback: 1800
• Max Analogs: 30
• Minimum Analogs: 6
• Pre-Event Window: 20
• Shape Samples: 6
• Path Scale: 1.0
Crypto:
• Horizon: 24
• Memory Lookback: 2000 to 2500
• Path Scale: 0.75 to 0.90
• Flexible direction matching
Intraday:
• Horizon: 20 to 24
• Minimum Analogs: 8
• Path Scale: 0.75 to 1.0
• Use liquid symbols only
Trend continuation:
• Direction Matching: Strict
• Mirror Opposite Direction: Off
• Path Scale: 1.0
Reversal / exhaustion:
• Direction Matching: Flexible
• Mirror Opposite Direction: On
• Path Scale: 0.75
• Shorter horizon preferred
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best use cases
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Event Horizon is best suited for:
• Liquid stocks
• Major ETFs
• Index products
• Major crypto pairs
• Trend continuation setups
• Post-compression expansion
• Structure breaks
• Swing-trade context
• Daily and 4H analysis
It is less suitable for:
• Illiquid symbols
• Very new tickers with limited history
• Low-volume penny stocks
• Earnings gaps
• Binary news events
• Extremely short scalping timeframes
• Markets with sudden one-off catalysts
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Important notes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
This is an analog projection tool, not a standalone buy/sell system.
Historical similarity does not guarantee future behavior. Market structure, liquidity, volatility, news, and macro conditions can change quickly. The fan should be used as a decision-support layer, not as a guaranteed forecast.
The strongest readings occur when the median, white analog path, agreement, confidence, and regime state all point in the same direction.
The weakest readings occur when analogs are scattered, confidence is low, dispersion is high, or the script identifies a no-edge environment.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Event Horizon turns historical market behavior into a forward analog projection fan.
It helps traders see:
• What similar past setups did next
• Whether those analogs agree or disagree
• Whether the current regime supports the projection
• Whether the projected path is tight or scattered
• Whether the setup has enough confidence to matter
Use it to add historical context, probability awareness, and regime-based discipline to your chart analysis.
Indicator

Path Signature Regime Engine# Path Signature Regime Engine (PSRE)
**What it does**
Path Signature Regime Engine reads the *geometry* of recent price action and
labels the current market state as **Trending up**, **Trending down**,
**Range / chop**, or **Turning (reversion)**. Instead of smoothing price with a
moving average, it measures the shape of the path itself using the low-order
**path signature** — a description of a curve by its iterated integrals from
rough-path theory.
Two terms do the work:
- **Level 1 — drift:** the net displacement of the path over a lookback window.
- **Level 2 — Lévy area:** the signed area the path sweeps relative to its own
chord. A path that keeps curling the same way (a trend) accumulates area; a
path that oscillates back and forth (a range) cancels it out. The sign and
size of this area is the core regime signal.
Both terms are turned into 0–100 percentiles over a rolling window, so the read
adapts to each symbol and timeframe automatically.
**How it works (one method, three views — not a mashup)**
This is deliberately **not** a bundle of independent indicators stitched
together. Every component calls the same internal routine that computes the
drift + Lévy-area read. The "extra" layers are that single computation pointed
at different data:
- **Chart timeframe** — the primary regime read.
- **Multi-timeframe confluence** — the *identical* read evaluated on two higher
timeframes (default 1H and 4H). It is reported as **agreement** ("aligned
2/3"), explicitly *not* as independent confirmation, because nested
timeframes share information. "Aligned" requires at least two of the three
views to agree with the chart.
- **Cross-asset comparison** — the same iterated-integral area computed between
*two return streams* (your symbol and a benchmark) instead of price-vs-time.
This yields a geometric lead/lag read plus a relative-strength sign.
Because the higher-timeframe and cross-asset views are projections of one
geometric primitive rather than separate tools, they reinforce a single
conclusion: what is the path doing, and does that hold up when seen from a
slower clock or against a related instrument.
**The honesty layer (why this differs from a typical regime indicator)**
Markets are noisy, so the engine carries its own reality checks rather than
asking you to take the colours on faith:
- **In-sample base rates** — for each regime it tracks, on the history loaded
on your chart, how often price actually continued over a chosen horizon, with
sample counts shown.
- **"Aligned vs not"** — a side-by-side that can reveal the multi-timeframe
layer adding *nothing* on a given instrument (if the two numbers are equal,
alignment isn't helping — and the panel will tell you so).
- **Transition log** — a table of recent regime flips with their realised
forward return (in ATR units) and a ✓/✗ result. With one toggle it also
emits `log:*` series so you can right-click → *Export chart data* and study
the full transition history offline.
These are descriptive statistics on past data, not predictions.
**How to use it**
1. Add it to any chart. It reads the chart's own symbol, so it works on any
market — equities, futures, FX, crypto, indices.
2. Defaults are tuned for **NIFTY** (benchmark `NSE:BANKNIFTY`, same trading
session). For any other asset, open settings group **4 · Cross-asset
comparison** and set a benchmark that trades in the *same hours* as your
instrument, and adjust the two higher timeframes in group **3** relative to
your working timeframe.
3. Read the panel top-down: regime → strength → bias → path quality →
timeframe agreement → relative strength → flow tilt → base rates.
4. Treat the output as **context**, not a trade trigger. The base-rate rows are
there so you can judge, per instrument and timeframe, whether the read has
any historical edge before relying on it.
5. Optional alerts fire on a new reversion setup and on any regime change.
**Inputs are organised in workflow order:** Data & source, Signature engine,
Multi-timeframe confluence, Cross-asset comparison, Regime base-rate study,
Transition log, Appearance. The panel theme adapts to your chart background
luminance for readability on light or dark themes.
**Concept credits**
The mathematics is not mine; the implementation and the regime/honesty
framework are. Path signatures and the Lévy-area interpretation come from the
rough-path and signature-method literature:
- K.-T. Chen — iterated integrals (1957).
- T. Lyons — rough-path theory and the path signature (1998).
- I. Chevyrev & A. Kormilitzin — *A Primer on the Signature Method in Machine
Learning*.
- J. Morrill, A. Fermanian, P. Kidger & T. Lyons — *A Generalised Signature
Method for Time Series* (the basepoint + time augmentation used here).
Only the interpretable Levels 1–2 are computed directly from cumulative sums.
This is a descriptive geometric read, not a full signature and not a machine-
learning model.
---
## Disclaimer (include at the end of the description)
This script is an educational and analytical tool. It is **not financial
advice**, not a recommendation to buy or sell, and not a signal service. All
statistics it shows (base rates, transition forward returns) are **in-sample**,
computed close-to-close on the history loaded on your chart, with no execution
costs or slippage, and are **not** a backtest and **not** a forecast. Past
behaviour does not guarantee future results. Test thoroughly and trade your own
plan and risk.
Indicator

Volatility Pressure & Regime AnalyzerVolatility Pressure & Regime Analyzer
## What this script does
VPRA estimates **when a market is loading energy for an outsized move, how large that move could be, and whether the current regime favors chasing or fading the breakout**. It condenses this into one on-chart verdict panel, directional signal markers, a regime ribbon, and a forecast of the expected move in ATR and points.
It works on **any symbol, any market, any timeframe**. A related volatility index and a companion symbol (the underlying if you chart a derivative, or vice versa) are optional inputs that sharpen the analysis; both can be disabled and the model renormalizes to price-only mode automatically.
## Why these components are combined (mashup justification)
Each module answers a question the others cannot, and the signal only fires when their answers agree. None of them is a stock indicator pasted alongside another — they are inputs to a single pressure model:
1. **Compression (ATR percentile)** answers *"is energy being stored?"* Quiet ranges precede expansion, but compression alone says nothing about direction or timing.
2. **Implied-vs-realized volatility dislocation** (optional vol index) answers *"is the options market mispricing the calm?"* A large gap between implied and realized volatility marks complacency or stress that compression alone cannot see.
3. **Basis tension** (optional companion symbol) answers *"is positioning leaning?"* Momentum in the derivative-to-underlying spread, and outright backwardation, reveal funding pressure and de-risking invisible in a single price series.
4. **Convexity and trend inefficiency** (return acceleration, efficiency ratio) answer *"is price behavior becoming unstable?"*
These four are blended into one **Pressure score (0–100)**, percent-ranked against its own history so thresholds adapt to every symbol and timeframe.
5. **A variance-ratio regime filter** answers *"will the break run or get faded?"* The ratio of k-bar to 1-bar return variance classifies the tape as mean-reverting (pinning) or trending (amplifying). Breakouts in a pinning regime are statistically more likely to fail, so the script can label or skip them.
6. **A multi-timeframe trend filter (Ichimoku cloud bias on the chart TF + three higher TFs)** answers *"is the release direction supported by structure?"* It grades signals rather than generating them. Higher-timeframe values are taken from **closed bars by default, so the confluence grade does not repaint**.
7. **Session, expiry, gap and event context** scale the expected-move forecast: an expiry-afternoon release during a volatility spike forecasts a larger move than a sleepy mid-session one.
Removing any module degrades a specific, named capability — that is the test the combination was built to pass.
## How a signal is generated
A marker prints only when **all** of the following align: pressure has reached a high percentile of its own history within a short lookback ("loaded"), the current bar shows a genuine range expansion ("release"), the condition persists for a confirmation bar count, a debounce gap has passed, and (optionally) the regime and trend filters pass. Direction is scored from **trigger-break** (close beyond the prior N-bar extreme), **close location** within the bar, and short momentum.
Marker color encodes the inferred event type: expiry-session releases, volatility-co-movement squeezes (price and vol index moving together — a short-covering tell), or plain expansions. The glow ring encodes how many higher timeframes agree. An ⓘ label stores a full diagnostic snapshot (pressure, regime, instability, basis, energy, session, expected move) in its tooltip for every signal.
## How to use it
- Apply to a liquid symbol; set "This chart is" to Derivative or Underlying, point the companion and volatility-index inputs at your market's related symbols (or disable them), and set your session hours and expiry weekday.
- Read the panel top-down: **Regime** (chase vs fade), **Pressure/Energy** (how loaded), **Move size** (forecast), **Trend align / HTF** (structure), **Triggers** (the price levels that confirm).
- Use the "Filter" modes to suppress signals against regime or higher-timeframe structure, or leave them as badges and judge manually.
- The advanced rows show per-type follow-through statistics (hit rate, average favorable and adverse excursion in ATR) and an early-vs-late history split as a coarse robustness check. **These are in-sample descriptive statistics, not a backtest.** A companion strategy script with identical logic is available for proper backtesting with costs.
- Alerts: per-signal dynamic alert with all values (webhook-ready), plus static conditions for expiry signals, releases, critical pressure, and vol shocks.
## Originality
The pressure blend (compression x vol-dislocation x basis tension x convexity x inefficiency, percent-rank normalized), the variance-ratio regime gate applied to breakout qualification, the compression-energy budget, and the per-type MFE/MAE statistics with an early/late split are original constructions written from first principles for this script. The only classical components used are public-domain building blocks (ATR, Bollinger/Keltner-style compression logic via ATR percentile, Ichimoku cloud bias as a trend filter, Kaufman efficiency ratio), each justified above.
## Limitations (please read)
- Dealer-positioning effects (often discussed as gamma/vanna/charm) are **inferred from price, volatility and basis behavior**. This script does not and cannot read option-chain open interest. Labels such as "gamma blast" describe an expiry-session release pattern, not a measured dealer position.
- All on-panel statistics are computed on the loaded chart history and will differ across symbols, timeframes and history length.
- Higher-timeframe confluence uses closed HTF bars by default (no repaint); the current chart bar still forms in real time, as with any script.
- Expected-move figures are model estimates, not guarantees.
This script is for education and analysis. It is **not financial advice**; trade at your own risk and test before use.
Indicator

Volatility Regime Compass [JOAT]Volatility Regime Compass
Introduction
Volatility Regime Compass is an open-source volatility state classifier that continuously measures where current ATR stands relative to its own historical distribution and maps it to one of four named regimes: Compressed, Normal, Elevated, and Extreme. The classification is not binary (high or low) — it uses a rolling percentile ranking against configurable lookback windows so the regime reflects where current volatility stands within its recent history, not against a fixed absolute threshold that becomes stale as market conditions evolve.
The practical value is in strategy switching: mean-reversion techniques tend to work in compressed regimes, breakout and momentum techniques in elevated ones. Knowing which regime is active before selecting a technique reduces category errors that produce losses.
Core Concepts
1. ATR Percentile Ranking
Rather than comparing ATR to a static multiplier, the indicator ranks the current ATR value within a rolling distribution of historical ATR values. This produces a percentile score from 0 to 100 that is self-normalizing across different instruments and timeframes:
float atrHi = ta.highest(atrVal, i_rankLen)
float atrLo = ta.lowest (atrVal, i_rankLen)
float atrPct = (atrHi - atrLo) > 0 ?
(atrVal - atrLo) / (atrHi - atrLo) * 100.0 : 50.0
A reading of 80 means current ATR is in the 80th percentile of its recent range — clearly elevated. A reading of 15 means ATR is near multi-period lows — compressed.
2. Four-State Regime Classification
The percentile score maps to four regimes with configurable boundary thresholds. Defaults are: Compressed (below 25th percentile), Normal (25th to 60th), Elevated (60th to 85th), Extreme (above 85th). Crossing a regime boundary triggers a transition event labeled on the chart.
3. Multi-Band Visualization
Five ATR bands project above and below close at configurable multiples (0.5×, 1×, 1.5×, 2×, 2.5× ATR). Each band is color-coded by regime — tighter bands in compressed regimes shade cooler, wider bands in extreme regimes shade hotter using a 5-stop gradient. This gives instant visual calibration of price's relationship to current volatility structure.
4. Volatility Trend
The rate of change of ATR is computed and smoothed. Positive volatility trend (ATR rising) is labeled differently from negative trend (ATR contracting). This distinguishes a currently-elevated but contracting regime from one that is expanding — the former is more likely to produce consolidation, the latter continuation.
Features
ATR percentile ranking: Self-normalizing volatility score relative to recent history
Four volatility regimes: Compressed, Normal, Elevated, Extreme with configurable boundaries
Regime transition labels: On-chart labels at every regime change event
Five ATR expansion bands: Projected above and below close, gradient-colored by regime
Volatility trend direction: Rising vs contracting ATR tracked independently of level
Candle coloring: Candles reflect current volatility regime in real time
Regime background shading: Chart background tint corresponds to current regime
Dashboard: Current ATR, percentile, regime, trend direction, and band levels
Input Parameters
ATR Settings:
ATR Period: ATR calculation length (default: 14)
Percentile Lookback: Rolling window for ATR percentile ranking (default: 100)
Regime Thresholds:
Compressed Below: Percentile below which regime is Compressed (default: 25)
Elevated Above: Percentile above which regime is Elevated (default: 60)
Extreme Above: Percentile above which regime is Extreme (default: 85)
How to Use This Indicator
Step 1: Check the Current Regime
Read the REGIME row in the dashboard. This tells you whether to expect range-bound or trending behavior in the near term.
Step 2: Watch for Regime Transitions
A transition from Compressed to Elevated is the setup for breakout strategies. A transition from Extreme back toward Normal may signal trend exhaustion.
Step 3: Use Bands as Structural Reference
The ATR bands define statistically reasonable price excursion limits for the current volatility state. Closes beyond the 2× or 2.5× band while in a Compressed regime are structurally significant events.
Step 4: Combine with Directional Indicators
This indicator classifies volatility magnitude, not direction. Pair it with a trend or momentum tool to apply regime context to directional decisions.
Indicator Limitations
Percentile ranking depends on lookback length; very short lookbacks can produce unstable regime classifications during sudden volatility spikes
The four-state classification is a simplification; volatility is continuous and regime boundaries are heuristic
Volatility expansion does not indicate direction — it only measures magnitude of movement
Originality Statement
The combination of a self-normalizing ATR percentile ranking, a four-state regime classifier with configurable percentile boundaries, gradient-coded multi-band projection, and a simultaneous volatility trend tracker in a single Pine Script v6 publication constitutes the original contribution. Standard ATR indicators display the raw value or a fixed-multiple band without regime classification or percentile normalization.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Volatility regime classifications are statistical summaries of historical data and do not predict future price movement. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Stochastic Resonance Signal [JOAT]Stochastic Resonance Signal
Introduction
Stochastic Resonance Signal is an open-source indicator built on the physical principle of stochastic resonance — the counterintuitive phenomenon where a moderate level of random noise actually enhances the detection of weak periodic signals rather than degrading it. In trading terms: markets with low volatility noise may suppress trend signals, while a calibrated level of volatility noise can help reveal underlying directional structure.
This indicator computes a signal-to-noise score that normalizes a smoothed price derivative against ATR-based noise. The score peaks when a meaningful directional signal is present within a noise environment that is neither too quiet (which produces false flatness) nor too loud (which obscures the signal entirely).
Core Concepts
1. Signal Component
The raw signal is the smoothed rate of change of price — the first derivative of a filtered price series. An EMA is applied to close to produce a noise-reduced price, then the bar-to-bar difference of that EMA serves as the signal. Positive signal indicates upward momentum; negative indicates downward:
float emaPrice = ta.ema(close, i_signalLen)
float rawSignal = emaPrice - emaPrice
float normSig = rawSignal / (ta.stdev(rawSignal, i_normLen) + 0.0001)
The signal is normalized by its own rolling standard deviation, making it dimensionless and comparable across instruments.
2. Noise Component
Noise is defined as ATR normalized by its rolling standard deviation. This separates the volatility component from the directional component. When noise is very low, it contributes little penalty. When noise is very high, it heavily discounts the signal. The optimal noise range produces the highest SR score:
float noisePenalty = ta.stdev(atrVal, i_normLen) / (ta.sma(atrVal, i_normLen) + 0.0001)
float srScore = math.abs(normSig) / (1.0 + noisePenalty)
3. SR Score and Threshold
The final SR score combines signal strength divided by noise penalty. The score is plotted as a histogram and compared against a configurable threshold. When the score exceeds the threshold in the positive signal direction, a bullish event fires. When in the negative direction, a bearish event fires. Both require barstate.isconfirmed.
4. Regime Context
The indicator categorizes the current noise state as Low, Optimal, or High. The Optimal zone — where stochastic resonance theory predicts signal enhancement — is highlighted in the background. Signals fired during the Optimal noise zone are the primary intended use case.
Features
Normalized signal derivative: EMA-smoothed price rate of change, dimensionless
ATR noise penalty: Volatility normalized by its own distribution, not a fixed threshold
SR Score histogram: Visual representation of the signal-to-noise ratio each bar
Threshold crossover signals: Bull and bear signals when SR score exceeds the gate
Noise regime classification: Low, Optimal, and High noise zones labeled
Optimal zone background: Chart shading during the resonance-optimal noise window
Candle coloring: Candles tinted by current SR score direction and magnitude
Dashboard: Current SR score, signal value, noise level, and regime state
Alerts: Configurable bull and bear SR threshold crossing alerts
Input Parameters
Signal Engine:
Signal EMA Length: Smoothing for price derivative calculation (default: 10)
Normalization Length: Rolling window for z-score normalization (default: 50)
Noise Engine:
ATR Period: ATR length for noise estimation (default: 14)
Optimal Noise Low: Lower bound of optimal noise zone (default: 0.3)
Optimal Noise High: Upper bound of optimal noise zone (default: 0.8)
Signal Gate:
SR Score Threshold: Minimum SR score to fire a signal (default: 1.5)
How to Use This Indicator
Step 1: Identify the Noise Regime
Check whether the background shading is active (Optimal zone). Signals fired during optimal noise conditions have the theoretical backing of stochastic resonance theory behind them.
Step 2: Read the SR Score
A rising histogram above the threshold line in positive territory indicates a developing bullish signal. Crossing below the negative threshold indicates a bearish signal.
Step 3: Apply as a Momentum Filter
Use SR score direction to confirm or reject signals from other tools. An SR score rising strongly above its threshold while a support level holds adds conviction to a long setup.
Indicator Limitations
Stochastic resonance as a trading construct is a theoretical analogy, not a proven quantitative edge on its own
The optimal noise zone boundaries are heuristic; the true optimal noise level varies by instrument and timeframe
Normalization requires a minimum lookback before scores stabilize — expect less meaningful output in the first normLen bars
Originality Statement
The application of stochastic resonance theory to price signal detection — computing a signal-to-noise ratio using a normalized price derivative divided by an ATR noise penalty, with an explicit optimal noise zone classification — is an original analytical framing not found in existing published Pine Script indicators. This is not a standard oscillator; it is a physics-inspired signal processing approach adapted to price data.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. The stochastic resonance framework is a conceptual model and does not guarantee profitable signals. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Momentum Saturation Zones [JOAT]Momentum Saturation Zones
Introduction
Momentum Saturation Zones is an open-source indicator that detects when momentum has reached an extreme and then begins pulling back, marks the price level where that extreme occurred as a zone, and tracks the zone's structural validity until price either respects or invalidates it. The premise is that momentum peaks and troughs at significant price levels leave structural imprints — areas where the market demonstrated conviction — that subsequently act as reference points for support or resistance.
The key differentiator from a simple overbought/oversold indicator is the composite strength scoring: a zone is only created when a configurable minimum score is reached, incorporating the momentum extreme level, the magnitude of the pullback, volume at the peak bar, and whether a divergence is present.
Core Concepts
1. Multi-Source Momentum
The momentum signal is selectable from five sources: RSI, Rate of Change (normalized), MFI, Stochastic RSI, or a composite average of all four. The composite mode averages RSI, normalized ROC, MFI, and StochRSI into a single signal, reducing single-indicator noise while retaining each component's contribution:
float momSeries = (rsiRaw + rocNorm + mfiRaw + stochD) / 4.0
2. Adaptive Pullback Detection
The saturation trigger fires when momentum has pulled back from a rolling peak by more than a configurable percentage threshold. The threshold is adaptive — scaled by the current ATR relative to its 50-bar average. In high-volatility regimes the required pullback is larger; in low-volatility regimes it is smaller. This prevents premature triggers in noisy markets and late triggers in calm ones.
3. Composite Strength Scoring (0-100)
Each potential zone is scored before creation. The score combines four components: how extreme the momentum peak was (0-40 points), how far beyond the threshold the pullback reached (0-20 points), the volume ratio at the peak bar relative to average (0-20 points), and whether momentum divergence is present (0-20 points). Only zones meeting the minimum score gate are created:
float extrem = math.max(0.0, math.min(40.0, (peakAbsMom - 50.0) * 40.0 / 50.0))
float pbScore = math.max(0.0, math.min(20.0, (actualPb - adaptPct) * 2.0 + 10.0))
float volScore = math.max(0.0, math.min(20.0, (volRatio - 1.0) * 20.0))
float divScore = bearDiv and i_useDiv ? 20.0 : 0.0
4. Zone Anchor Logic
Bear resistance zones are anchored at the candle high of the peak bar with the zone extending upward by one ATR multiple — the bottom edge sits exactly at the candle high so price must reach up to touch the zone. Bull support zones are anchored at the candle low of the trough bar with the zone extending downward — the top edge sits at the candle low so price must come back down to touch it.
5. Zone Lifecycle and Touch Counting
Each zone tracks how many times price has returned to it (touch counter displayed in the label). When price closes beyond the invalidation offset, the zone is deleted entirely — no ghost boxes remain. A proximity check before creation prevents duplicate zones from stacking at the same price level.
Features
Five momentum sources: RSI, ROC, MFI, StochRSI, or Composite average
Adaptive pullback threshold: ATR-normalized trigger scaled to current volatility regime
Composite strength scoring (0-100): Extremity, pullback depth, volume, and divergence components
ATR-anchored zones: Three-layer gradient zones (outer, mid, core) with center line
Proper candle anchoring: Resistance bottoms at candle high; support tops at candle low
Touch counting: Zone labels update each time price retests the zone
Proximity deduplication: No duplicate zones within 1.5 ATR of same-side existing zones
Clean invalidation: Zones deleted entirely on invalidation — no ghost boxes
Divergence detection: Momentum divergence contributes bonus points to strength score
Candle coloring: Candles tinted when price is inside or within 0.5 ATR of a valid zone
Dashboard: Momentum value, pullback threshold, volatility regime, active zone count, and directional strength scores
Input Parameters
Momentum Configuration:
Momentum Source: RSI, ROC, MFI, StochRSI, or Composite (default: Composite)
Momentum Length: Period for all momentum calculations (default: 14)
Peak Lookback Bars: Rolling window for peak/trough detection (default: 50)
Saturation Trigger:
Adaptive ATR Threshold toggle (default: on)
Pullback % from Peak: Required pullback to trigger (default: 10%)
RSI Overbought/Oversold: Absolute extreme levels for gate (default: 70/30)
Cooldown Bars: Minimum bars between zone creation events (default: 10)
Zone Settings:
Max Active Zones: Simultaneous zone cap (default: 4)
ATR Length: ATR period for zone sizing (default: 14)
Zone Width (x ATR): Zone height as ATR multiple (default: 1.0)
Invalidation Offset %: Margin beyond zone for invalidation trigger (default: 0.3%)
How to Use This Indicator
Step 1: Read the Zone Strength
Zones display their strength score (0-100) in the label. Higher-scoring zones represent confluences of multiple factors and are historically more likely to produce price reactions.
Step 2: Use Touch Count for Context
A zone touched twice and holding is more significant than a freshly-created zone. A zone touched three or more times that eventually breaks is exhausted — expect the break to accelerate.
Step 3: Watch for Candle Color Changes Near Zones
The candle coloring activates when price enters the zone or comes within 0.5 ATR of it. This provides a passive alert that price is approaching a structural reference.
Indicator Limitations
Momentum peaks do not always coincide with price extremes — the zone is placed at the price of the peak momentum bar, which may differ from the highest/lowest price in the lookback
In strongly trending markets, zones on the trend side may be repeatedly invalidated as trend continues
The strength score is a composite heuristic, not a backtested predictor of zone success rate
Originality Statement
The composite strength scoring system — combining momentum extremity, pullback depth, volume, and divergence into a single 0-100 gate — applied to zone creation is the original analytical contribution. The proper candle-edge anchoring (resistance bottom at candle high, support top at candle low), proximity deduplication, and clean deletion on invalidation are implementation details not present in most published support/resistance zone indicators.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Momentum saturation zones are historical reference levels and do not predict future price reactions. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Anchored VWAP Confluence Volume-Weighted Bands & MTF LevelsANCHORED VWAP CONFLUENCE — Decayed Line, Volume-Weighted Bands & MTF Levels
OVERVIEW
This is an anchored-VWAP framework that turns a single VWAP line into a complete fair-value workspace. It plots an anchored VWAP, a faster "decayed" VWAP, a rolling VWAP, proper volume-weighted standard-deviation bands, higher-timeframe VWAP levels that act as support and resistance, and a regime read — and it calibrates its own signals against the symbol's own past so you can see how often they actually followed through. Everything is derived from one idea (volume-weighted price) so the components reinforce each other rather than competing for screen space.
WHY THESE COMPONENTS ARE COMBINED (and how they work together)
A plain VWAP tells you fair value but nothing about momentum, dispersion, higher-timeframe structure, or reliability. Each component here answers a different one of those questions, and they are meant to be read together as one picture:
- ANCHORED VWAP is the reference: fair value accumulated since a chosen event (the session, a swing pivot, or a manual click). Every other element is measured relative to this line, which is why it sits at the centre of the engine rather than being one more overlay.
- DECAYED FAST VWAP is the same VWAP with an exponential half-life applied to its volume weights, so it responds faster to recent flow. On its own a fast line is just noise; paired with the anchored line it becomes a momentum signal — when the fast line crosses the slow line, near-term flow has shifted relative to fair value. This is a fast/slow pair built from a single construct, not two unrelated indicators.
- VOLUME-WEIGHTED SIGMA BANDS measure dispersion around fair value. They are computed from the running second moment (sigma = square root of E - (E )^2), volume-weighted and reset-aware, not a price-only standard deviation slapped onto the VWAP. Because the bands scale with volume-weighted dispersion, "stretched" means the same thing on any instrument and in any regime — which is what lets the cross and stretch signals be compared and calibrated across assets.
- ROLLING VWAP provides a second, independent cross of the anchored line, so a shift confirmed by both the decayed and the rolling line carries more weight than either alone.
- MULTI-TIMEFRAME VWAP LEVELS are the rolling VWAP computed at 3x, 5x and 15x the chart timeframe and drawn as horizontal levels. Higher-timeframe fair value is where larger participants transact, so these levels frequently act as support and resistance. They are coloured by role — green when a level sits below price (support), red when above (resistance) — and weighted by horizon, so the longer-timeframe level is visually the heaviest.
- REGIME + CALIBRATION are the quality layer. An efficiency-ratio and ADX read classifies the market as trending, mixed or choppy, and (optionally) filters the cross signals so they are not taken in chop. Separately, the script tracks, past-only, how often a cross was followed by a move and how often a stretch reverted toward fair value, reporting each as a percentage with a confidence interval. This is what separates a measured framework from a drawing tool: the signals are scored against the instrument's own history.
Read together: the anchored VWAP gives you fair value, the bands tell you how stretched price is, the decayed/rolling crosses tell you when flow shifts, the higher-timeframe levels tell you the structure price is moving inside, the regime tells you whether to trust a signal, and the calibration tells you how those signals have behaved here before.
HOW TO USE IT
1. Pick an anchor mode in settings — Session, Pivot High, Pivot Low, or Manual (click a bar). The anchored VWAP and its bands rebuild from that point.
2. Use the trend-coloured anchored VWAP as fair value. Price above it is in the upper half of value, below it the lower half.
3. Watch the decayed line crossing the anchored line (triangles) as a momentum-shift cue, and treat crosses that occur in a non-choppy regime as higher quality (the regime filter does this for you when enabled).
4. Treat the +/- sigma stretches (circles) as extension — price is far from fair value and historically prone to revert; the table shows how often that has happened on this symbol.
5. Use the 3x/5x/15x VWAP levels as support/resistance targets and invalidation references; alignment of price above or below all three is shown compactly in the table.
6. Read the table for direction, extension (as a z-score), regime, higher-timeframe alignment, and the past-only follow-through rates.
WHAT MAKES IT ORIGINAL
It is not a single-line VWAP or a generic band script. The combination is the point: a decayed fast/slow VWAP pair, a correct volume-weighted sigma from the running second moment, multi-timeframe VWAP support/resistance, regime-gated signals, and a per-symbol calibration of both the cross and the stretch. The calibration in particular — measuring the script's own signals against the symbol's own past rather than assuming they work — is not something a standard VWAP provides.
WORKS ON ANY ASSET (universal)
The price SOURCE is selectable in the settings, so the engine runs on any market — futures, indices, FX, crypto, or stocks. VWAP requires volume; on symbols that report none, you can borrow volume from a reference symbol so the script still functions. All thresholds are sigma- and ATR-relative, so nothing is tied to one instrument's price scale.
SETTINGS SUMMARY
- Data Source: price source (default HLC3) and an optional volume-borrow symbol for no-volume instruments.
- Anchor & Lines: anchor mode, pivot length, manual anchor time, decay half-life, rolling window, slope smoothing.
- Signals & Regime: stretch threshold (in sigma), and an option to show crosses only in a non-choppy regime.
- Higher-Timeframe VWAP: show the 3x/5x/15x bias, and draw them as support/resistance levels.
- Calibration: enable tracking, evaluation horizon, and minimum follow-through in ATR.
- Visuals: Auto/Dark/Light theme, bull/bear colours, gradient fill, line glow, table, and table position.
The script also prints its name, the symbol and the timeframe on the chart so it is always clear what is being viewed.
LIMITATIONS (please read)
- Pivot anchors confirm only after the pivot length in bars, so a new pivot anchor appears with that delay (it is always drawn at its true historical bar).
- The higher-timeframe levels are live VWAPs and firm up as their higher-timeframe bar closes.
- Calibration is descriptive of past behaviour only and is not a forecast.
- Everything here is probabilistic context, not a prediction or a guarantee.
DISCLAIMER
This is a study / indicator for chart analysis and education only. It is NOT a strategy, NOT a recommendation, and NOT financial advice. It places no orders and guarantees no outcome. Trading involves risk. Do your own research and manage your own risk.
Indicator

Fractal Dimension Oscillator [JOAT]Fractal Dimension Oscillator
Introduction
Fractal Dimension Oscillator is an open-source market geometry classifier that computes the fractal dimension of a price series using the Katz method and derives the Hurst exponent from it. The fractal dimension measures how much a price series fills space — a perfectly straight line has dimension 1.0, while a completely random walk approaches 2.0. Values between these extremes encode whether price is behaving in a trending, random, or mean-reverting fashion at the current moment.
The Hurst exponent H is derived as H = 2 - FD. Values above 0.5 indicate persistent trending behavior; values below 0.5 indicate mean-reverting behavior; H near 0.5 indicates a random walk. This gives traders an analytically grounded way to distinguish market regimes that directly determines which type of strategy applies.
Core Concepts
1. Katz Fractal Dimension Method
The Katz method computes fractal dimension from the total path length of price movements divided by the maximum distance traveled from the starting point:
// L = total path length, d = max distance from first point, n = N-1
float fd = math.log(n) / (math.log(n) + math.log(L / d / n))
This is computationally efficient compared to methods requiring fractal level decomposition and produces stable results across the configurable lookback period. The formula ensures that as price moves more linearly (large L relative to d), FD approaches 1.0. As price moves chaotically (small d despite large L), FD approaches 2.0.
2. Five-State Regime Classification
The raw FD value maps to five regime states based on configurable thresholds. The default boundaries are: Strong Trend (FD < 1.33), Trending (1.33–1.45), Random Walk (1.45–1.55), Mean-Reverting (1.55–1.67), Strong Mean-Revert (FD > 1.67). Each state carries a distinct color and strategy implication.
3. FD Percentile Tracking
The current FD value is ranked against a 100-bar rolling window to produce a percentile score. This shows not only the current regime state but how extreme that reading is relative to recent history — a 95th percentile trending reading is more significant than a borderline one.
4. Candle and Background Coloring
Candles are painted using a gradient: amber/gold for trending states, neutral for random walk, teal/cyan for mean-reverting states. Chart background is tinted faintly in the corresponding regime color. Both color channels update in real time as FD changes.
Features
Katz fractal dimension calculation: Computationally efficient geometric method
Hurst exponent display: H = 2 - FD, shown alongside raw FD in dashboard
Five-state regime classification: Strong Trend through Strong Mean-Revert
Smoothed EMA overlay: Optional EMA of raw FD for noise reduction
Regime transition markers: On-chart triangle shapes at every regime change
FD percentile (100-bar): Shows how extreme the current reading is historically
Gradient candle coloring: Amber for trend, teal for mean-revert, neutral center
Regime background tinting: Chart background reflects current regime state
Dashboard: FD, Hurst, regime, percentile, and strategy bias recommendation
Five alert conditions: Regime transitions and extreme readings
Input Parameters
Fractal Engine:
Fractal Period: Lookback bars for FD calculation (default: 30, range: 10-200)
EMA Smoothing: Smoothing period for the display line (default: 5)
Thresholds:
Trending Threshold: Hurst value above which market is trending (default: 1.5)
Mean-Revert Threshold: Hurst value above which market is strongly mean-reverting (default: 1.6)
How to Use This Indicator
Step 1: Read the Strategy Bias
The dashboard's Strategy Bias row gives a direct instruction: USE TREND SIGNALS, USE MEAN-REV SIGNALS, or AVOID / WAIT. This summarizes the regime into an actionable filter.
Step 2: Use Regime Transitions as Mode Switches
When a TREND triangle appears after a period of RANGE, consider activating trend-following setups. When a RANGE transition appears after trend, consider rotating to mean-reversion approaches.
Step 3: Check the Percentile
A 90th-percentile trending reading suggests a particularly directional market. A 10th-percentile trending reading is borderline — apply less conviction to trend signals.
Indicator Limitations
Fractal dimension is a mathematical property of the price series, not a predictive indicator — it describes what has happened, not what will happen
The Katz method is one of several FD estimation approaches; results will differ from Higuchi or other methods
Short lookback periods produce noisier FD values; longer periods produce smoother but slower-responding readings
Originality Statement
The Katz fractal dimension method is applied here in a complete regime classification engine with five states, EMA smoothing, a 100-bar percentile ranking, gradient candle coloring, and a strategy bias recommendation layer — none of which are standard in simple FD implementations. The combination of Hurst exponent derivation, percentile context, and strategy bias output in a single publication distinguishes this from generic fractal dimension scripts.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Fractal dimension values describe historical price geometry and do not predict future price movement. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
Indicator

Arc Radius Trend [JOAT]Arc Radius Trend
Introduction
Arc Radius Trend is an open-source, overlay-based trend-following system that replaces the static ATR band of conventional supertrend-style indicators with a curved, acceleration-responsive radius. The band does not scale linearly with volatility alone — it also responds to how fast price is accelerating or decelerating, expanding when momentum surges and tightening when price action becomes uniform. This gives it a shape that mirrors how institutional participants view momentum: not as a constant envelope, but as one that breathes with the market.
The problem ART solves is over-sensitivity. Standard ATR-based trailing stops flip direction too freely during acceleration events, producing false exits at exactly the moment when the trend is strongest. By expanding the radius during acceleration, ART gives trends room to breathe without permanently widening the band for all conditions.
Core Concepts
1. Velocity and Acceleration from Price
ART computes price velocity as the EMA of the bar-to-bar change in close, and acceleration as the EMA of the change in velocity. Both use the same smoothing length. Acceleration is normalized by ATR so that it is dimensionless and comparable across instruments and timeframes:
velocity = ta.ema(ta.change(close), accelLength)
accel = ta.ema(ta.change(velocity), accelLength)
accelNorm = atr > 0 ? accel / atr : 0.0
2. Curved Radius Scaling
The base radius is ATR multiplied by a configurable multiplier. The acceleration norm is then used to scale that radius with a power function, creating a nonlinear expansion curve. The exponent (Curve Strength) controls how aggressively acceleration widens the band:
radiusScale = math.pow(1.0 + math.min(math.abs(accelNorm), 2.0), curvePower)
radius = atr * baseMult * radiusScale
3. Ratcheting Band Logic
The active band ratchets in the direction of the current trend. When price is above the band (bull), the lower band is preserved at its maximum achieved value, preventing it from retreating while the trend holds. The trend flips when price closes through the opposite band:
trend := close > upperBand ? 1 : close < lowerBand ? -1 : nz(trend , 1)
activeBand = trend == 1 ? lowerBand : upperBand
4. JOAT Institutional Expansion Layer
Each JOAT indicator carries a shared Expansion Layer — an adaptive spine built from price efficiency, Shannon entropy, Parkinson range volatility, and a market impact ratio. The spine tracks the dominant flow using an KAMA-style adaptive constant, and its width is scaled by ATR ratio, range volatility, and noise. Stress and calm rails extend beyond the outer context boundary and change color based on composite stress readings. Bull and bear regime shift nodes mark confirmed directional transitions in the expansion layer state.
Features
Curved radius expansion: Band width nonlinearly expands during price acceleration events
Ratcheting trend band: Lower band preserved on bull trend, upper band preserved on bear trend — no backward drift
Outer envelope: A second ring outside the active band provides an extended volatility reference
Trend-state candle coloring: Candles tinted to reflect current trend direction
Regime flip nodes: Circle markers on the active band at confirmed bull and bear regime transitions
JOAT Expansion Layer: Adaptive spine with efficiency/entropy scoring, context box, stress rails, calm rails, and shift nodes
Stress and calm telemetry rails: Outer halos that widen with impact ratio and volatility stress
Dashboard (top right): Live display of trend state, active band level, normalized acceleration, and last flip
All signals on confirmed bars: No repainting — all state changes fire only on barstate.isconfirmed
Input Parameters
Radius Model:
Radius ATR Length: ATR period for radius computation (default: 21)
Base Radius Multiplier: Baseline band width in ATR units (default: 2.4)
Acceleration Smoothing: EMA length for velocity and acceleration (default: 8)
Curve Strength: Power applied to acceleration scale — higher values expand the band more aggressively (default: 1.35)
Outer Envelope: Multiplier for the secondary outer ring (default: 1.65)
Display:
Trend-State Candles toggle
Show Dashboard toggle
JOAT Expansion Layer:
Efficiency, Entropy, Impact lengths; Adaptive Fast/Slow periods; Context Width
Spine, Context Box, Regime Nodes, Candle Tint, Projection Bars, and Opacity toggles
Independently configurable Bull, Bear, Neutral, and Accent colors
How to Use This Indicator
Step 1: Establish trend direction
Read the active band color and the dashboard. Green indicates bull trend; red indicates bear. Use this as the primary directional filter for entries.
Step 2: Watch for confirmed flip nodes
Circle markers at confirmed trend reversals mark the bar where the band direction changed. These are not entry signals — they are context anchors. Evaluate what triggered the flip (structural break, momentum loss) before acting.
Step 3: Use the outer envelope as a volatility reference
When price extends to the outer envelope, the market is in elevated acceleration. This is not necessarily a reversal signal — it may indicate trend continuation with excess momentum.
Step 4: Read the Expansion Layer spine
The JOAT spine color and state convey institutional flow independent of the ART band. Bull spine with bull ART band is high-confidence alignment. Divergence between the two (e.g., bull ART, neutral spine) suggests weakening conditions.
Indicator Limitations
Acceleration-driven radius expansion may produce very wide bands during high-velocity events, temporarily reducing the band's usefulness as a stop reference
The ratchet mechanism preserves the band in the trend direction — during prolonged consolidation, the band will not tighten until a directional break occurs
On very low-liquidity instruments, the ATR-based radius may be structurally noisy; increasing the ATR length reduces this
Arc Radius Trend does not generate entries. It identifies directional state and provides a trailing reference level
Originality Statement
Arc Radius Trend is original in its use of normalized price acceleration as a multiplicative, power-scaled modifier to ATR radius. Existing supertrend variants use static ATR multiples or linear volatility adjustments. The combination of:
Velocity → acceleration derivation applied to a curved radius (not a flat multiplier)
Power-function scaling that produces nonlinear radius expansion only during acceleration events
Ratcheting band logic that is conditioned on the curved radius (not a fixed channel)
An institutional expansion layer carrying efficiency, entropy, Parkinson range vol, and impact scoring as a second independent context layer
...makes ART a structurally distinct contribution rather than a parameter variation of existing published work.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice or a recommendation to buy or sell any instrument. Trading involves substantial risk of loss. Past behavior of this indicator does not guarantee future results. All signals should be validated within a complete trading framework that includes risk management. The author is not responsible for trading losses resulting from the use of this indicator.
-Made with passion by jackofalltrades
Indicator
