Two Sigma Factor Composite [JOAT]TWO SIGMA FACTOR COMPOSITE
A tribute to the multi-factor approach pioneered by Two Sigma — long-only, long/short, and risk-premia funds that decompose returns into orthogonal factor exposures, normalise each factor onto the same statistical scale, and combine them into a single signed score. Two Sigma Factor Composite builds five canonical factors (Momentum, Quality, Value, Volatility, Mean-Reversion), Z-normalises each against a rolling baseline, sum-normalises the user-controllable weights, and outputs a composite score with signal labels, factor sparklines on the chart, and a rolling hit-rate backtest.
The five factors
Each factor is computed independently and Z-normalised over a configurable window (default 100 bars) with optional outlier clipping (default ±4σ):
Momentum — return / volatility over the configurable momentum window (default 50 bars). The classic "trend" factor.
Quality — inverse of recent realised volatility (default 50-bar window). Lower volatility = higher quality; an asset that has been calmer is treated as higher quality, consistent with academic factor research.
Value — deviation from a long mean (default 200-bar SMA). Negative deviation = "cheap" (positive value factor exposure); positive deviation = "expensive". The classical cross-sectional value definition, adapted to time series.
Volatility — percentile rank of recent realised volatility (default 20-bar stdev percentile-ranked over 252 bars). High vol = negative factor; low vol = positive factor.
Mean-Reversion — signed deviation from a 20-bar mean (default). Captures short-term reversion bias.
Each factor's window is independently configurable. All five outputs are Z-scores capped at ±4σ to prevent any single outlier from dominating the composite.
Sum-normalised weights
Five weight sliders (default 1.0 each) are normalised internally so any positive combination is valid. Default equal weight is the most defensible baseline; tune individual weights to bias the composite. Want a pure momentum + quality read? Set the others to 0.1 and Momentum/Quality to 2.0. The composite reshapes itself live.
Signal engine — bounded composite with three tiers
The composite is bounded by the clipping cap. The signal engine layers three thresholds:
Buy — composite crosses above the buy threshold (default +1.0σ).
Sell — composite crosses below the sell threshold (default −1.0σ).
Extreme Bull / Extreme Bear — |composite| crosses ±2.0σ. The script's strongest read.
A configurable signal cooldown (default 10 bars) prevents clustering.
Factor sparklines (the signature visual)
The script renders inline sparklines on the chart for all five factors — small line plots that visually show each factor's recent Z trajectory. Configurable base offset (vertical position below zero), row spacing, amplitude, and per-row transparency mapping. At a glance you see which factors are driving the composite and which are flat.
When all five sparklines lean the same way, the composite is high-confidence. When they disagree, the composite is a weighted compromise — the sparklines tell you the truth that a single number cannot.
Visual system
Composite line (configurable width, default 3px) with sign-coloured fill toward zero (configurable transparency).
Threshold lines at ±buyTH and ±extremeTH (configurable transparency).
Buy / Sell labels on chart on threshold crosses.
Factor sparklines — five inline Z-trajectory plots in the pane.
Optional chart-background override to follow chart.bg_color.
A locked Emerald Night palette: vivid green bull / vivid red bear / sage mid on a deep emerald background — strict 2-hue discipline with bg. No third colour invented anywhere; all variations are transparency-only.
Dashboard
Monospaced table positionable to any of eight corners. Surfaces:
Composite Z value and sign.
Per-factor Z rows (Momentum / Quality / Value / Volatility / Mean-Reversion).
Factor agreement percentage (how many factors agree with composite sign).
Last signal direction with bars-ago.
Weight configuration in use.
Backtest stats row — rolling forward-N-bar hit rate (configurable lookahead, default 10 bars). The script's own performance audit.
Alerts
Five alert conditions, each independently controllable:
BUY Cross (composite crosses above buy threshold)
SELL Cross
Extreme Bull (composite > +2.0σ)
Extreme Bear (composite < −2.0σ)
Low Factor Agreement (% of factors agreeing falls below the configurable threshold, default 40%) — the script's "no edge" warning.
How to read it
Three reads, in order of conviction:
Extreme score with high factor agreement (e.g. composite > +2.0σ AND agreement > 80%) — the highest-conviction read the script produces. Four or five factors are pointing decisively one way, and the composite is at a statistical extreme.
Buy / Sell with sparkline confirmation — visual confirmation that the directional read is being driven by multiple factors, not just one. If the composite is bullish but only the Momentum sparkline is leaning, the read is fragile; if Momentum + Quality + Value + Mean-Reversion all lean, the read is robust.
Low Agreement alert — stand-aside signal. The factors disagree internally; the composite is a wash. Wait for re-alignment.
Suggested settings
Defaults (momentum 50 / quality vol 50 / value 200 / vol 20/252 / MR 20, Z window 100, ±4σ clip, ±1.0 buy/sell, ±2.0 extreme, 10-bar cooldown) are tuned for daily charts on broad indices — the timeframes where factor approaches are statistically meaningful. For lower timeframes drop all windows proportionally. For weekly+ keep defaults; factor reads on weekly are the canonical institutional horizons.
Originality / what's reused
The factor-investing framework is published academic finance — Fama-French 1992, Carhart 1997, AQR 2013, and many others. The five factors used here (Momentum, Quality, Value, Volatility, Mean-Reversion) are the canonical institutional factor set. The implementation here — the five-factor pipeline with each factor's window independently configurable, the rolling Z-normalisation with outlier clipping, the sum-normalised five-weight composition, the bounded-composite signal engine with three-tier thresholds, the inline factor sparklines render in the same pane, the rolling forward-bar hit-rate backtest, and the strict 2-hue alpha-only palette — is JOAT-original. No third-party code reused. The script is a tribute to Two Sigma-style factor-composite portfolio construction, not a direct replication of any proprietary Two Sigma model.
Limitations
The five factors are computed from chart data only — they are time-series proxies of the cross-sectional factors used in true multi-asset portfolios. The Z-normalisation needs the window populated; early bars give a warm-up read. The forward-N-bar hit-rate backtest is descriptive of recent signal behaviour under the current settings; it is not a predictive metric. Factor exposures historically underperform for extended periods — the dashboard's agreement row and the low-agreement alert exist specifically to warn you when the model is breaking down.
—
-made with passion by jackofalltrades
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

Multi-Indicator Confluence Strategy Automator [MarkitTick]💡 A comprehensive, multi-dimensional technical analysis suite engineered to evaluate market conditions through a rigorous synthesis of trend, momentum, volatility, and cross-asset correlation metrics. Designed for traders who require a systematic approach to market entry and risk management, this script aggregates signals from multiple proven indicators and applies advanced statistical filters to minimize false positives. By unifying foundational technical analysis with advanced mathematical concepts like the Hurst exponent and momentum inflation, this tool provides a highly objective, data-driven environment for evaluating market structure and defining structured trade parameters.
✨ Originality and Utility
Standard trading methodologies often rely on isolated indicators, which can lead to high failure rates in dynamic market environments. The originality of this script lies in its robust confluence engine, which demands simultaneous alignment across multiple independent market dimensions before generating a signal.
Instead of merely stacking moving averages, this suite integrates a strict Boolean gating system that evaluates:
A primary directional baseline derived from a Hull Moving Average combined with an Average True Range volatility buffer.
A directional movement and momentum confirmation matrix utilizing the Average Directional Index and Commodity Channel Index.
Dynamic volume filtering to ensure market participation supports the price action.
Advanced statistical gating mechanisms, including confluence decay, regime detection, and cross-asset correlation analysis.
This utility is exceptionally valuable for systematic traders, as it translates complex, multidimensional market data into a highly legible, unified dashboard while automatically projecting risk-adjusted stop-loss and take-profit levels dynamically based on current market volatility.
🔬 Methodology and Concepts
● The Confluence Engine
The core of this strategy revolves around a scoring system that evaluates bullish or bearish alignment. A valid signal requires a minimum confluence score, calculated by assessing the following core components:
• Baseline Trend
The script utilizes a Hull Moving Average to determine the primary market bias. To eliminate noise, a volatility buffer equivalent to a fraction of the Average True Range is applied, ensuring that only definitive breakouts beyond the baseline are considered valid directional shifts.
• Directional Movement (ADX/DMI)
The first confirmation layer relies on the Average Directional Index alongside the Directional Movement Indicators. A trend is only considered active if the ADX exceeds a user-defined threshold, and the relationship between the positive and negative directional indicators defines the bias.
• Momentum Oscillators (CCI)
The second confirmation layer employs the Commodity Channel Index to measure the current price level relative to an average price level over a given period. Bullish or bearish confirmation requires the CCI to pierce specific upper or lower thresholds.
• Volume Validation
A volume filter ensures that signals are backed by significant market interest. The current period's volume must exceed a rolling exponential moving average of historical volume, multiplied by a strict sensitivity factor.
• Advanced Gating Filters
Confluence Decay: A time-based penalty system that degrades the value of a signal if the confluence state persists for too long without triggering an entry, preventing late entries into exhausted trends.
Hurst Regime Detector: Classifies the market as trending or mean-reverting, gating signals that conflict with the overarching statistical regime.
Momentum Inflation Ratio: Normalizes current price velocity against historical volatility to detect and filter out exhaustion spikes.
Cross-Asset Lead-Lag: Computes the Pearson correlation against a secondary asset to confirm macroeconomic or sector-wide alignment before entry.
🎨 Visual Guide
The script employs a highly intuitive visual hierarchy designed to keep the chart clean while providing maximum data density.
● Chart Elements
• Heatmap Candles
The standard price candles are color-coded based on the baseline trend state. Bullish bars are colored a vibrant teal, bearish bars are marked in a distinct red, and neutral states default to a muted slate blue. This visual heuristic allows traders to instantly recognize the dominant market regime without processing raw numerical data.
• Signal Markers
When all confluence conditions and advanced gates are met, the script plots distinct entry markers: small upward-pointing triangles below the bar for long signals, and downward-pointing triangles above the bar for short signals.
• Risk Management Levels
Upon a confirmed signal, the script dynamically draws horizontal lines representing the trade parameters:
Entry Line: A dashed, neutral-colored line projecting the exact trigger price.
Stop Loss (SL): A dashed, red line projected against the trend based on a multiple of the Average True Range.
Take Profit (TP1, TP2, TP3): Three dotted, green lines representing scaled exit targets, dynamically calculated using expanding volatility multiples.
Each line is accompanied by a precise price label anchored to the right side of the chart.
● The Information Dashboard
A comprehensive table is anchored to the top right of the screen. It displays the real-time status of the Baseline, Confirm 1, Confirm 2, Volume, Exit status, and the aggregate Score. Furthermore, it outputs the exact values for ADX, ATR, Decay Age, Hurst Exponent, Momentum Inflation, Baseline Distance-Integral, and Lead-Lag Correlation, using a color-coded text system (Green for bullish/favorable, Red for bearish/unfavorable, Yellow for warnings).
📌 Note : the best way to resolve visual overlap is to navigate to the Object Tree and drag the indicator above the main chart layer, or simply hide the native candles in your chart settings.
📖 How to Use
● Interpreting Signals
Traders should monitor the chart for the appearance of the signal triangles. Because the script utilizes a strict minimum gap requirement between signals, traders will not be overwhelmed by repetitive alerts during a sustained trend.
● Executing Trades
Once a signal appears, the script automatically projects the optimal Entry, Stop Loss, and three Take Profit levels on the chart. Traders can use these exact price labels to populate their exchange order tickets or algorithmic routing software.
● Managing Positions
The built-in Exit Indicator, driven by a faster CCI calculation, will trigger an alert when counter-trend momentum builds, providing an objective reason to manually close or trail stops on an active position before the hard stop loss is hit.
● Dashboard Monitoring
Use the dashboard table to gauge the overall health of the trend. If the Confluence Score drops or the Confluence Decay percentage reaches high levels, it is highly advisable to tighten stops on existing positions, as the mathematical probability of trend continuation has diminished.
⚙️ Inputs and Settings
● Core Indicator Tuning
Baseline HMA Length: Adjusts the sensitivity of the primary trend filter.
ADX/DMI Length & Threshold: Defines how strong a trend must be to pass the first confirmation gate.
CCI Length & Threshold: Sets the momentum required for the second confirmation gate.
Volume RMA Length & Multiplier: Configures the strictness of the volume participation filter.
● Risk Parameters
ATR Length: The lookback period for volatility measurement.
SL ATR Mult: The multiplier applied to the ATR to define the stop-loss distance.
TP1, TP2, TP3 ATR Mult: The multipliers defining the three scale-out profit targets.
● Advanced Filter Settings
Confluence Decay: Toggles the time penalty system and defines the maximum bars before full decay.
Hurst Regime Detector: Toggles regime filtering and sets the threshold for trending vs. mean-reverting environments.
Momentum Inflation Ratio: Toggles velocity normalization and sets the threshold ratio for exhaustion alerts.
Cross-Asset Lead-Lag: Defines the correlation ticker, correlation lookback window, and minimum Pearson threshold.
🔍 Deconstruction of the Underlying Scientific and Academic Framework
● Rescaled Range Analysis and the Hurst Exponent
This script integrates a specialized implementation of the Hurst Exponent, a statistical measure originally developed in hydrology, to classify financial time series data. It calculates the cumulative deviation of the asset's price from its Simple Moving Average over a defined rolling window. By identifying the maximum and minimum cumulative deviations, the script establishes the range, which is then normalized against the standard deviation of the price series to compute the rescaled range ratio. The final Hurst value is derived logarithmically. A value significantly greater than 0.5 mathematically confirms a persistent, trending regime, while a value below 0.5 indicates an anti-persistent, mean-reverting environment.
● Momentum Inflation via Volatility Normalization
The script tackles the academic problem of momentum illusion, where sheer point movement is mistaken for structural momentum, by normalizing absolute price speed against the Average True Range. It then compares this normalized current velocity against a rolling historical average of normalized velocity. If the resulting ratio exceeds the user-defined threshold, the script identifies the movement as mathematically over-extended, gating further entries to prevent buying the top or selling the bottom of a volatility spike.
● Cross-Asset Correlation Dynamics
To account for macroeconomic interconnectedness, the script employs a rolling Pearson correlation coefficient between the primary asset and a defined leading indicator. By analyzing the covariance of the two assets relative to the product of their standard deviations over a specific window, it mathematically verifies if the broader sector or macroeconomic environment supports the localized signal.
● Distance-Integral Calculations
The Baseline Distance-Integral utilizes a rolling mathematical sum of the spatial delta between the closing price and the moving average. This integral provides a quantifiable area-under-the-curve measurement, offering deeper insight into the cumulative kinetic energy of a trend rather than relying solely on point-in-time cross signals.
⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion. Indicator

Indicator

Mean-Deviation Divergence OscillatorMean-Deviation Divergence Oscillator
A bounded oscillator that measures how far the typical price has stretched from its own recent mean, scaled by how much it normally deviates — so a reading tells you "how unusual is this move," not just "how big." That normalization makes its swings comparable across calm and volatile regimes and well suited to divergence. It adds higher-timeframe confirmation and a plain-language forward-calibration layer, so you can see at a glance whether a divergence is corroborated and whether it has actually paid on this symbol.
Why this construction (not a mashup for show). Each part fixes a flaw in naive divergence. Raw distance-from-mean isn't comparable across regimes — dividing by the average absolute deviation (with the conventional 0.015 scaling, chosen so that roughly 70–80% of readings fall within ±100) makes the oscillator regime-comparable, which is the whole reason it's a good divergence base. Higher-timeframe confirmation removes single-timeframe noise. Forward calibration removes blind faith: instead of assuming a divergence "should" reverse price, it measures whether it actually has, with realistic profit/stop outcomes. The normalized oscillator, the divergence engine, the MTF check and the calibration form one coherent tool.
How it works. Oscillator = (typical price − its moving average) ÷ (0.015 × mean absolute deviation), soft-bounded to a clean ±100 pane that auto-fits its own recent magnitude. Divergence is detected from confirmed price pivots versus the oscillator (regular and optional hidden). With MTF confirmation on, a divergence counts only if a same-direction divergence is also present on the chosen higher timeframe. Each signal is then labelled by a triple barrier — a profit target and equal stop in ATR units plus a time limit — split into in-sample and recent out-of-sample, with a confidence interval and a multiple-testing check.
How to use. Read the Verdict row (Bull/Bear divergence confirmed, "unconfirmed," or Wait) and the Conviction row, which reads "High" only when that divergence type shows a positive edge that survives the test on this symbol. A divergence is a reversal warning, not a trend signal — pair it with your own entry trigger and risk plan.
What's original. Higher-timeframe divergence confirmation on a mean-deviation normalized oscillator, the forward triple-barrier calibration with an out-of-sample split, and a conviction read that openly admits when there's no proven edge.
Inputs. Price/High/Low sources (change them for any market), reading mode (Simple/Pro), engine length and deviation scale, divergence and HTF-confirm controls, full calibration settings, and an auto-adapting dashboard legible on dark or light charts. Defaults are tuned for NSE:NIFTY1! intraday.
Honesty & limitations. Edge figures are computed on this chart's own history with overlapping windows and no costs — context, not a guaranteed backtest; past behaviour doesn't predict the future. Divergence is inherently early and can persist before price turns.
Disclaimer: for research and education only. Not financial advice. Trading carries risk of loss; manage your own positions. Indicator

Intermarket Divergence with Reliability ScoringIntermarket Divergence with Reliability Scoring
Related markets tend to move together. When your chart pushes to a new high but a market that usually tracks it does not confirm, that non-confirmation can precede a turn. This script measures divergence between your chart and a chosen leader market — but only when the leader is actually correlated to price, because a decoupled market's "divergence" is meaningless — and then scores, in real time, whether those divergences have been worth trading on your symbol.
WHAT IT PLOTS
A normalised oscillator built from a chosen leader market, its stretch bands, divergence markers and connecting pivot lines, plus a plain-language verdict panel. By default the chart stays minimal — the oscillator and the verdict panel — with optional key-info and per-class tables you can switch on in settings.
WHY THESE COMPONENTS ARE COMBINED, AND HOW THEY WORK TOGETHER
Three classical pieces are fused into one pipeline, not stacked as independent signals:
A z-scored leader series — optionally inverted, optionally lead-lag shifted — the cross-market line your price is compared against.
A live correlation gate — the leader only votes when its trailing correlation to price clears a threshold, so non-confirmations from a decoupled market are ignored.
A binomial-proportion confidence test — asks, for each divergence class, whether the expected move followed more often than a same-zone baseline would deliver.
Part 1 builds the comparison, part 2 keeps only the meaningful divergences, part 3 decides whether the survivors have actually paid on this instrument, by direction. The parts are interdependent — remove any one and the script can no longer answer its core question: is this intermarket divergence worth trading here, and which way?
HOW TO READ IT
The verdict panel translates the statistics into four states:
GREEN, edge confirmed: these divergences have beaten a same-spot baseline here. Worth acting on.
RED, no edge here: they have lost to a coin-flip. Skip them, pick a leader that genuinely leads, or change the timeframe.
AMBER, unproven: edge not statistically established yet; treat as low-confidence.
GREY, learning: still collecting completed samples.
It also shows:
Best signal — names a direction only once that direction is individually proven (its edge lower-bound clears zero). Otherwise it says "none confirmed", so you are never lured by a single noisy number.
Leader link — how tightly the leader currently tracks price (strong, moderate or weak). A weak link means the leader has decoupled and its divergences are unreliable.
Reward : risk — the average best move versus the average worst move after a signal, in ATR. Below 1:1 means signals have hurt more than they helped.
Market regime — reverting markets suit divergence; strong trends punish it.
A divergence is simply price making a higher high or lower low while the leader line does the opposite, counted only when the leader is correlated enough to matter.
CHOOSING A LEADER
Pick a market that genuinely leads — a currency, a global risk proxy, a sector index — not one that merely co-moves with your chart. The lead-lag offset lets you test whether it leads. A co-moving index will usually show no edge, which the panel will tell you plainly.
WHAT IS ORIGINAL
Standard intermarket tools just overlay two symbols. This one fuses a live correlation gate into the divergence filter, then keeps a self-updating, confidence-scored, per-class track record against a same-zone baseline — so you see not just that a non-confirmation printed, but whether and how it has paid, and you only trust a direction once it is statistically proven.
UNIVERSAL ACROSS MARKETS
Reads the chart's own price (the source is configurable in settings) plus one leader symbol. Defaults target NIFTY futures with Bank Nifty as the leader. Change the leader to USD/INR (inverse), a sector or overseas index, or any related market for other instruments, in any market.
OUTPUTS FOR OTHER SCRIPTS
Generic EXP_ values — oscillator, signal, probability, edge, edge lower-bound, sample count, regime, leader value and leader correlation — are published to the Data Window so other indicators can read them via input.source().
CONCEPT CREDITS
Average true range — J. W. Wilder. Binomial score confidence interval — E. B. Wilson. Trend-efficiency regime measure — P. Kaufman. Intermarket analysis and divergence — classical technical analysis.
DISCLAIMER
For research and education only. This is not financial advice, not a recommendation to buy or sell, and not a guarantee of future results. All performance shown is in-sample and past-only. Markets carry risk — do your own research and manage your own risk. Indicator

Multi-Timeframe Momentum Divergence with Reliability ScoringMulti-Timeframe Momentum Divergence with Reliability Scoring
A momentum divergence on your chart timeframe is far more reliable when the bigger picture leans the same way. This script measures momentum divergence on your chart, only counts it when enough higher timeframes point in the signal's direction, then scores — in real time — whether those gated divergences have actually been worth trading on your symbol, and which way.
What it plots
A normalised momentum oscillator with stretch bands and divergence markers, connecting pivot-to-pivot lines, and a plain-language panel that turns the statistics into a verdict. By default the chart stays minimal — the oscillator plus the verdict panel — with optional key-info and per-class tables you can switch on in settings.
Why these components are combined, and how they work together
Three classical pieces are fused into one pipeline — not stacked as independent signals:
A z-scored momentum oscillator (chart timeframe) — locates where price and momentum disagree, i.e. the divergence.
A higher-timeframe agreement gate — checks momentum direction on three configurable higher timeframes and requires a minimum number to align before a divergence is allowed to fire. This filters out the counter-trend divergences that fail inside a strong higher-timeframe move.
A binomial-proportion confidence test — asks, for each divergence class, whether the expected move followed more often than a same-zone baseline would deliver.
Part 1 finds the divergence, part 2 keeps only those backed by the higher-timeframe trend, and part 3 decides whether the survivors have actually paid on this instrument, by direction. The parts are interdependent — remove any one and the script can no longer answer its core question: "is this momentum divergence worth trading here, and which way?"
How to read it
The verdict panel translates the statistics into four states:
GREEN — edge confirmed: these gated divergences have beaten a same-spot baseline here. Worth acting on.
RED — no edge here: they've lost to a coin-flip. Skip them, require more higher-timeframe agreement, or change the timeframe set.
AMBER — unproven: edge not statistically established yet; treat as low-confidence.
GREY — learning: still collecting completed samples.
It also shows "Best signal" (the direction carrying the strongest measured edge), "Higher TFs" (how many of your three higher timeframes currently agree), "Reward : risk" (the average best vs worst move after a signal, in ATR — below 1:1 means signals hurt more than they help), and the market regime. The optional key-info and per-class tables (off by default) show the per-timeframe breakdown and the full per-direction track record.
A divergence is simply price making a higher high / lower low while the momentum line does the opposite — counted only when enough higher timeframes lean that way.
What's original
Standard multi-timeframe tools just colour-code higher-timeframe trend, and standard divergence tools just mark the divergence. This one fuses higher-timeframe agreement into the divergence filter, then keeps a self-updating, confidence-scored, per-class track record against a same-zone baseline — so you see not just that a divergence printed, but whether and how it has paid once the higher timeframes were on board, and which direction is carrying it.
Universal across markets
Reads only the chart's own price (the source is configurable in settings) plus the same symbol on three higher timeframes, so it runs on any symbol, any timeframe, in any market with no external data. Defaults target NIFTY futures; change the source, lengths or timeframes for other instruments.
Outputs for other scripts
Generic EXP_* values — oscillator, signal, probability, edge, edge lower-bound, sample count, regime and higher-timeframe confluence — are published to the Data Window so other indicators can read them via input.source().
Concept credits
Relative-strength momentum and average true range — J. W. Wilder. Binomial score confidence interval — E. B. Wilson. Trend-efficiency regime measure — P. Kaufman. Multi-timeframe confluence and divergence — classical technical analysis.
Disclaimer
For research and education only. This is not financial advice, not a recommendation to buy or sell, and not a guarantee of future results. All performance shown is in-sample and past-only. Markets carry risk — do your own research and manage your own risk. Indicator

Regression-Slope Divergence with Reliability ScoringRegression-Slope Divergence with Reliability Scoring
Most divergence tools tell you a divergence exists. This one tells you whether that divergence has historically mattered on the symbol and timeframe you're actually looking at — and states the conclusion in plain words on the chart.
What it plots
A normalised momentum oscillator with stretch bands and divergence markers, plus a verdict panel that scores those divergences in real time. By default the chart stays minimal — just the oscillator and the verdict panel — with an optional key-info table and a per-direction track-record grid you can switch on in settings.
Why these components are combined, and how they work together
Three classical pieces are fused into a single pipeline — not stacked as independent signals:
Linear-regression slope of price — the direction price is genuinely trending.
RSI-based momentum, z-score normalised — the direction momentum is trending.
A binomial-proportion confidence test — whether the disagreement between the two has preceded a favourable move often enough to beat a same-zone baseline.
Components 1 and 2 only become a signal where they disagree — that disagreement is the divergence. Component 3 is the layer that makes this original: it records every past divergence on the current instrument, measures how often the expected move actually followed within a fixed look-ahead, compares that to what a random entry from the same stretched zone would have achieved, and wraps a confidence interval around the result. The parts are interdependent — remove any one and the script can no longer answer its core question, "is this divergence worth trading here?"
How to read it
The verdict panel translates the statistics into four states:
GREEN — edge confirmed: these divergences have beaten a same-spot baseline here. Worth acting on.
RED — no edge here: they've lost to a coin-flip from the same spot. Skip them, or try a higher timeframe (counter-trend divergence often fails on fast timeframes).
AMBER — unproven: edge not statistically established yet; treat as low-confidence.
GREY — learning: still collecting completed samples.
It also shows whether a signal is live right now and a reward-vs-risk figure — the average best move vs the average worst move after a signal, in ATR. Below 1:1 means signals have hurt more than they've helped. The optional grid breaks the record down into Bullish / Bearish with hit-rate, baseline, edge and reward:risk.
A divergence itself is simply price making a higher high / lower low while the momentum line does the opposite.
What's original
Off-the-shelf divergence indicators fire and leave you to guess. This one keeps a self-updating, confidence-scored track record against a same-zone baseline and tells you, in words, whether the current setup has earned your attention on this specific market.
Universal across markets
It reads only the chart's own price (the source is configurable in settings), so it runs on any symbol, any timeframe, in any market with no external data. Defaults are tuned for NIFTY futures; change the source and lengths for other instruments.
Outputs for other scripts
Generic EXP_* values — oscillator, signal, probability, edge, edge lower-bound, sample count, regime, trend strength and verdict tier — are published to the Data Window so other indicators can read them via input.source().
Concept credits
Relative-strength momentum and average true range — J. W. Wilder. Binomial score confidence interval — E. B. Wilson. Trend-efficiency regime measure — P. Kaufman. Least-squares regression — classical statistics.
Disclaimer
For research and education only. This is not financial advice, not a recommendation to buy or sell, and not a guarantee of future results. All performance shown is in-sample and past-only. Markets carry risk — do your own research and manage your own risk. Indicator

Brownian Motion Residual [JOAT]BROWNIAN MOTION RESIDUAL
A regime classifier rooted in the sqrt(T) scaling law of geometric Brownian motion. Under a true random walk, the standard deviation of T-bar returns scales as σ₁ · √T — that is the central fact of Brownian motion in continuous time. Markets violate this scaling in revealing ways: when they trend, dispersion at long horizons grows faster than √T; when they mean-revert, it grows slower. Brownian Motion Residual measures that violation across three horizons simultaneously, aggregates it, and surfaces a single Z-like residual that classifies the market into Strong MR / MR / Random / Trend / Strong Trend.
The sqrt(T) scaling law, restated
For a Brownian process with per-bar volatility σ₁:
σ(T-bar return) = σ₁ · √T
For a real market the observed σ at horizon T can be measured directly. The residual is the deviation of the observed value from the Brownian-implied value:
residual(T) = σ_observed(T) − σ₁ · √T
When the residual is positive , dispersion at T is greater than Brownian predicts — the market is trending (price travels further than a random walk in T bars). When it is negative , dispersion is less than Brownian predicts — the market is mean-reverting (price ends up closer to home than a random walk would).
Optional normalisation by σ₁ · √T turns the residual into a unit-less percentage of expected dispersion, so the same threshold values are meaningful across instruments and timeframes.
Three horizons, weighted blend
A single horizon is noisy. Brownian Motion Residual reads three horizons simultaneously (default 5 / 20 / 100 bars), each independently toggleable and weighted (default 1.0 each). The horizons are aggregated into a single residual line — the script's headline metric. Toggling off the short horizon makes the read smoother and slower; toggling off the long horizon makes it more reactive. Configurable.
A configurable EMA on top of the aggregated residual suppresses single-bar noise without lagging the regime view.
Two-tier classification
The aggregated residual is mapped to one of five regimes by two symmetric thresholds (default ±1 mild, ±2 strong):
Strong Trend — residual > +2. Aggressive momentum regime.
Trend — residual between +1 and +2. Trending.
Random — residual between −1 and +1. Brownian-like.
MR — residual between −2 and −1. Mean-reverting.
Strong MR — residual < −2. Aggressive reversion regime.
Visual system
Slope-coloured residual line with configurable width and optional area fill under it (transparency configurable).
Zero line and ±1 / ±2 threshold lines (toggleable).
Background tint by regime (subtle 88 transparency default) — teal trend, lavender MR, mint random.
Per-horizon plots (toggleable, off by default) — each horizon's residual as a faint dotted overlay; useful for seeing which horizon is driving the read.
Regime-change dots above the line at every confirmed flip.
A locked Aurora palette (teal trend / lavender MR / mint random on a deep-night ground) gives the pane a distinctive structural identity.
Dashboard
Monospaced table, positionable to any of nine corners, with vertical row-fade. Surfaces:
Aggregated residual (raw and smoothed).
Regime classification with glyph.
σ₁ value (the Brownian anchor).
Per-horizon residuals (h1 / h2 / h3) when enabled.
Bars in current regime.
Distance to nearest threshold.
Optional fancy Unicode header for the institutional aesthetic.
Alerts
Three alert conditions, each independently controllable:
Regime Change (any classification flip)
Strong threshold cross (±2)
Mild threshold cross (±1) — off by default
How to read it
Three reads, in order of conviction:
Strong Trend / Strong MR entry — the highest-conviction read. The market has decisively departed from Brownian scaling in one direction. Pair with a momentum tool in Trend regimes, a reversion tool in MR regimes.
Residual crossing zero — the regime fault line. Even before crossing a threshold, a sustained sign flip means the underlying distribution has rotated; the next threshold cross will confirm the new regime.
Per-horizon disagreement (when enabled) — when the short horizon is in trend regime but the long horizon is in MR regime, the market is in a nested state: short-term momentum inside a longer reversion. This is the textbook setup for fade-the-extreme intraday plays inside a wider range.
Suggested settings
Defaults (σ₁ window 100, observed σ window 60, horizons 5/20/100, equal weights, log returns ON, normalisation ON) are tuned for 15m–4H on liquid markets. For lower timeframes drop horizon 3 to 50. For HTF (daily+) raise horizon 3 to 200 and σ₁ window to 200. Log returns are theoretically correct and the recommended default — the script's regime classification depends on the scaling law, which assumes log returns; switch off only for research.
Originality
The √T Brownian scaling law is textbook continuous-time finance — the central piece of Bachelier's 1900 thesis and the foundation of every diffusion model in pricing. The implementation here — the per-horizon σ measurement pipeline, the σ₁-anchored Brownian baseline with optional normalisation, the three-horizon weighted aggregation, the EMA-smoothed residual classifier with two-tier thresholds, the per-horizon overlay layer, the regime-tinted background, and the dashboard — is JOAT-original. No third-party code reused. The use of residual against Brownian as a regime classifier is the original quantitative contribution.
Limitations
The √T law is exact only for Brownian motion — real markets have fat tails, autocorrelation, and discrete bars, so the measured "residual" is always non-zero even in a regime that looks random. The thresholds (±1 / ±2) are calibrated to be the regime boundaries empirically; tighten or loosen if your instrument has unusual variance behaviour. Per-horizon σ values need their respective windows populated to be meaningful — early bars give a warm-up read.
—
-made with passion by jackofalltrades
Indicator

Value-Distribution OscillatorValue-Distribution Oscillator
Overview
A volume-by-price value map expressed as a bounded pane oscillator. It rolls a decaying volume distribution of recent trade, finds the Point of Control (most-traded price) and the Value Area, then plots where price sits inside that value structure on a fixed −50 / +50 scale: 0 = at the POC (fair value), ±25 = the value-area edges (VAH / VAL), ±50 = stretched beyond the developed range. It is a study of acceptance and location — not a directional signal.
Why these parts are ONE tool (mashup rationale)
A volume profile is an overlay that shows where value is; it can't give you, as a single number, how far price has travelled from value or whether that travel reverts. This chains: a decaying distribution builds the map → a position transform turns price into one bounded location reading → a fade flag fires only when price is stretched into the tails and turning back → a calibration harness tests whether stretched-and-reverting readings actually return toward the POC on your instrument. Remove a part and the chain breaks: a profile is just a picture, the transform alone is just a number, the fade alone is an untested claim.
How it works
Each confirmed bar's volume is distributed across a price grid (body weighted heavier than wicks) and the whole grid decays geometrically, so the map tracks recent trade and re-anchors when price leaves its range. The POC is the heaviest level; the Value Area grows outward from the POC to the chosen volume share; the transform maps price piecewise-linearly (POC→0, VAH/VAL→±25, extremes→±50). The harness logs each stretched fade and checks a ≥ k×ATR move back toward the POC a fixed horizon later.
How to use
Read location: near 0 = fair value; the ±25 band = the edge of value; beyond ±40 = stretched into the tails, where reversion setups have context and breakouts that hold signal value migration. Then read the Edge row — fades in the tails only earn their keep if they beat the base rate. Context, never a standalone trigger.
Originality
The POC / Value-Area concept is public (credited below); the original work is the assembly — a decaying-grid distribution, the price-into-value position transform that turns a profile into a series, and the forward base-rate calibration. It's the pane-oscillator counterpart to a volume profile, not a re-skin of one.
Concept credit
Market / Volume Profile, Point of Control and Value-Area framing — J. Peter Steidlmayer and the CBOT Market Profile tradition; value-area / acceptance reading developed further by practitioners such as James Dalton. Implementation, transform and harness are this script's own.
Honesty / limitations
The distribution uses bar ranges, not exchange price-by-price prints or tick data — a probabilistic approximation. The grid decays, so it's a recent-trade view, not a session-anchored profile. Edge figures are in-sample, close-to-close, overlapping windows, no costs — descriptive context, not a backtest. Nothing here predicts direction.
Disclaimer
Research / educational only. NOT financial advice; no guarantee of profitability. Indicators describe past behaviour. Trading carries risk of loss. Test out-of-sample. The author accepts no liability. Indicator

Median Point of ControlMedian Point of Control calculates and displays the median OHLC4 price for customizable time periods, along with percentage-based upper and lower bands. It provides a statistical reference framework for identifying potential support, resistance, and mean-reversion zones.
What It Does
This indicator computes the median of all OHLC4 values within a defined period and plots three horizontal levels:
Median Line — The statistical middle price of the period
Upper Band — Median + user-defined percentage
Lower Band — Median - user-defined percentage
The current period's levels update dynamically as new bars form. Completed periods are preserved as historical reference lines.
Why Median Instead of Average?
The median is the "middle" value when all prices are sorted. Unlike the mean (average), the median is resistant to outliers — a single extreme wick or price spike won't distort the level. This makes it more representative of typical price action during the period.
Two Calculation Modes
Timeframe Mode Define periods using standard timeframes: 4H, Daily, Weekly, Monthly, etc. The indicator automatically detects when each period begins and ends.
Bars Mode Define periods by a fixed number of bars (e.g., every 50 bars, every 100 bars). Useful for non-time-based analysis or custom period lengths that don't align with standard timeframes.
Settings
Calculation Mode: Choose between Timeframe or Bars
Timeframe: Period length when using Timeframe mode
Bars: Number of bars per period when using Bars mode
Band Distance (%): Percentage offset for upper/lower bands from median
Line Colors: Customize colors for median, upper, and lower bands
Line Width: Thickness of the plotted lines
Historical Transparency: Opacity of completed period lines
Max Historical Periods: Number of past periods to display
How To Use
Identify the range: The upper and lower bands create a price envelope based on the period's median. When price approaches these levels, watch for reactions.
Mean reversion reference: The median line represents the "fair value" of the period. Price tends to oscillate around this level.
Breakout detection: If price breaks and holds beyond a band, it may signal trend continuation rather than reversion.
Multi-timeframe analysis: Use Daily median on intraday charts to see where price stands relative to the day's statistical center.
Important Notes
This indicator does not predict price direction. It provides statistical reference levels only.
The current period's median updates with each new bar — this is expected behavior, not repainting.
Historical period lines are fixed once their period closes.
For best results, use on liquid instruments (stocks, forex majors, major crypto pairs).
Indicator

Trend Persistence OscillatorTrend Persistence Oscillator
OVERVIEW
Most oscillators answer "is price stretched?" This one answers the prior question almost everyone skips: "is the market even in a state where a stretch should snap back?" It plots a rolling persistence exponent of price around the 0.5 line. ~0.5 is a random walk; above 0.5 the series is persistent (moves tend to continue → trending); below 0.5 it is anti-persistent (moves tend to reverse → mean-reverting). It is an analytical study of market state — not a directional signal and not a strategy.
WHY THESE COMPONENTS BELONG IN ONE SCRIPT (mashup rationale)
Three parts that chain into one testable idea — is a reversion likely here, and has that held before?
The persistence exponent classifies the regime (trending / random / reverting). Research finds price reverts to its mean significantly faster when the local exponent is anti-persistent, so a low reading is a green light for fades and a high reading is a warning that a reversion will likely fail.
A stretch z-score measures how far price sits from its rolling mean — the "is it extended?" half a regime read alone can't supply.
A fade flag arms only when both agree (anti-persistent regime and stretched), turning the research claim into a concrete, located event.
The calibration harness proves or disproves the claim on your instrument: it logs each fade and checks, a fixed horizon later, whether price actually reverted — reporting Edge versus the unconditional base rate.
A regime read without a stretch is just a state label; a stretch without the regime is a naive fade; either without calibration is an untested assertion. Chained, they answer one question end to end. Remove a part and the chain breaks.
HOW IT WORKS
The exponent is estimated by the structure-function (generalized-Hurst) method: for several lags, the windowed mean of |log-price(t) − log-price(t−lag)| scales like lag^H, so the exponent is the slope of log(mean|Δ|) against log(lag). The first-moment (absolute) form is used deliberately because it is the variant most robust to the heavy tails of financial returns — Monte-Carlo studies find the generalized-Hurst approach gives the lowest bias and variance of the common estimators on heavy-tailed data.
A short optional smoothing tames the noise inherent to short-window local estimates (very short windows are known to produce volatile readings and false alarms).
A stretch z-score and the regime thresholds combine into the fade flag.
The harness logs each fade and, a fixed horizon later, checks a ≥ k × ATR reversion.
HOW TO USE
Read the line for regime: in the green (reverting) zone, mean-reversion / fade setups have the wind behind them; in the gold (trending) zone, expect continuation and treat reversion setups with suspicion; near 0.5 the tape is effectively random. The fade dots mark reverting-and-stretched moments. Then read the Edge row — a regime filter only earns its keep if fades taken inside it beat the unconditional base rate. Context, never a standalone trigger.
Three visual styles are provided (Gradient area + glow / Histogram / Line).
UNIVERSAL ACROSS MARKETS
The price source is an input, so the engine runs on any instrument and timeframe. Defaults target intraday index futures (e.g. NSE NIFTY); change the source for any other market. The reading is self-normalising around 0.5, so the same regime bands work everywhere.
ORIGINALITY
The exponent itself is a standard public statistic, credited below. The original work is the assembly: a structure-function persistence estimator chosen for heavy-tail robustness and smoothed against short-window noise, gated against a stretch z-score into a located fade event, and tied to a forward base-rate calibration so the regime claim is tested on each instrument rather than asserted. It is a regime and validation tool, not a plain exponent plot. No third-party Pine code is reused.
CONCEPT CREDIT
The scaling exponent and rescaled-range analysis — Harold E. Hurst (1951). Fractional / self-similar processes and the generalized exponent — Benoit Mandelbrot. The structure-function (generalized-Hurst) estimator is the variant most robust to heavy-tailed financial data. The anti-persistence-anticipates-reversion application follows recent local-exponent mean-reversion research (2024). Not affiliated with, nor endorsed by, any third party.
HONESTY / LIMITATIONS
The exponent is an estimate from a finite window — it is noisy and lags, and short windows can raise false alarms (which is why a smoothing control is provided, on by default). A low reading is context, not a trigger. The Edge figures are in-sample, close-to-close, with overlapping forward windows and no costs — descriptive context, not a verified backtest. An Edge near zero or negative is the harness honestly reporting that the regime read isn't helping here; do not tune until it turns green — that is curve-fitting. Nothing here predicts direction.
DISCLAIMER
Research and educational tool only. NOT financial advice and NO guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicator

Multi-Factor Divergence MatrixMulti-Factor Divergence Matrix
OVERVIEW
Most divergence tools read one oscillator against price. The Multi-Factor Divergence Matrix reads fifteen independent lenses at once, standardizes them onto a single shared standard-deviation (sigma) scale, and then organizes them into a structure: lenses roll up into 14 aspects (distinct questions), aspects roll up into 6 families (factor classes), and families roll up into one composite. Divergence is detected five different ways on that construction, and a built-in calibration harness scores whether each method has actually carried any edge on your instrument.
The core idea: a price move is more trustworthy when many independent reads confirm it, and a divergence is more meaningful when it shows up across different kinds of information — not just three flavours of momentum that all say the same thing.
WHY THE COMPONENTS BELONG IN ONE SCRIPT (mashup rationale)
This is a deliberate multi-factor engine, not indicators stacked side by side. Every part answers the same question — is this price move confirmed, and by how broad a set of independent reads? — and each fixes a blind spot of the others:
A single oscillator can only diverge one way. Fifteen lenses across six families let price be unconfirmed by momentum, by trend efficiency, by location, by volatility, by order flow, or by cross-asset carry — independently.
Raw factor-stacking double-counts. Standardizing every lens to one sigma scale makes them directly comparable, and grouping correlated lenses into aspects (then families) means consensus is counted where it carries independent information, not where it merely repeats.
One detection method misses what another catches. Pivot divergence is precise but lags; slope fires earlier; correlation is continuous; sequential catches structured exhaustion; the intra-family split is often the very first crack. Run together, they cover the ways divergence actually appears.
Assertions are cheap. The calibration harness ties the whole construction back to realized forward outcomes, per method, so the tool reports whether its own signals carry edge rather than claiming they do.
Remove any one layer and the central question is answered less completely — which is what makes them one tool.
HOW IT WORKS
The 15 lenses → 14 aspects → 6 families
Momentum — oscillatory (RSI + Know Sure Thing), velocity (low-lag two-pole strength), stationary (fractional-difference of log price)
Trend / Efficiency — path quality (Kaufman efficiency ratio), extension (SAR distance in ATR units), rollover (dual-horizon efficiency gap)
Location / Mean — volume-anchored (VWAP deviation), geometric (linear-regression deviation)
Volatility — realized expansion (directional range), implied-vs-realized (variance-risk-premium spread)
Flow / Volume — net pressure (cumulative signed-volume delta, lower-timeframe estimated), volume-weighted (Money Flow Index)
Cross-Asset — carry (futures-vs-spot basis), fear (volatility-index vs price)
Each lens is z-scored over a rolling window (up = bullish). Correlated lenses that answer the same question (e.g. RSI and KST) are averaged into one aspect — the anti-redundancy step. A family agrees only when a majority of its filled aspects align; when its aspects disagree it is flagged SPLIT.
Two consensus axes, both at family resolution, auto-scaled by timeframe
Extreme-count — how many families are stretched to their extreme.
Divergence-count — how many families are diverging from price right now.
Five detection methods
Pivot — regular, hidden, exaggerated (equal-extreme) and triple divergence on the composite.
Slope — price-vs-composite regression-slope sign disagreement (fires earlier than pivots).
Correlation — rolling price-composite correlation flipping negative (continuous, always-on).
Sequential — a structured RSI exhaustion pattern (three deeper pushes, then a turn).
Leading — the intra-family SPLIT, often the first warning before a family flips.
Calibration. Each event is a directional hypothesis, queued and resolved a fixed horizon later versus an ATR threshold, then compared with the unconditional same-horizon base rate. The dashboard reports, per method: number of events, Hit %, and Edge = Hit − Base. Events are logged and resolved on confirmed bars only.
HOW TO USE
The dashboard has two modes. Compact (default) shows the decision essentials: the composite zone, the two consensus counts (Stretched X/6 · Diverging Y/6), a one-line family summary (bull / bear / split), and the single best-calibrated method with its Edge. Pro expands this to every family row (vote arrow, aspect agreement, SPLIT flag) and every per-method calibration class. In both, a high divergence-count backed by clean family agreement is strong context; the Edge figure tells you whether that read has actually preceded a move on this symbol and timeframe. Treat consensus as context, never a standalone trigger.
UNIVERSAL ACROSS MARKETS
Price, high, low, the VWAP source, the spot reference symbol and the volatility symbol are all inputs, so the engine runs on any instrument and timeframe. Volume-based lenses (VWAP, flow, MFI) need real traded volume — use the futures contract, not a cash index. Defaults target NSE NIFTY index futures intraday with an NSE:NIFTY spot reference and NSE:INDIAVIX; lenses without data quietly drop out and the consensus scales to whatever stays active.
ORIGINALITY
The individual techniques are public and credited below. The original work is the integration: standardizing fifteen heterogeneous reads onto one sigma axis, the aspect → family → composite roll-up that counts agreement only where it is independent, the dual extreme-and-divergence consensus, the surfacing of intra-family disagreement as a leading signal, and the forward base-rate calibration over every detection method. No third-party Pine code is reused.
CONCEPT CREDIT
RSI, Parabolic SAR, ATR, DMI — J. Welles Wilder. Know Sure Thing — Martin J. Pring. Efficiency Ratio — Perry J. Kaufman. Money Flow Index — Quong & Soudack. VWAP and cumulative volume delta — standard public market-microstructure concepts. Fractional differentiation — the long-memory / stationarity literature (Hosking 1981; adapted for finance by M. López de Prado). Two-pole low-pass smoothing — John F. Ehlers. The basis is explained by the cost-of-carry framework (N. Kaldor 1939; H. Working 1948–49). Variance risk premium — the implied-minus-realized literature. Linear regression and price/oscillator divergence are long-established public techniques. Not affiliated with, nor endorsed by, any third party.
HONESTY / LIMITATIONS
Consensus is context, not a trigger. Independence is managed, not perfect — lenses inside a family still share inputs, which is exactly why consensus counts families and aspects rather than raw lenses, and why a high count is never proof. The Edge figures are in-sample, close-to-close, with overlapping forward windows and no costs — descriptive context, not a verified backtest. An Edge near zero, negative, or unstable across timeframes is the harness honestly telling you the method has no reliable edge on that instrument; do not tune parameters until it turns green — that is curve-fitting. Divergence and reversals confirm a few bars after their pivot (inherent to honest pivot detection). Nothing here predicts price.
DISCLAIMER
Research and educational tool only. NOT financial advice and NO guarantee of profitability or accuracy. Indicators describe past behaviour; they do not predict the future. Trading carries risk of loss. Test out-of-sample and make your own decisions. The author accepts no liability for any use of this script. Indicator

Fractional-Diff Momentum OscillatorFractional-Diff Momentum Oscillator
What it does
The Fractional-Diff Momentum Oscillator is a momentum line, scaled in standard-deviation (σ) units around a zero balance, built on the fractional differencing of price — the smallest amount of differencing that makes price statistically stationary while still keeping its memory.
Why this is different (and original)
Almost every momentum oscillator works on returns — that is, price differenced once (integer order d = 1). Returns are stationary, but differencing once erases the series' memory, throwing away the slow, persistent structure that carries trend information. Raw price (order d = 0) keeps all the memory but is non-stationary and unusable by most statistical tools.
Fractional differencing uses a non-integer order (typically 0.3–0.6) that sits between the two: it removes just enough drift to reach stationarity while retaining long memory. The result is a momentum series that is both well-behaved and information-rich. This transform is standard in quantitative research but rare on retail charts, where oscillators almost universally difference once and discard the signal. That is what makes this original: it is a momentum oscillator built on a memory-preserving transform rather than plain returns.
How it works
The fixed-width fractional-difference weights are generated recursively — w(0) = 1, w(k) = −w(k−1)·(d − k + 1)/k — and truncated once they fall below a tolerance, giving a finite window. Those weights are convolved with log-price to produce the fractionally-differenced series. That series is then z-scored over the normalization window and lightly smoothed into the σ oscillator you see, centred on zero.
How to use it
Zero is the balance line. Above zero = net up-momentum; below = net down-momentum.
Dashed σ bands mark stretched momentum; dotted bands mark extremes prone to exhaustion (red on top, green on the bottom in the standard reading).
Zero-crosses (triangles) are momentum-flip events.
Divergences (circles) warn when price makes a new extreme that momentum does not confirm.
Read the EDGE row. The dashboard runs a live forward-return harness: for every momentum flip it checks whether a favourable move (≥ k×ATR within the horizon) actually occurred, and compares that Hit % against the unconditional Base %. EDGE = Hit − Base is the honest measure of whether the signal adds information on your instrument and timeframe. If EDGE is near zero, the signal is not helping there — and the tool says so.
Settings guide
01 · Data & Differencing — source, log-price toggle, differencing order d, weight tolerance, max window, and a universal price source for the harness.
02 · Normalization — z-score window and output smoothing.
03 · Calibration — horizon, favourable-move threshold (×ATR), base-rate window.
04 · Bands — momentum and extreme σ bands; divergence pivot.
05 · Display & Theme — visual style (gradient area + glow / histogram / line), regime tint, dashboard, colors.
Non-repaint
The weights are fixed and the convolution reads only closed bars — no recalculation of past values, no future leak.
Concept credit
Fixed-width window fractional differentiation — Marcos López de Prado, Advances in Financial Machine Learning (2018).
Fractional integration in time series — Hosking (1981); Granger & Joyeux (1980).
Disclaimer
For research and education only. Not financial advice, not a recommendation, and not a guarantee of future results. All statistics shown are in-sample, close-to-close, and exclude costs — a study aid, not a backtest. Do your own research and manage your own risk. Indicator

Volumetric Regression Heatmap [LuxAlgo]The Volumetric Regression Heatmap indicator is a sophisticated market analysis tool that combines dynamic linear regression with volume profile density to visualize fair value and liquidity zones. By projecting volume-weighted heatmaps within a trend-following channel, it allows traders to identify where the bulk of trading activity has occurred relative to the current price trajectory.
🔶 USAGE
The indicator provides a multi-layered view of market structure. The central heatmap shows the "hottest" areas of volume concentration, acting as a magnet for price, while the outer bands represent statistical extremes.
🔹 Mean Reversion Signals
The script includes a built-in signal system designed for sideways or "flat" markets. When the indicator detects a "Contraction" state (determined by the ratio of channel height to standard deviation), it plots small circles at the +2/-2 standard deviation levels.
Green Circles: Potential long opportunities when price crosses below the lower signal band during a flat market.
Red Circles: Potential short opportunities when price crosses above the upper signal band during a flat market.
🔹 Future Projections & Profile
The heatmap extends beyond the current bar, providing a "Future Projection" zone. This allows traders to anticipate where support and resistance levels will be in the coming sessions. To the right of the projection, a Bookmap-style volume profile histogram displays the total volume distribution, helping to identify high-volume nodes (HVN) and low-volume nodes (LVN) at a glance.
🔶 DETAILS
🔹 Dynamic Auto-Adjusting Period
Unlike standard regression channels that use a fixed lookback, this tool features an adaptive engine. It calculates the ratio between short-term and long-term volatility (ATR).
In high-volatility environments, the channel period shrinks to become more reactive.
In low-volatility or ranging environments, the period expands to capture a broader structural view.
🔹 Volumetric Delta Histograms
The script calculates the approximate buying and selling volume for every candle within the lookback period. This data is visualized as histograms extending from the outer bands:
Top Band (Green): Displays buying pressure delta.
Bottom Band (Red): Displays selling pressure delta.
This allows traders to see not just where price is, but the intensity of the volume driving it toward the channel extremes.
🔶 SETTINGS
🔹 Core Settings
Source: The price source used for the regression calculation.
Base Period: The anchor length for the regression fit.
Dynamic Auto-Adjusting Period: Enables/disables the volatility-based adaptive lookback.
🔹 Heatmap Settings
Grid Rows Each Side: Determines the vertical resolution of the heatmap bands.
Gradient Smoothing: Applies a smoothing algorithm to the volume distribution for a cleaner visual gradient.
Colors 1-5: Customizable colors ranging from low-volume areas to high-volume "hot" zones.
🔹 Mean Reversion Signals
Signal Band (SD Multiplier): The standard deviation level required to trigger a signal.
Flat Slope Threshold: Controls how "flat" the channel must be to allow signals to appear, preventing counter-trend signals in strong trending markets.
🔹 Delta Histograms
Histogram Height Scale: Adjusts the vertical magnitude of the delta bars.
Histogram Bar Width: Sets the thickness of the individual delta lines.
🔹 Style & Options
Future Projection Length: How many bars to project the heatmap into the future.
Show Volume Profile Histogram: Toggles the right-sided volume distribution boxes.
🔹 Dashboard
Dashboard: Toggles the on-screen analytics panel.
Position/Size: Adjusts the location and scale of the dashboard UI.
Indicator

Indicator

Adaptive Regression Channel Fit-Gated & CalibratedAdaptive Regression Channel — Multi-Engine, Fit-Gated & Calibrated
What it is
A regression channel that lets you choose the estimator, measures its own goodness-of-fit, and refuses to be trusted when that fit is poor. Four centerline engines, seven volatility engines for the bands, a kurtosis fat-tail multiplier, an honest √-horizon uncertainty cone, a ride-vs-revert detector, and a past-only calibration tracker that asks whether tagging the band actually precedes reversion on this symbol — measured against an unconditional base rate, in R.
Why these components belong in ONE script (not a stack of indicators)
They are the parts of one estimator, each covering a failure mode of the others:
Centerline engine. OLS is the baseline but lags at the right edge and is fragile to spikes. LOESS fixes the endpoint lag (local-linear, tricube-weighted). Theil-Sen fixes spike fragility (median of pairwise slopes). Kalman removes the window entirely (recursive level + trend). You choose the trade-off.
Adaptive window (Kaufman efficiency ratio). A fixed window is wrong in both trends and chop; the length stretches when price is efficient and contracts when it is noisy, so the channel tracks the live swing.
Volatility engine. The bands are only meaningful if their width reflects the real residual distribution: EWMA (recency), Yang-Zhang (drift-robust OHLC range), GARCH(1,1) (clustering), MAD (spike-resistance), asymmetric semidev (skew), quantile (empirical containment) — plus a kurtosis fat-tail multiplier so the stated containment actually holds.
Fit-quality gate. A channel drawn on a bad fit is noise dressed as structure. The centerline only draws solid and only emits events when it explains at least r2Gate of variance; below that it greys to dashed.
Ride-vs-revert. A band touch is ambiguous. Consecutive closes beyond the band ("walking the band") mark continuation, not reversion — so the channel does not fade a trend that is running.
Calibration. The edges are a hypothesis. Each trusted band tag is resolved forward against an unconditional same-horizon base rate, in R, so you see whether the band adds anything over noise — not a naked win-rate.
The centerline says where the mean is, the volatility engine says how wide the normal range is, the fit gate says whether to believe any of it, ride-vs-revert says fade or follow, and calibration keeps it honest. Remove any layer and the channel loses a check it cannot recover.
How it works (mechanics)
The selected engine fits the centerline in (optionally log) price space, on a window that can be fixed, ER-adaptive, or pivot-anchored to the current segment. Residual dispersion drives the bands through the chosen volatility engine, widened by the fat-tail multiplier. The fit metric is the explained-variance fraction of the residuals; below the gate the channel is shown as untrusted and emits nothing. On a trusted channel, each band tag is queued on bar close and resolved horizon bars later — a win if price moved moveATR·ATR in the reversion direction — and tallied per class (UTAG / LTAG) against the unconditional base rate.
Non-repaint: fits on confirmed closes, pivots confirmed, calibration on bar close. The drawn channel updates live (a rolling regression always does — that is description, not a signal); the calibrated events are confirmed-bar only.
How to use
Read the dashboard: FIT% and TRUSTED / LOW-FIT come first. If the fit is low, treat the channel as description only.
On a trusted channel, a band tag is a reversion hypothesis — the calibration rows tell you whether that class has actually paid on this symbol (Hit% vs Base%, Edge with a 95% star, MFE/MAE in R).
WALK means the band is being ridden (trend) — do not fade it.
The cone is an uncertainty fan (√-horizon growth), not a target.
Everything here is descriptive, probabilistic context — never an instruction.
Use on any market
The Data Source inputs (Close / High / Low) drive the fit, the band tags and the calibration, so the channel runs on any series (standard candles, Heikin-Ashi, etc.) and any market. All thresholds are ATR-relative. Defaults are set for NIFTY index-futures intraday; change the source or lengths for other assets.
Originality
The contribution is the closed loop: a selectable estimator whose fit is measured and gated, bands whose width is chosen from seven rigorous volatility models and fat-tail-corrected, a ride-vs-revert guard, and a per-class forward calibration against an unconditional base rate. Most channels draw a line and a ±σ band and stop; this one tells you whether to believe the line and whether the band has historically meant anything here.
Credits
Least squares & local regression (LOESS) — Gauss / Legendre; W. S. Cleveland
Theil-Sen estimator — H. Theil & P. K. Sen
Recursive level+trend (Kalman) filter — R. E. Kálmán
Efficiency Ratio (adaptive window) — Perry Kaufman
EWMA / RiskMetrics variance — J.P. Morgan
Yang-Zhang OHLC volatility — Dennis Yang & Qiang Zhang
GARCH(1,1) — Engle & Bollerslev
The fit-quality gate, the band-walk ride-vs-revert logic and the forward-calibration framework are the author's original implementation.
Limitations (honest)
The calibration is in-sample, close-to-close at a fixed horizon, with no costs, slippage or stops — a study aid, not a backtest, and not a probability of future results. A rolling regression updates every bar; the drawn channel is descriptive, and only the confirmed-bar tag events are calibrated. Theil-Sen is O(n²) in pairs (capped for speed). Past behaviour does not assure future behaviour.
Disclaimer
Educational / informational study for chart analysis only. NOT financial advice, NOT a strategy, NOT a recommendation. It places no orders and guarantees no outcome. Markets carry risk; do your own research and manage your own risk. Paper-trade before risking real money. 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

Reversion Setup - Bollinger Bands + RSI Live Dashboard📊 REVERSION SETUP — Bollinger Bands + Live RSI Dashboard
A focused mean-reversion tool combining Bollinger Bands with a real-time
RSI dashboard — built to spot potential reversal zones without cluttering
your chart or burning extra indicator slots.
✅ Bollinger Bands — fully configurable (period, deviation, source, color)
✅ Live RSI Dashboard — current RSI value, overbought/oversold levels,
and real-time alert status, shown in a clean table instead of a
separate pane
🎯 WHY THIS COMBO
Bollinger Bands highlight when price stretches to a statistical extreme,
while the RSI dashboard confirms whether momentum actually backs up that
move. When price tags a band AND RSI flags overbought/oversold at the
same time, that's your reversion signal — two confirmations, one chart.
🔧 FULLY CONFIGURABLE
— Adjust Bollinger period, deviation, source, and color
— Set your own RSI period and overbought/oversold levels
— Adjust dashboard text size
💡 HOW IT WORKS
The RSI dashboard updates live as new candles form, showing:
— Current RSI value
— Upper/Lower band levels
— Alert status (Overbought ↑ / Oversold ↓ / Neutral →)
🔗 PAIRS WELL WITH
Check out my Trend Setup (EMA 50/100/200 + RSI Dashboard) for the
trend-following counterpart to this mean-reversion tool.
💬 Suggestions for the next setup? Drop a comment below — more tools
coming based on community feedback.
If this helped your charts, a like goes a long way 🙏 Indicator

Sentiment Divergence Tracker The "Sentiment Divergence Tracker" is a sophisticated quantitative analysis tool designed to identify statistical anomalies between two correlated financial assets. By monitoring the relative price movement of a primary asset against a correlated counterpart, this indicator highlights "Divergence Zones" that often precede significant market reversals or mean reversions.
Core Functionality:
Traditional technical analysis often ignores the relationship between inter-market assets. This indicator bridges that gap by normalizing percentage-based price fluctuations, allowing for a clean, comparative view of market sentiment.
Key Features:
Dynamic Divergence Calculation: Utilizes standard deviation and moving average models to calculate the "Fair Value" gap between two assets.
Automated Support/Resistance Mapping: Rather than manual drawing, the indicator plots dynamic support lines that adjust based on market volatility, helping traders identify institutional "value areas."
Oversold/Overbought Detection: Visualizes extreme deviations where the price has stretched too far from its correlated pair, signaling high-probability reversal setups.
Institutional Context: Useful for identifying liquidity pockets where "Smart Money" might be accumulating or distributing based on inter-market relationships.
How to Interpret:
Baseline (0.0): Represents the equilibrium point where both assets are moving in perfect correlation.
Divergence Line: The primary blue plot. When this line moves away from the baseline, it indicates a weakening correlation.
Support/Resistance Levels: These are not static lines but dynamic boundaries. A touch or breach of these levels typically indicates that the asset is statistically "oversold" or "overbought" relative to its pair.
Trade Execution: Look for "Mean Reversion" entries when the Divergence Line exhausts its momentum at the support/resistance boundaries and begins to curl back toward the baseline.
Recommended Settings:
Timeframe: Optimized for 15-minute to 4-hour charts for intraday and swing trading.
Correlated Pair Selection: Ensure the "Correlated Asset" input matches a highly correlated instrument (e.g., Gold/Silver, or major Currency/Index pairs).
Volatility Sensitivity: Adjust the lookback period in the settings to suit your specific asset's volatility profile.
Disclaimer:
This tool is intended for analytical purposes and does not constitute financial advice. Always integrate this indicator with your existing risk management strategy and technical confirmation (e.g., candlestick patterns, order blocks Indicator

Adaptive Ichimoku Equilibrium ChannelADAPTIVE ICHIMOKU EQUILIBRIUM CHANNEL
WHAT IT IS
A modern, single-engine extension of Ichimoku Kinko Hyo. Ichimoku's core insight is that its lines are not moving averages but EQUILIBRIUM midpoints — the centre of the recent high/low range — and that it projects that equilibrium forward as a cloud. This script keeps that DNA and rebuilds it as one adaptive object: the equilibrium adapts to trend efficiency, the channel width breathes with volatility, volume confirms or warns, momentum and breakouts flag turns, equal-high/low liquidity pools become structural targets, the cloud trend is read across four timeframes, and a past-only calibration attaches an honest hit-rate to the signals. A plain-language verdict makes it readable at a glance; an Advanced view exposes the full engine.
It is a single indicator, not a pack. Everything plots in one pane on the price chart.
WHY THESE COMPONENTS ARE COMBINED (mashup justification)
Each layer answers a different question a trend trader must answer at the same moment, and all of them share — and reinforce — the same equilibrium spine, which is why they are fused into one engine rather than left as separate studies that would each repaint the chart and never reference each other:
- EQUILIBRIUM SPINE. Fast and slow range-midpoints (the Ichimoku Tenkan/Kijun idea) blended by an efficiency ratio, so the spine tracks quickly in clean trends and slowly in chop. This is "fair value", and every other layer is measured relative to it.
- KUMO CLOUD + MULTI-TIMEFRAME TREND. The forward-displaced cloud shows trend at a glance. The same cloud trend is then sampled at 1x, 3x, 5x and 15x the chart timeframe and shown as four colour-coded cells, so higher-timeframe alignment is visible without switching charts. Alignment across the four is stronger context; conflict is a caution.
- ADAPTIVE WIDTH / PREMIUM-DISCOUNT. The dealing range around the spine expands when volatility expands and contracts when it compresses (width is ATR-based). This makes "discount" (lower half) and "premium" (upper half) mean the same thing across assets and regimes — a fixed-width channel cannot.
- VOLUME CONFIRMATION. Volume-weighted price versus its simple average shows whether volume agrees with the trend; a volume surge flags conviction. This closes the blind spot of a price-only channel. On instruments that report no volume, volume can be borrowed from a chosen proxy symbol.
- DISTANCE-FROM-EQUILIBRIUM DIVERGENCE. Ichimoku has no native oscillator, so momentum here is reconstructed as price's distance FROM the equilibrium spine: when price makes a higher high that is LESS extended from the spine than the previous high (or a lower low that is less extended), momentum is waning and a divergence is flagged at the extreme — exactly where reversals begin.
- VALIDATED BREAKOUTS. A break of a channel rail is only marked when it is confirmed by displacement beyond the rail, a dominant candle body, above-average volume, and a close that holds beyond the rail (anti-wick). This filters out the wick-pokes that fake breakouts on a naive channel.
- LIQUIDITY POOLS. Clusters of equal highs and equal lows are where stop orders rest. The script tracks the nearest unswept pool above and below price and lets trade targets snap to them, so objectives are structural rather than arbitrary.
- FUTURE BIAS + CALIBRATION. Trend, zone, slope, volume and breakouts are fused into a continuation-versus-reversion probability. Separately, the channel setups and the zone signals each carry a PAST-ONLY forward hit-rate, reported with a Wilson 95% confidence interval, measured on the current symbol.
In short: equilibrium without width gives no zones; width without volume or structure is blind; and neither tells you what is statistically likely next or whether the same setup has worked before on this symbol. Because each piece needs the others to be useful, they are one object.
HOW IT WORKS TOGETHER (reading the chart)
1. The trend-coloured band and its midline are the trend: green up, red down, gold/grey when there is no clear trend. The midline holds its colour until the trend actually reverses, so it does not flicker in chop.
2. Within the band, the lower (discount) half is where to look to engage with an uptrend; the upper (premium) half is extended. A downtrend mirrors this.
3. The short coloured level on the right is the invalidation: the current trend read fails on a close beyond it.
4. The dashboard's Ichimoku row shows the cloud trend on 1x/3x/5x/15x. The Higher-TF row tells you whether trades are permitted (setups are taken only in the higher timeframe's direction).
5. An orange "Div" marker warns of waning momentum at an extreme. A "Break" diamond marks a validated breakout. Cyan EQH/EQL lines are the nearest liquidity pools and act as targets.
6. The verdict box states the trend, where price sits, and the conviction in words. The Advanced view adds the calibrated win-rates, volume read, channel state and any optional inter-market context.
HOW TO USE IT
- Apply to any symbol and timeframe. Read the band colour for trend, the half for location, and the verdict box for the plain-language summary.
- Use the Ichimoku multi-timeframe row to gauge whether the higher timeframes agree before acting on a lower-timeframe signal.
- On-chart markers, from most to least prominent: LONG / SHORT label badges are full trade setups (entry, stop and target); Buy / Sell triangles mark price entering the discount/premium zone; the tiny orange "Div" warns of waning momentum at an extreme; the tiny "Break" diamond marks a validated breakout; cyan EQH/EQL lines are the nearest liquidity-pool targets.
- Treat all markers as context, and check their past-only win-rates in the Advanced view before relying on them.
- This is analysis context for your own decision, not a signal to act on blindly. It places no orders.
ORIGINALITY (versus standard Ichimoku)
Standard Ichimoku is a fixed-length, price-only, single-timeframe tool with no volume, no momentum oscillator, no breakout validation, no targets, and no measure of whether it has worked. This script makes the equilibrium adaptive, makes the width volatility-driven, reconstructs momentum as distance-from-equilibrium, validates breakouts against wicks, turns equal-high/low liquidity into targets, shows the cloud trend across four timeframes, adds volume confirmation, and attaches a past-only calibrated hit-rate to its signals. None of that is provided by classic Ichimoku.
UNIVERSAL DATA (works on any market)
The price source is selectable in Settings (default close; choose hl2, hlc3, or any series), every threshold is ATR-relative, and volume can be borrowed from a proxy symbol for instruments that report none — so the script runs on stocks, futures, FX, crypto and indices without re-tuning. Two optional refinements are off by default and never shown on the simple face: a spot symbol (futures-vs-spot basis) and a volatility index (e.g. VIX / India VIX), which feed conviction and channel width when supplied. The entire display — dashboard, bands, lines, labels and markers — adapts to your chart background automatically (Auto theme), or can be forced to Dark or Light, so it stays readable on any background.
SETTINGS OVERVIEW
Data source (price source, optional borrowed-volume symbol); Equilibrium (Tenkan/Kijun lengths, adaptive blend); Adaptive width; Regime (efficiency, ADX, slope); Inter-market refinement (optional); Multi-timeframe trade filter; Calibration horizon and follow-through; Trades; Breakout validation thresholds; Liquidity tolerance; and Visuals (theme, zones, signals, divergence, liquidity, multi-timeframe levels, dashboard position).
LIMITATIONS
The forward cloud is a PROJECTION of the current equilibrium, not a forecast. Calibration and hit-rates describe PAST behaviour only on the current symbol and are not predictive. Borrowed volume, futures-vs-spot basis and volatility-index refinement are approximations. Everything here is probabilistic context, not certainty.
DISCLAIMER
This is a study/indicator for chart analysis and education only. It is not a strategy, not a recommendation, and not financial advice. It places no orders and guarantees no outcome. Markets carry risk; do your own research and manage your own risk.
Indicator

Anchored Volume Profile Confluence ANCHORED VOLUME PROFILE CONFLUENCE — POC, Value Area, HVN/LVN & Value Migration
OVERVIEW
This is an anchored volume-at-price framework. From a chosen anchor — the session, a swing pivot, or a bar you click — it builds a volume profile and reads where trade actually happened: the POC (the most-traded price), the value area, and the high- and low-volume nodes. It overlays the anchored VWAP (the mean) on the same anchor, maintains a second time-decayed profile whose value migrates against the sticky POC, and calibrates its stretch signals against the symbol's own past. Everything is built from one idea — volume distributed across price — so the layers describe the same auction from different angles rather than competing for screen space.
WHY THESE COMPONENTS ARE COMBINED (and how they work together)
Price tells you where the market is; volume-at-price tells you where it agreed value was. A profile alone is a static picture, a VWAP alone is a single line, and neither tells you whether what you are seeing is reliable. Each layer here answers a different question, and they are meant to be read together as one object:
- VOLUME PROFILE (POC / VALUE AREA / HVN-LVN) is the distribution of volume across price since the anchor. The POC is the price with the most acceptance. The value area is the price range containing the chosen percentage of volume (default 70%). High-volume nodes (HVN) are acceptance shelves where price tends to stall and rotate; low-volume nodes (LVN) are rejection gaps price tends to move through quickly. This is the structural map.
- ANCHORED VWAP (MEAN) is the volume-weighted average price over the same anchor. The POC is the MODE of value (where most trade occurred) and the VWAP is the MEAN (the volume-weighted centre). Their relationship is information in itself: when VWAP sits above the POC the distribution is top-heavy, below it bottom-heavy. Showing both, anchored to the same event, is what turns a profile into a read on skew.
- VOLUME-WEIGHTED SIGMA measures dispersion around the mean, computed from the running second moment (sigma = square root of E - (E )^2), so "stretched" means the same thing on any instrument. This is what makes the stretch signal comparable across assets and calibratable.
- VALUE MIGRATION is the original layer. A second profile is maintained with an exponential half-life applied to its volume, so it weights recent trade more heavily. Its value (the decayed POC or value-area midpoint) reacts to what is happening now, while the anchored POC stays sticky. When the fast value crosses the anchored POC, acceptance is shifting — buyers or sellers are building value away from the established centre. Because both are derived from the same volume data, this is a coherent structural signal, not two unrelated indicators stacked together.
- REGIME and CALIBRATION are the quality layer. An efficiency-ratio and ADX read labels the market trending, mixed or choppy for context. Separately, the script tracks — past-only — how often a stretch beyond the bands actually reverted toward value, reported as a percentage with a confidence interval. This is what separates a measured framework from a drawing: the signal is scored against the instrument's own history.
Read together: the profile shows the structure (where value is, where the shelves and gaps are), the POC-versus-VWAP skew shows how that value is distributed, the sigma bands show how far price has stretched from it, the migration shows whether acceptance is moving, the regime tells you whether to trust a signal, and the calibration shows how the stretch has behaved here before.
HOW TO USE IT
1. Pick an anchor mode in settings — Session, Pivot High, Pivot Low, Pivot High/Low (auto), or Manual (click a bar). The profile and VWAP rebuild from that point.
2. Read the histogram for structure: trade toward HVN shelves (acceptance) and expect quick travel through LVN gaps (rejection). The POC is the gravity centre.
3. Use the value area (VAH/VAL) as the fair-value range; price outside it is out of value and either trending or stretched.
4. Watch the VWAP-versus-POC skew for whether value is top- or bottom-heavy, and the sigma stretch rails for extension.
5. Watch the fast value crossing the POC (triangles) as a sign acceptance is migrating; the table and exports quantify the migration.
6. Treat a stretch (circles) into an LVN as more reversion-prone and a stretch into an HVN as a potential trap; the table's verdict and past-only reversion rate summarise this.
WHAT MAKES IT ORIGINAL
It is not a static volume profile. It pairs an anchored profile with the anchored VWAP so you read the mode and the mean together; it adds a decayed-profile value-migration signal against the sticky POC; it uses robust percentile-based HVN/LVN thresholds that self-scale instead of a fixed percentage of the POC; it refines the profile with lower-timeframe intrabar data where available; and it calibrates its stretch signal per symbol. The migration read and the per-symbol calibration in particular are not part of a standard volume profile.
WORKS ON ANY ASSET (universal)
The price SOURCE for the mean is selectable in the settings, so the engine runs on any market — futures, indices, FX, crypto, or stocks. The profile is built from each bar's true high-low range (and from lower-timeframe bars where available, for accuracy). Volume-at-price requires volume; on symbols that report none, you can borrow volume from a reference symbol. All thresholds are ATR- and sigma-relative, so nothing is tied to one instrument's price scale. A data-health row tells you whether volume is native, borrowed, or refined by lower-timeframe data.
SETTINGS SUMMARY
- Data Source: price source (default HLC3) and an optional volume-borrow symbol for no-volume instruments.
- Anchor: anchor mode, pivot left/right lengths, and a manual anchor time.
- Profile: resolution (rows per ATR), value-area percentage, lower-timeframe refinement and its resolution, robust percentile node thresholds, HVN/LVN levels, histogram width, and what to draw.
- Value Migration: enable the decayed profile, its half-life, and the fast-line definition (value-area midpoint or raw POC).
- Signals & Regime: stretch threshold in sigma.
- Calibration: enable tracking, evaluation horizon, and minimum reversion in ATR.
- Visuals: Auto/Dark/Light theme, colours, line glow, on-chart labels, legend, table and their positions, and a data-health row.
The script also prints its name, the symbol and the timeframe on the chart, and an on-chart legend names every plotted level, so it is always clear what is being viewed.
LIMITATIONS (please read)
- Pivot anchors confirm only after the right-pivot length in bars; the profile is seeded back to the true pivot bar, but a new pivot anchor appears with that delay.
- Lower-timeframe refinement depends on available intrabar history and is disabled when volume is borrowed; older bars fall back to bar-range distribution.
- The decayed profile re-weights every bin each bar, so it is heavier than a static profile on long anchors.
- 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

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
