Uptrick: Vector Trail TrendIntroduction
Uptrick: Vector Trail Trend (VTT) is an overlay tool that combines a velocity-projected trend line with an ATR-based adaptive trailing band to identify directional bias and trend reversals. A secondary momentum module layered on top flags statistically extreme momentum conditions that traders can use as dynamic take-profit references within the prevailing trend. The script also includes a configurable overlay presentation and an on-chart dashboard summarizing current trend state.
Originality
This script combines three distinct calculation layers that are not typically merged in a single publication, and each is included for a specific reason.
The first layer builds a trend center from a smoothed moving average of price, then projects that line forward using a smoothed rate of change of the trend center itself, scaled by a user-defined projection factor. This produces a trend reference that leans in the direction of recent acceleration rather than simply lagging price, which is the basis used for the trailing band below it.
The second layer wraps that projected trend center in an ATR-based band that only trails in the favorable direction and resets on a confirmed close beyond the opposite band, similar in mechanism to a ratcheting stop line. This layer is responsible for the directional flips and the up and down signals plotted on the chart.
The third layer is independent of the first two and evaluates RSI relative to its own rolling mean and standard deviation, expressed as a Z-score. This is used to flag when momentum has reached a statistically extreme reading relative to its recent history, which the script surfaces as separate dynamic take-profit markers. This layer exists because trend direction and momentum exhaustion are different pieces of information, and combining them gives traders both a directional read and a separate overextension read without conflating the two into a single signal.
The overlay is user-selectable between a gradient fill between price and the trail, a dual EMA trend ribbon, both together, or neither, so the visual presentation can be adjusted without changing the underlying trend or TP logic.
Features
Velocity-projected trend center using a smoothed moving average and a smoothed rate of change projection
ATR-based adaptive trailing band with directional flip logic
Confirmed-bar trend state calculation to avoid intrabar repainting of the trend flip
Dynamic take-profit engine based on a Z-score of RSI relative to its own rolling mean and standard deviation
Selectable TP marker style, cross or circle
Up and down trend signal labels plotted at the trail
Selectable overlay mode: vector gradient fill, trend ribbon, both, or none
Adjustable gradient and ribbon transparency
Optional candle coloring based on active trend direction
Adjustable trail line width
On-chart dashboard showing trend, signal, Z-score, TP state, distance from trail in ATR units, and active overlay mode
Nine selectable dashboard positions
Seven alert conditions: up signal, down signal, long dynamic TP, short dynamic TP, any trend signal, any dynamic TP, and all VTT signals combined
Inputs
Trend Settings: source, trend length, velocity smoothing length, vector projection factor.
Trail Settings: ATR length, ATR multiplier.
Dynamic TP Settings: show/hide dynamic TPs, TP marker style, momentum (RSI) length, Z-score length, TP extreme level threshold.
Overlay: overlay style selection, gradient transparency, ribbon fast length, ribbon slow length, ribbon transparency.
Visuals: show/hide up and down signals, candle coloring toggle, trail width.
Dashboard: show/hide dashboard, dashboard position.
How It Works / How to Use
The trend center is calculated from a moving average of the chosen source, then projected forward using a smoothed measure of its own rate of change. An ATR-based band is built around this projected line and only moves in the direction favorable to the current trend, flipping only on a confirmed close beyond the opposite band. This flip is what produces the up and down signals and the trend color change.
Once a trend is established, the script tracks RSI relative to its own recent mean and standard deviation. When this Z-score reaches the user-defined extreme level and then crosses back toward normal, a dynamic take-profit marker is plotted for the active trend, using the opposite color for visual distinction, indicating that momentum has cooled from an extreme reading.
Traders can use the trail flips for directional bias and entries, and the dynamic TP markers as a secondary reference for potential exhaustion points within that trend. The overlay mode, transparency, candle coloring, and dashboard are all cosmetic and can be adjusted without affecting the underlying calculations.
Conclusion
Uptrick: Vector Trail Trend combines a velocity-projected trend line, an adaptive ATR trailing band, and a momentum Z-score take-profit layer into a single overlay tool, giving traders both a directional trend read and a separate momentum-exhaustion reference from one indicator.
Disclaimer
This script is provided for informational and educational purposes only and does not constitute financial advice. Past performance, whether shown historically or implied through the script's logic, does not guarantee future results. Always perform your own due diligence and risk management before making trading decisions.
مؤشر

G-Score | NAL1. Overview
G-Score | NAL is a volatility-adjusted Z-Score regime indicator built from two main components: a smoothed price Z-Score and an adaptive GARCH-based volatility Z-Score.
The indicator does not use fixed overbought or oversold levels. Instead, it builds dynamic thresholds from the current volatility structure of the market. Price is then measured against those volatility-derived boundaries to determine whether the market is entering a bullish or bearish statistical regime.
2. Calculation
The indicator starts by estimating volatility through a GARCH-style process. It calculates log returns from the selected source, converts those returns into squared variance, and then compares short-term variance behavior against a realized variance baseline.
GARCH_LogReturn = math.log(src / src )
GARCH_SquaredLogReturn = math.pow(GARCH_LogReturn, 2.0)
GARCH_RealizedVariance = ta.sma(GARCH_SquaredLogReturn, GARCH_Lookback)
The model then searches through possible beta and gamma coefficients to find weights that better fit the recent variance environment. These optimized coefficients are used to build a GARCH variance estimate from three components: long-run variance, recent shock variance, and lagged variance.
GARCH_Variance =
GARCH_Gamma * GARCH_LongRunVariance +
GARCH_Alpha * GARCH_SquaredLogReturn +
GARCH_Beta * GARCH_LaggedVariance
The final GARCH volatility value is created by taking the square root of the projected variance. This produces the volatility engine used later in the threshold system.
The indicator then calculates two separate Z-Scores. The first is a price Z-Score, measuring where price is relative to its own mean and deviation. The second is a volatility Z-Score, measuring where GARCH volatility is relative to its own historical distribution.
Both values are smoothed with a Jurik-style moving average to reduce noise while keeping the response relatively fast.
The volatility Z-Score is then mirrored into positive and negative boundaries. This creates dynamic upper and lower thresholds that expand and contract with the current volatility regime.
The final signal compares the smoothed price Z-Score against those adaptive volatility thresholds. A bullish state triggers when price strength expands above the upper volatility boundary. A bearish state triggers when price weakness falls below the lower volatility boundary. When price remains inside the volatility envelope, the previous regime is held.
3. Key Features
Adaptive GARCH-style volatility engine.
Price Z-Score measured against volatility-derived thresholds.
Dynamic upper and lower boundaries instead of fixed levels.
Jurik-style smoothing for both price and volatility components.
State-based candle coloring, background regime coloring, threshold fills, and transition labels.
Designed to capture statistical expansion when price moves outside its volatility-adjusted structure.
4. Use
G-Score is designed to identify when price begins separating from its normal statistical range after accounting for the current volatility environment. A move above the upper threshold reflects bullish statistical expansion, while a move below the lower threshold reflects bearish statistical expansion.
The strength of the indicator comes from the relationship between price displacement and volatility regime. Rather than treating every Z-Score reading the same, it lets volatility define the boundary that price must break.
This indicator is best used as a specialized module within a complete strategy framework. Its role is to isolate a specific statistical layer of market behavior, where price expansion is evaluated through the lens of adaptive volatility. The full value comes from how this regime signal is integrated into a broader process for timing, structure, and risk.
مؤشر

Renaissance Mean Reversion [JOAT]RENAISSANCE MEAN REVERSION
A tribute to the Medallion-style statistical-arbitrage approach: do not trade price — trade the spread between price and its smoothed expectation , measure how reliably that spread mean-reverts using an AR(1) half-life regression , and only fire signals when the half-life is fast enough to be tradeable. The result is a discipline-enforcing engine that says no more often than yes : it refuses to take a reversion trade until the spread shows it actually reverts.
The synthetic spread
The script builds a synthetic pair from two views of the same instrument:
Leg 1 — current price (configurable source).
Leg 2 — long EMA of price (default 50-bar; configurable).
Spread = price − long EMA (or ln(price) − ln(EMA) when log-spread mode is on, removing scale).
The spread is then Z-scored over a configurable lookback (default 100 bars) to produce a stationary stationary signal that says: "how many standard deviations is the spread from its own mean right now?". This is the textbook stat-arb construction, single-leg version.
Half-life regression — the gate
This is what makes the script institutional rather than retail. Reversion is meaningless if the spread does not actually revert. The script fits an AR(1) regression over a configurable window (default 120 bars):
Δspread_t = α + β · spread_{t−1} + ε_t
The half-life of mean reversion is then:
HL = −ln(2) / ln(1 + β)
When β is negative and close to zero, HL is short — the spread reverts quickly. When β approaches −1, HL is huge — the spread barely reverts. When β is positive, the spread is anti-mean-reverting (trending) and the script will refuse to trade.
A configurable Max Half-Life (default 20 bars) gates signals — entries only fire when HL is below this threshold. A configurable Min Half-Life (default 0.5) floors the estimate to avoid degenerate near-zero values that would otherwise produce explosive signals.
This is the headline filter. Roughly 50–70% of bars on most instruments fail it — which is the point. You only trade when the spread has earned the right.
Entry / Exit logic
R-LONG — fires when Z < −entryZ (default −2.0) AND HL is below the max threshold AND the re-entry cooldown has elapsed. Spread is stretched too far below, will revert.
R-SHORT — fires when Z > +entryZ AND HL is below the max threshold AND cooldown elapsed.
R-EXIT — fires when |Z| drops below exitZ (default 0.25) OR when Max Hold Bars (default 40) has been reached, whichever comes first.
A configurable re-entry cooldown (default 3 bars) prevents immediate re-firing on the same side.
Visual system — minimal mono institutional
The aesthetic is intentionally austere — Renaissance's research-paper minimalism. Pure monochrome:
Z guides on right side of chart — small text labels showing current Z, HL, and tradeable status.
R-LONG / R-SHORT / R-EXIT labels — clean text tags on entry and exit bars.
Half-Life overlay label — current HL value displayed near the live close.
Shaded ribbon between price and slow EMA (configurable transparency).
Trade entry/exit shapes — small markers at signal bars.
Single-hue tradeable-regime tint (off by default) — subtle bgcolor when HL is fast AND Z is stretched.
A locked Minimal Mono palette: white bull / gray bear / pure-black background. No accent colours. The chart looks like a quant research paper. Intentional.
Dashboard
Monospaced table positionable to any of eight corners. Surfaces:
Current spread value and Z score.
Current half-life (in bars) with tradeable / non-tradeable flag.
AR(1) β coefficient (the regression's directional read).
Z thresholds in use.
Last signal direction with bars-ago.
Max-hold bars remaining (when in a position).
Rolling backtest tracker
The script tracks the last N closed reversion trades (configurable, default 200) and surfaces:
Total trades, wins, losses.
Win rate.
Average bars-to-exit.
Average Z magnitude at entry.
Hit-rate by side (R-LONG vs R-SHORT).
This is the script's own performance audit — you see whether the engine is finding genuine reversion or whether the current regime is breaking it.
Alerts
Three alert conditions, each independently controllable:
Reversion Entry (R-LONG or R-SHORT)
Reversion Exit (R-EXIT)
Half-Life crosses Max Half-Life (regime change — reversion is becoming unreliable)
How to read it
Three reads, in order of conviction:
R-LONG / R-SHORT with very fast HL (e.g. HL = 4 bars on a 1H chart) — the script's intended high-conviction setup. The spread is stretched, the math says it will revert quickly, the chart agrees. This is the institutional setup.
Half-life crossing above max (alert) — regime warning. The instrument is shifting from mean-reverting to trending. Any open R-positions should be re-evaluated; new R-entries should be paused until HL re-tightens.
Sustained R-EXIT triggers from time-stop (max-hold) rather than from Z returning to neutral — the script is exiting because the trade ran out of time, not because the thesis played out. Recurring time-stop exits mean the current parameters do not fit the instrument.
The rolling backtest win-rate is your auditor. When it climbs, the engine is finding edge. When it grinds flat or declines, the regime has changed and the parameters need adjustment.
Suggested settings
Defaults (long EMA 50, Z lookback 100, regression window 120, max HL 20 bars, entry Z 2.0, exit Z 0.25) are tuned for 1H–4H on liquid markets where mean reversion is statistically meaningful. For lower timeframes drop everything proportionally (long EMA 25, Z 50, regression 60). For HTF raise everything (long EMA 100, Z 200, regression 200). The max HL is the most sensitive parameter — narrow it (10–15) for high-conviction-only filtering; widen it (25–30) for more frequent signals.
Originality / what's reused
The synthetic-pair Z-score construction is textbook stat-arb. The AR(1) half-life regression is published quantitative finance — the Ornstein–Uhlenbeck-process speed-of-reversion estimator. The implementation here — the dual-leg synthetic spread with optional log construction, the rolling Z-normalisation pipeline, the AR(1) regression with HL formula and min/max-HL gating, the entry/exit state machine with cooldown and max-hold, the rolling N-trade backtest tracker, and the minimal-mono institutional aesthetic — is JOAT-original. No third-party code reused. The script is a tribute to the Medallion-style approach, not a direct replication of any proprietary Renaissance Technologies code.
Limitations
The single-leg "synthetic pair" (price vs its own EMA) is a degenerate stat-arb construction by design — true stat-arb uses two genuinely co-integrated instruments. Pine's per-script symbol limitation makes a two-instrument cointegration construction impractical for a standalone indicator; this script captures the methodology of stat-arb (spread + Z + HL gate) on the single-instrument case. The HL estimate is statistical and needs the regression window populated; early bars give a warm-up read.
—
-made with passion by jackofalltrades
مؤشر

Bridgewater All-Weather [JOAT]BRIDGEWATER ALL-WEATHER
A tribute to Ray Dalio's All-Weather framework — the macro-regime engine that classifies the current environment along two orthogonal axes : growth (rising or falling) and inflation/volatility (rising or falling) — and maps the resulting quadrant to the asset class that historically performs best in that regime. Bridgewater All-Weather distils that idea into a Pine script: a quadrant classifier built on Z-scored growth and volatility proxies, a 2×2 mini-chart rendered on the chart itself, a regime-tinted background, a rotation-event label, and a Suggested-JOAT-Indicator row that names the best companion script for the current quadrant.
The four quadrants
Q1 — Growth UP, Vol DOWN — Risk-On / Equities regime. Blue.
Q2 — Growth UP, Vol UP — Inflation / Commodities regime. Gold.
Q3 — Growth DOWN, Vol DOWN — Disinflation / Bonds regime. Sage.
Q4 — Growth DOWN, Vol UP — Crisis / Gold regime. Pink.
The asset-class analogues are Dalio's institutional defaults; they can be toggled off if you want pure regime classification without the asset overlay.
Growth and Vol proxies
Macro frameworks need macro inputs. The script approximates the two factors purely from chart data so it runs on any instrument:
Growth proxy — long-window smoothed return (default 100-bar EMA-smoothed return). Z-scored against a long baseline (default 252 bars, the trading-year canonical).
Volatility proxy — rolling standard deviation of returns over the volatility window (default 100 bars). Z-scored against the same baseline.
A configurable Z dead-zone (default ±0.10) treats small Z values as neutral and refuses to register quadrant changes until the Z moves clearly off zero. This eliminates flicker between adjacent quadrants when the signal is genuinely uncertain.
Minimum-bars-hold filter
A quadrant must persist for at least N bars (default 3) before a rotation is committed. This prevents whipsaw classification when growth and volatility cross their respective zero lines on the same bar.
Mini 2D quadrant chart
The script's signature visual: a 2×2 grid rendered directly on the chart (anchored to any of four corners, with configurable cell size in bars and price-height in ATR units). The currently-active quadrant is highlighted in its quadrant colour; the other three are muted. At a glance you see the entire four-state regime classification mapped to its asset analogue. The four hues appear simultaneously only in the mini chart — by design — because elsewhere the script obeys strict one-active-quadrant colour discipline.
Visual system
Background tint by active quadrant (configurable transparency, default 92 institutional-subtle).
Quadrant badge — right-side floating label showing the active quadrant with its colour. Configurable corner.
Rotation label — drops a label on the chart every time the quadrant changes.
Mini 2D quadrant chart (the signature) — 2×2 grid in the chosen corner.
Hidden growth-Z and vol-Z line plots — for users who want to see the underlying scores in the Data Window or feed them to alerts. Off by default.
A locked Sapphire palette: one hue per quadrant (Q1 blue, Q2 gold, Q3 sage, Q4 pink). Because only one quadrant is active at a time, the chart only ever shows one family + the muted background. The strict 4-hue discipline only appears in the mini chart.
Suggested JOAT Indicator row
The dashboard exposes a Suggested Indicator row that names the best-fit companion from the JOAT suite per quadrant. Defaults:
Q1 (risk-on) → Quantum Trend Matrix (trend amplification in a benign environment).
Q2 (inflation) → Liquid Reversal Engine (mean-reversion bands in a volatile-up regime).
Q3 (disinflation) → Smart SR Zones (structure-focused reads in a calming environment).
Q4 (crisis) → Z-Score Flow Pro (extreme-statistics regime for risk-off conditions).
Every suggestion is user-configurable.
Dashboard
Monospaced table, positionable to any of nine corners, with optional row-gradient. Surfaces:
Active quadrant with asset analogue.
Growth Z value and direction.
Vol Z value and direction.
Bars in current quadrant.
Last rotation: from → to with bars-ago.
Suggested JOAT Indicator (toggleable).
Alerts
Three alert conditions, each independently controllable:
Any Quadrant Rotation
Entered Q4 (Risk-Off / Crisis) — the most actionable single alert; usually accompanies risk-off moves across asset classes.
Entered Q1 (Risk-On) — off by default; useful for trend-following entry timing.
How to read it
Three reads, in order of conviction:
Q4 entry — the highest-priority macro alert. Growth is falling and volatility is rising — historically the regime in which risk assets sell off, gold rallies, and defensive positioning wins. Reduce risk exposure regardless of the chart-timeframe signal.
Sustained Q1 — the trend amplifier. The market is in a healthy growth/calm environment; momentum tools have their largest edge. The mini chart visually confirms the regime.
Rotation between adjacent quadrants (e.g. Q1 → Q2 or Q3 → Q4) — regime-transition warning. The market is rotating along one of the two axes; this often precedes the larger directional move.
Suggested settings
Defaults (growth 100 / vol 100 / baseline 252 / dead-zone 0.10 / 3-bar hold) are calibrated to daily charts on broad indices. For lower timeframes drop windows proportionally. For weekly+ raise to 200 / 200 / 500. The dead-zone is the single most important anti-flicker input; widen if your instrument has noisy growth/vol behaviour.
Originality / what's reused
The All-Weather framework is Ray Dalio / Bridgewater Associates' published macro philosophy — a public conceptual framework, not proprietary code. The implementation here — the chart-data-only growth and volatility proxies, the Z-baseline normalisation with dead-zone gate, the minimum-bars-hold rotation filter, the 2×2 mini-chart render in chart units with ATR-scaled cell height, the per-quadrant single-hue palette discipline, the suggested-JOAT-indicator dashboard row, and the rotation-event label engine — is JOAT-original. No third-party code reused. The script is a tribute , not a direct replication of any proprietary Bridgewater model.
Limitations
The growth and volatility proxies are computed from chart data only — they are approximations, not the macroeconomic series an actual All-Weather portfolio uses. The Z-baseline assumes 252 bars approximates a trading year; on non-daily timeframes the interpretation shifts (e.g. on 1H, 252 bars is roughly 10 trading days). The quadrant classification is descriptive of recent chart behaviour, not of the broader macro environment — pair with macro context for serious portfolio decisions.
—
-made with passion by jackofalltrades
مؤشر

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

Boshmann's Volatility HistBoshmann's Volatility Hist
The theory behind tracking normalized volatility is that market movement is highly cyclical, constantly alternating between periods of tight contraction and explosive expansion. Using raw volatility measures (like a flat Average True Range value) is flawed because the meaning of those points changes drastically as an asset's price scales up or down over time. By applying a statistical Z-Score to the ATR, we normalize the volatility relative to the asset's own historical baseline, allowing traders to objectively identify when price action is anomalously quiet (predicting a breakout) or unsustainably aggressive (predicting exhaustion or mean-reversion).
How the Script Works: The script calculates a standard 14-period Average True Range (ATR) to measure current price movement. It then runs a 250-period lookback to compute the rolling mean and standard deviation of that ATR, ultimately calculating a real-time Z-Score. This Z-Score is plotted as an oscillating histogram below the chart. The script uses fixed thresholds to color the histogram bars: Green for "Quiet" (Z-score < -0.5), Yellow for "Normal" (Z-score between -0.5 and 0.5), and Red for "Volatile" (Z-score > 0.5). It also plots dotted threshold lines so you can instantly see when volatility crosses into extreme territory.
Why You Should Use It: This script is the final pillar of the Boshmann's suite, engineered to be used in strict combination with the Regime Counters and the Market Direction Hist .
While the Regime Counter gives you the structural trend and the Direction Hist gives you the momentum conviction, this Volatility Hist reveals the energy state of the market. You should use this indicator because knowing the market's speed dictates your risk management and strategy timing. For example, if you spot a long string of "Quiet" (green) volatility bars while the Regime Counter just flipped to Bullish, you have found an optimal, low-risk entry before an explosive breakout. Conversely, if you are riding a trend and this histogram spikes deep into the "Volatile" (red) zone, it serves as a mathematical warning that the market is overextended, signaling that you should tighten stops or take profits before the inevitable pullback. مؤشر

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

Entropy VZO [Alpha Extract]A sophisticated volume-flow and market-information oscillator that combines pressure-weighted volume, statistical normalization, directional entropy, fractal efficiency, Gaussian smoothing, and signal-line analysis into one complete momentum framework. Entropy VZO is designed to measure whether bullish or bearish price movement is supported by meaningful volume while adapting its sensitivity to the quality and organization of current market structure.
Unlike a conventional oscillator displayed in a separate pane, Entropy VZO projects its momentum structure directly onto price using an ATR-scaled anchor. This provides a clear overlay of volume momentum, signal direction, histogram expansion, threshold zones, and dynamic pulse activity without separating the analysis from the underlying chart.
🔶 Pressure-Weighted Volume Flow Engine
Calculates directional volume using a blend of candle pressure and source-price direction. Candle pressure measures the relationship between the candle body and its full range, while source direction determines whether price is advancing or declining.
candlePressure = (close - open) / priceRange
closePressure = ta.change(src) > 0 ? 1.0 : ta.change(src) < 0 ? -1.0 : 0.0
signedPressure = clamp(candlePressure * 0.65 + closePressure * 0.35, -1.0, 1.0)
signedVolume = volume * signedPressure
volumeBase = math.max(ta.ema(volume, vzoLength), 1.0)
vzo = 100.0 * ta.ema(signedVolume, vzoLength) / volumeBase
This produces a more detailed estimate of bullish and bearish participation than assigning all volume according to candle direction alone.
🔶 Normalized VZO Framework
Standardizes the raw VZO against its recent average and standard deviation. This allows the indicator to evaluate current volume pressure relative to the instrument’s own recent behaviour.
Positive readings indicate stronger-than-normal bullish volume flow, while negative readings represent stronger bearish pressure. Larger absolute readings show that the current volume imbalance is becoming increasingly unusual relative to its recent history.
🔶 Directional Entropy Analysis
Measures how evenly upward and downward price changes are distributed across the selected lookback period.
Low entropy indicates that price direction is more ordered and consistent. High entropy indicates a less predictable environment where upward and downward movements are more evenly balanced.
This allows the indicator to give greater weight to volume signals occurring during organized directional movement and reduce their influence during noisy or indecisive conditions.
🔶 Fractal Efficiency Framework
Evaluates how efficiently price has travelled between the beginning and end of the selected lookback relative to the total path taken.
High efficiency indicates that price is moving directly with limited back-and-forth movement. Low efficiency indicates a more irregular path with greater noise and weaker directional structure.
🔶 Information-Weighted Momentum Engine
Combines directional entropy and fractal efficiency into a unified information-quality weight. This weight adjusts the normalized VZO according to how organized and efficient the current market environment is.
informationWeight = clamp((1.0 - entropy) * 0.55 + efficiency * 0.45, 0.05, 1.0)
spectralInput = vzoZ * sensitivity * (0.65 + informationWeight)
fisherCore = tanhSafe(spectralInput) * maxLevel
Volume pressure receives greater emphasis when price movement is both directional and efficient. Signals are moderated when market structure becomes noisy, balanced, or fragmented.
🔶 Bounded Nonlinear Transformation
Applies a protected nonlinear transformation to compress extreme readings into a stable visual range.
This prevents isolated volume spikes from overwhelming the indicator while preserving momentum direction and relative strength. The result is a bounded oscillator centered around zero.
🔶 Gaussian Signal Polishing
Uses custom Gaussian-weighted smoothing to reduce short-term noise while preserving recent momentum information.
Separate smoothing stages are applied to the main oscillator and histogram. Traders can adjust these settings to make the indicator more responsive or more selective depending on their market and timeframe.
🔶 Bullish, Bearish & Neutral Regimes
Classifies the market into three momentum conditions:
• Bullish when the oscillator is above its signal and above zero
• Bearish when the oscillator is below its signal and below zero
• Neutral when momentum direction and zero-line position are not fully aligned
This dual-confirmation structure helps distinguish established directional momentum from weaker signal-line movements.
🔶 ATR-Scaled Price Projection
Projects the oscillator directly onto the price chart using an EMA-based anchor and an ATR-adjusted visual range.
The projection automatically adapts to current volatility, allowing the indicator to maintain a consistent appearance across different assets, prices, and timeframes. The Visual Height setting controls how widely the oscillator is displayed around its price anchor.
🔶 Soft & Hard Momentum Zones
Displays configurable soft and hard momentum thresholds above and below the central price anchor.
Soft levels highlight developing momentum extremes, while hard levels identify stronger volume-flow displacement. These areas provide context for momentum intensity rather than acting as automatic reversal signals.
🔶 Dynamic Pulse Band
Displays a smoothed measure of absolute oscillator strength around the price anchor.
The pulse band expands as momentum intensity increases and contracts when momentum weakens. Its color follows the active regime, creating a visual representation of both directional bias and momentum amplitude.
🔶 Momentum Histogram
Measures the difference between the main oscillator and its signal line to show whether momentum is expanding or contracting.
Bright bullish readings indicate strengthening positive momentum, while faded bullish readings indicate that positive momentum is slowing. Bright bearish readings represent strengthening negative momentum, while faded bearish readings show bearish pressure losing force.
🔶 Signal Ribbon & Glow Architecture
Plots the main Entropy VZO line with a layered glow and an optional ribbon between the oscillator and signal line.
The ribbon changes color according to the active bullish, bearish, or neutral regime. This makes momentum alignment, crossovers, and transition periods easier to identify while maintaining chart readability.
🔶 Dynamic Candle Coloring
Optionally colors OHLC candles according to the current oscillator regime.
Bullish coloring appears when the oscillator is above both its signal and zero. Bearish coloring appears when it is below both references. Neutral coloring identifies mixed, transitional, or weakly confirmed conditions.
🔶 Real-Time Status Dashboard
Features a compact dashboard displaying the indicator’s most important information:
• Current bullish, bearish, or neutral regime
• Main oscillator value
• Normalized VZO Z-score
• Directional entropy percentage
• Fractal efficiency percentage
• Current volume relative to its EMA baseline
This provides an immediate overview of momentum direction, volume abnormality, market organization, directional efficiency, and participation strength.
🔶 Comprehensive Alert System
Includes alerts for the indicator’s primary momentum events:
• Entropy VZO Bull Swing
• Entropy VZO Bear Swing
• Entropy VZO Bull Trend
• Entropy VZO Bear Trend
Swing alerts trigger when the oscillator crosses its signal line. Trend alerts trigger when the oscillator crosses the zero level, allowing traders to monitor both early momentum shifts and broader directional transitions.
🔶 Why Choose Entropy VZO ?
Entropy VZO expands traditional volume-flow analysis by combining pressure-weighted volume, statistical normalization, directional entropy, and fractal efficiency within one adaptive momentum framework. Instead of treating every increase in volume equally, the system evaluates whether that participation is occurring inside an organized and efficient market environment.
The oscillator and signal line identify direction, the histogram measures momentum expansion, the pulse band displays intensity, and the soft and hard zones provide context for elevated readings. Its ATR-scaled projection keeps the complete framework connected directly to price, while the live dashboard provides fast insight into volume flow, entropy, efficiency, and the active regime.
Perfect for momentum traders, swing traders, trend-following traders, and systematic analysts who want a cleaner way to determine whether directional price movement is supported by meaningful and structurally efficient volume flow. مؤشر

Orderflow Imbalance Pressure [JOAT]Orderflow Imbalance Pressure
Introduction
Orderflow Imbalance Pressure is an open-source indicator that estimates the imbalance between buying and selling pressure on each bar without access to real bid-ask data, derives a Z-score normalized delta oscillator from that estimate, tracks cumulative delta over the session, and detects structural divergences between price extremes and delta behavior at confirmed pivot points.
The core analytical insight is that when price reaches a new high while the cumulative buying pressure behind it is declining, the move is potentially unsupported — buyers are diminishing while the market is being pushed to new levels. Conversely, price making new lows while selling pressure contracts suggests exhaustion rather than conviction. These divergences are objectively measurable and provide leading context that price action alone does not.
Core Concepts
1. Delta Estimation from OHLC
True tick-level delta (bid volume minus ask volume) requires raw tick data. This indicator estimates it from bar data using the classic candle ratio method: buying pressure is proportional to how close the close is to the high, and selling pressure to how close it is to the low:
float buyVol = rng > 0.0 ? volume * (close - low) / rng : volume * 0.5
float sellVol = rng > 0.0 ? volume * (high - close) / rng : volume * 0.5
float delta = buyVol - sellVol
This is an approximation — not a substitute for real order flow data — but provides a directionally useful signal on instruments where tick data is unavailable.
2. Delta Z-Score Normalization
Raw delta varies in scale across instruments and volume conditions. The indicator normalizes delta by computing a rolling Z-score: the delta minus its period mean, divided by its period standard deviation. This produces a dimensionless oscillator centered at zero:
float deltaZ = deltaStd > 0.0 ? (delta - deltaMA) / deltaStd : 0.0
Extreme Z-score readings above +1.5 or below -1.5 indicate statistically significant delta imbalances relative to recent history.
3. Cumulative Delta
Delta values are accumulated across the session to track the net buying or selling bias since session open. The cumulative delta line is scaled and overlaid on the histogram for context. Session resets are configurable (None, Session, or Manual). The cumulative delta often reveals sustained institutional bias that individual bar delta obscures.
4. Imbalance Threshold Markers
When the delta ratio (delta divided by total volume) exceeds a configurable threshold (default 0.6 = 60% of volume in one direction), the bar is classified as an extreme imbalance. Triangle markers appear at these bars and the background is lightly tinted. Extreme imbalance bars often mark exhaustion points or momentum bursts.
5. Pivot-Confirmed Divergence Detection
Divergences are detected using confirmed structural pivots rather than rolling high/low lookbacks. A bullish divergence requires a confirmed pivot low that is lower than the prior confirmed pivot low, while the cumulative delta at that pivot is higher than at the prior one. This fires a signal only at genuine structural turning points — typically 5–10 signals per extended chart rather than hundreds:
if not na(pivotLow)
float dAtPivot = cumDelta
if pivotLow < lastPivLow and dAtPivot > lastPivLowDelta
bullDiv := true
Features
OHLC-based delta estimation: Buy and sell volume proxy from candle structure
Z-score normalized oscillator: Delta normalized by rolling mean and standard deviation
Gradient histogram: Bars colored by delta direction and magnitude intensity
Cumulative delta overlay: Net session delta as a scaled line on the oscillator
Session reset modes: None, Session boundary, or Manual reset options
Extreme imbalance markers: Triangle shapes at bars exceeding the delta ratio threshold
Pivot-confirmed divergences: Bull and bear divergences fired only at structural pivot points
Dashboard: Current delta, bias, buy volume, sell volume, cumulative delta, and Z-score
Six alert conditions: Bull/bear imbalance, bull/bear divergence, delta surge bull/bear
Input Parameters
Delta Engine:
Delta Smoothing EMA: Smoothing for delta oscillator line (default: 3)
Delta Normalization Length: Z-score rolling window (default: 20)
Imbalance Threshold: Delta ratio required for extreme marker (default: 0.6)
Cumulative Delta:
Show Cumulative Delta toggle
Reset Mode: None, Session, or Manual (default: Session)
Cumulative EMA Smooth: Smoothing for cumulative line (default: 5)
Signal Settings:
Delta Divergence Signal toggle
Divergence Lookback: Base period for pivot divergence detection (default: 20)
How to Use This Indicator
Step 1: Read the Delta Bias
Check the dashboard's Bias row. BUYING PRESSURE, SELLING PRESSURE, or BALANCED reflects the current delta ratio. Use this to understand whether the current bar's volume is dominated by buyers or sellers.
Step 2: Watch the Cumulative Delta Trend
A rising cumulative delta line during a price advance confirms the move is volume-supported. Declining cumulative delta during a price advance is a warning sign that buyers are weakening.
Step 3: Act on Divergence Signals
When a DIV label appears (bullish or bearish), a confirmed structural pivot has formed with a diverging cumulative delta. This is the primary signal output of the indicator — use it to anticipate potential turning points in price.
Step 4: Note Extreme Imbalance Bars
The triangle markers at extreme imbalance bars often coincide with momentum exhaustion (after a sustained run) or momentum ignition (at a breakout). Context determines which interpretation applies.
Indicator Limitations
OHLC delta estimation is a proxy; it does not capture true bid-ask imbalance and will systematically differ from actual order flow data
On instruments with wide spreads or gaps, the candle ratio delta estimation becomes less reliable
Divergences in strong trends often resolve with further trend continuation before the divergence is acted upon
Cumulative delta resets at session boundaries, so intraday and multi-day comparisons require switching reset modes
Originality Statement
The combination of OHLC delta estimation, Z-score normalization, cumulative session delta with configurable resets, and pivot-confirmed divergence detection — requiring structural pivot confirmation rather than rolling lookback extremes — in a single publication is the original contribution. The pivot-gated divergence detection specifically prevents the signal spam common in delta divergence tools that use rolling high/low comparisons.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Delta estimation from OHLC data is an approximation. All signals are based on historical data and do not guarantee future results. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
مؤشر

مؤشر

Entropic Structure Bands [JOAT]Entropic Structure Bands
Introduction
Entropic Structure Bands is an open-source overlay indicator that dynamically selects the best-fitting Ordinary Least Squares regression window from recent structural pivots and surrounds that regression channel with entropy-adjusted deviation bands. The key innovation over standard regression channel indicators is twofold: the window length is selected optimally each bar by searching through available pivot anchors for the highest R² × log(N) quality score, and the band width is modulated by the current Shannon entropy of log returns — widening during chaotic periods and tightening during orderly ones.
Core Concepts
1. Optimal Regression Window Search
Rather than using a fixed lookback, the indicator records the bar index of every confirmed pivot high and low. Each bar, it tests several candidate windows anchored at recent pivots and selects the one that maximizes a performance score: R² multiplied by the natural log of the window length. This rewards both fit quality and window depth simultaneously:
float score = r2 * math.log(float(N))
// highest score wins; window updates every bar
if trial.perfScore > bestScore
bestScore := trial.perfScore
bestMdl := trial
The regression channel therefore adapts to where significant price structure has occurred, not to an arbitrary fixed period.
2. Shannon Entropy Modulation
Shannon entropy of the log return distribution is computed using a histogram-binning approach. Low entropy means returns are concentrated — price is moving in an organized, directional way. High entropy means returns are evenly distributed — chaotic, noisy conditions. Band width scales with entropy:
float entAdjDev = bestMdl.stdErr * (1.0 + entNorm * 0.8)
When entropy is low (below the configurable threshold), the market is classified as orderly and signals are enabled. This prevents signals from firing into chaotic conditions where regression bands have less predictive value.
3. Trend-Confluence Signal Logic
Signals require simultaneous alignment of six conditions: regression slope direction, price position relative to midline, recent pullback to the inner band, momentum confirmation, optional HTF slope alignment, optional ADX trending gate, and optional RSI gate. Each condition is individually toggleable. This multi-factor gate replaces simple band-crossover logic with a structured confluence requirement.
4. Forward Projection
The regression channel extends forward by a configurable number of bars beyond the right edge of the chart. A projection target label marks the estimated price at the end of the projection window based on the current slope and intercept. This gives visual context for where the regression model expects price to be if the current trend continues.
5. Z-Score Candle Coloring
Each candle's position within the channel is expressed as a Z-score (standard deviations from the regression midline). Candles far above the midline (overbought extension) are tinted bear-color; candles far below (oversold extension) are tinted bull-color. This provides immediate visual context for where price stands within its current regression structure.
Features
Dynamic regression window: Optimal window selected each bar from pivot anchor scan
R² quality gate: Configurable minimum R² prevents low-fit windows from being used
Entropy-adjusted bands: Band width scales with Shannon entropy of log returns
Multi-factor signal gate: Six independently configurable confluence conditions
Forward projection: Channel extended beyond right edge with target label
Z-score candle coloring: Candles painted by standard deviation position in channel
Inner and outer bands (±1σ, ±2σ): Gradient-filled channel layers
Glow-effect midline: Double-drawn center line with transparency for depth
10-row dashboard: R², entropy, Z-score, duration, HTF alignment, ADX, RSI, signal state
JSON webhook alerts: Alert messages formatted as JSON with EP, TP, SL, and R²
Input Parameters
Regression Engine:
Pivot Scan Horizon: Number of pivots to evaluate as regression anchors (default: 20)
Pivot Sensitivity: Left/right bars for pivot confirmation (default: 5)
Min R² Quality Gate: Minimum fit quality to use a window (default: 0.50)
Band Multiplier 1/2: Inner and outer band standard deviation multiples (default: 1.0, 2.0)
Entropy System:
Entropy Lookback: Bars for entropy calculation (default: 20)
Entropy Bins: Histogram bins for return distribution (default: 10)
Low Entropy Threshold: Threshold below which market is classified as orderly (default: 2.5)
How to Use This Indicator
Step 1: Read the Slope Bias
Check the dashboard's Slope Bias row. BULLISH or BEARISH indicates the current regression direction. This is the primary directional input.
Step 2: Check Entropy State
LOW (orderly) entropy is the condition under which signals are most reliable. HIGH entropy warns that the regression model is operating in a chaotic environment.
Step 3: Wait for Signal Labels
LONG and SHORT labels appear only when the full confluence gate is satisfied. Each label shows entry price, TP1, TP2, stop loss, and R² quality.
Indicator Limitations
Regression channels repaint historically when the optimal window shifts to a new anchor; use the confirmed-bar signals for non-repainting entry logic
In markets with very few pivots, the scan horizon may find suboptimal windows with low R²
Shannon entropy requires sufficient lookback to produce stable estimates
Originality Statement
The dynamic pivot-anchored regression window search using R² × log(N) scoring, combined with Shannon entropy-modulated band width and a six-condition confluence signal gate, is the original analytical architecture of this publication. No existing published Pine Script regression channel indicator implements adaptive window selection from pivot anchors with entropy modulation in this manner.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regression channels are mathematical models of past price behavior and do not predict future price. Trading involves substantial risk of loss.
-Made with passion by jackofalltrades
مؤشر

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

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

SAR/ATR Trend-Extension OscillatorSAR/ATR Trend-Extension Oscillator
WHAT THIS INDICATOR IS
The SAR/ATR Trend-Extension Oscillator measures, in a single line, how far price has stretched away from its Parabolic SAR trailing reference, and it expresses that distance in units of volatility rather than raw price. The output is a signed oscillator: it rises into positive (green) territory as an uptrend extends and falls into negative (red) territory as a downtrend extends. The further the value sits from the zero line, the more stretched the current move is relative to its own recent volatility.
It is built as ONE coherent reading. Parabolic SAR and Average True Range (ATR) are not plotted side by side; they are fused mathematically into the oscillator value. Three further elements - a rolling statistical standardization, an ADX regime filter and a higher-timeframe trend filter - qualify and contextualize that value rather than adding separate indicators to the pane.
WHY THESE COMPONENTS ARE COMBINED (and how they work together)
Each ingredient is included to solve a specific weakness of the one before it.
1) Parabolic SAR provides trend direction and a trailing stop level, but on its own it only tells you which side of the trend you are on. The raw gap between price and SAR is measured in price points, which cannot be compared between a low-priced stock and a high-valued index, or between a quiet and a volatile session. So SAR alone cannot answer "how stretched is this move."
2) ATR answers that. By dividing the SAR-to-price gap by ATR, the distance becomes volatility-relative: "price is X average true ranges beyond its SAR." This SAR-divided-by-ATR step is the core of the indicator and produces information that neither Parabolic SAR nor ATR shows alone - a bounded, cross-market measure of trend extension that reads consistently across symbols and timeframes.
3) Rolling standardization (Z-Score, or robust median/MAD) fixes a subtler problem: even an ATR-normalized value has a distribution that drifts over time, so one fixed threshold means different things in different conditions. Standardizing the value over a lookback window rescales it so the +/-2 and +/-3 reference levels keep a stable statistical meaning. A "Raw" mode (the plain volatility-normalized value, no rescaling) is also available.
4) ADX regime filter. Parabolic SAR is prone to repeated false flips in sideways markets. ADX measures trend strength, so the indicator suppresses buy/sell flags whenever ADX is below a user threshold (a ranging market) and shades the background to show it. ADX is never drawn on the oscillator; it only gates the signals.
5) Higher-timeframe filter. The same SAR direction is read from a higher, confirmed timeframe and used to filter out crossings that fight the dominant trend. It is the identical calculation applied to a larger context, not a different indicator.
6) Divergence. Because the oscillator is a measure of trend extension, a price high paired with a lower oscillator high (or a price low paired with a higher oscillator low) indicates the trend is extending less forcefully. Regular and hidden divergences are detected from confirmed pivots and drawn with connecting lines and labels.
Putting it together, the plotted value is one number: sign(SAR trend) x (SAR-to-price gap / ATR), optionally standardized and clamped to limit single-bar spikes.
A buy or sell flag is raised only when that oscillator crosses the Signal level AND the ADX regime AND the higher-timeframe direction agree. Everything feeds one question: is price extending, in a genuine trend, in line with the larger trend?
WHAT MAKES IT ORIGINAL
This is not Parabolic SAR with an ATR drawn next to it. It transforms the SAR trailing stop into a continuous, signed, volatility-normalized and statistically standardized extension oscillator, then wraps that single value in regime and higher-timeframe gating plus divergence logic. The resulting "how stretched is this trend, on a comparable scale" reading does not exist in either source indicator.
HOW TO USE IT
- Choose a normalization mode: Raw, Z-Score, or Robust (median/MAD, least sensitive to spikes).
- Read color and distance: green = uptrend extension, red = downtrend extension; the further from zero, the more extended. The Signal, Warning and Extreme levels mark progressively stretched zones.
- Treat the triangle markers (a Signal-level cross that agrees with the ADX regime and the higher-timeframe bias) as points to investigate, not as automatic entries.
- Use divergences as early warning that extension is fading, and the on-pane dashboard for trend, regime, higher-timeframe bias and ATR-based stop/target context. The stop and target figures are reference levels only.
- All parameters - SAR step and maximum, ATR period and smoothing type, the standardization window, every threshold, the ADX threshold and the higher timeframe - are adjustable.
REPAINTING
Signals confirm on bar close by default and do not repaint. The higher-timeframe filter reads the previous closed higher-timeframe bar, so it does not look ahead. Divergence labels appear a few bars after the pivot they confirm; that lag is inherent to honest pivot detection and is expected behavior.
ATTRIBUTION
This implementation builds on the original concept of combining Parabolic SAR with ATR. The volatility normalization, statistical standardization, regime and higher-timeframe filtering, divergence detection and alerting described above are part of this independent implementation.
DISCLAIMER
This script is provided for research and educational purposes only. It is not financial advice and makes no guarantee of profitability or accuracy. Indicators describe past and present price behavior; they do not predict future prices, and no indicator works in all conditions. Trading involves substantial risk of loss. Always test on historical and out-of-sample data and make your own independent decisions. The author accepts no liability for any use of this script.
مؤشر

Tidal Divergence [JOAT]Tidal Divergence
Tidal Divergence is a composite divergence detector that lives in a sub-pane and projects high-conviction divergence visuals onto the price chart. The composite blends three volume-based oscillators — Money Flow Index, percentile-ranked Cumulative Volume Delta, and z-scored OBV rate-of-change — into a single normalized stream. Both regular and hidden divergences are detected. Persistent zones are drawn at divergence pivots, and zone mitigation is tracked with body / wick / rejection modes.
What makes it different
Single-oscillator divergence indicators give a single perspective. Tidal Divergence's composite triangulates three independent volume-derived oscillators so a divergence in the composite is supported by three volume readings instead of one.
Hidden divergences (continuation pattern: price higher low plus oscillator lower low for bull) are detected separately from regular divergences (reversal pattern), with distinct line styles on the price chart.
Each detected divergence creates a persistent demand or supply zone with optional FVG-confluence gating, dynamic alpha-by-age (zones fade as they age), and explicit mitigation logic (body / wick / two-close rejection variants).
A composite percentile envelope (5th to 95th percentile of the last 200 bars) is drawn behind the oscillator so absolute readings are easy to interpret in context.
How it works
MFI(14), daily-reset CVD then ta.percentrank(cvd, 100), OBV ROC z-score over a 20-bar mean / stdev. Three legs, each normalized to roughly the same scale.
Composite equals 0.40 times the normalized MFI plus 0.35 times the normalized CVD percentile plus 0.25 times the clamped OBV ROC z. Hull-smoothed and scaled to centi-percent.
Pivots are detected on the composite stream. A regular bull divergence requires a price lower low paired with a composite higher low within a 5-to-60-bar window. Hidden bull requires a price higher low plus composite lower low. Bear variants invert the conditions.
At each divergence pivot, two horizontal lines are drawn (edge equals lowest wick / highest wick. base equals lowest body / highest body), with a linefill between them, on the price chart via force_overlay=true.
Zone mitigation: body mode (close beyond edge) or wick mode (high/low beyond edge), optionally with two-close rejection requirement.
Optional FVG confluence requires a recent 3-bar Fair Value Gap before firing the divergence-final alert.
Reading the chart
In-pane : composite line tinted by direction with a smoothed signal line, gradient ribbon between them, breath-modulated zero midline, plus and minus 70 overbought / oversold thresholds, and the percentile envelope as an atmospheric backdrop.
In-pane divergence markers : regular divergences as solid connector plots, hidden divergences as broken (dashed-equivalent) connectors.
Cross-pane : price-to-price divergence connector lines on the price chart (regular solid, hidden dashed). Each line has a small REG BULL DIV 4520.50 or HID BEAR DIV label at the current pivot.
Cross-pane zone fills with age-graded transparency.
Zone edge price labels follow the right edge of each active zone.
Mitigation flash labels print at the bar where a zone is broken.
A cross-pane composite tint paints a soft mint / red background when the composite is clearly above or below plus or minus 30.
Signals
Regular bullish / bearish divergence
Hidden bullish / bearish divergence (continuation)
Bull / bear zone touch
Bull / bear zone mitigated
Bull / bear stack (three or more active zones plus a fresh regular divergence)
Bull / bear streak (composite above / below zero for N consecutive bars)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
MFI : MFI length.
Divergence : pivot lookback left / right, detect hidden divergences toggle.
Zones : zone extreme length, max zone age, mitigation mode, allow-rejection toggle.
FVG Confluence : require FVG, FVG lookback bars.
Visual : bullish / bearish colors.
Cross-pane Visuals : divergence lines, divergence labels, zone edge labels, composite tint.
Dashboard : position, size.
How traders use this
Reversal entries : a regular bull divergence with the composite leaving an oversold extreme is a high-quality long setup, especially when accompanied by an FVG below the divergence price.
Continuation entries : a hidden bull divergence during a clearly trending bull regime is a structurally supported add-on entry on a pullback.
Zone trades : after a divergence prints, treat its zone as an active demand or supply level. Reactions to the zone (touch with rejection candles) are tradable. Mitigation invalidates the level.
Composite filter : only trade with the composite in agreement (composite above 0 for longs). The cross-pane tint helps you stay aligned without checking the pane.
Limitations
Divergence detection inherently lags the actual extreme by the right-pivot window.
Composite values are smoothed and need warm-up bars before they stabilize.
Cumulative Volume Delta is a tick-volume proxy, not true level-2 order flow.
A divergence is a probability, not a guarantee. Many divergences fail before completing their implied reversal.
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol with volume data. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
14-bar MFI, 14-left / 5-right pivot, body mitigation, FVG confluence off by default, mint / red palette, top-right medium dashboard. Enable FVG confluence to filter for higher-quality setups.
مؤشر

Quantum Flux Bands [JOAT]Quantum Flux Bands
Quantum Flux Bands is an institutional-style regime detector. It stationarizes the price series via Fixed-Window Fractional Differentiation (FFD), runs a classical CUSUM change-point test on the stationarized stream, and draws a baseline that snaps to a new price level on every confirmed regime shift. Around the baseline, three percentile envelopes (50%, 68%, 90%) are drawn and modulated by a windowed Shannon entropy estimator so the bands narrow in low-noise regimes and widen in high-noise regimes.
What makes it different
Most regime filters hard-code a differentiation order (typically the first difference). FFD takes a real-valued differentiation order d between 0 and 1, retaining long-memory while making the series statistically stationary. This script chooses d adaptively from a rolling Hurst estimate so it responds to the market's persistence regime instead of being a fixed magic number.
The CUSUM trigger is fed by FFD-stationarized values, not raw returns. This reduces baseline whipsaws in trending markets that violate stationarity assumptions of classical CUSUM.
The bands are entropy-weighted. When the local windowed Shannon entropy is high (low signal-to-noise) the bands expand. When entropy is low (clean regime) they contract. The bands lock at the moment of a confirmed regime shift so they describe the regime under which the baseline was established.
How it works
A two-point Hurst estimator (rescaled-range over short and long windows) drives an adaptive differentiation order d in the range 0.30 to 0.90.
FFD weights are recomputed only when d drifts by more than 0.05 from its cached value. Caching keeps per-bar work near zero.
FFD weights are applied to a sliding window of close prices to produce a stationarized series.
Classical CUSUM tracks cumulative positive and negative deviations of the stationarized series from a running baseline reference, with user-configurable drift and threshold parameters.
When CUSUM exceeds the threshold, the baseline snaps to the current close and the trend state is set to bull or bear.
Inner, mid, and outer envelopes are drawn from percentile_linear_interpolation of the absolute distance between close and baseline, multiplied by an entropy modulator.
A bull probability is computed from the Abramowitz and Stegun standard-normal CDF on the signed band-distance and surfaced as a numeric label.
Reading the chart
Baseline line tinted purple in bull regimes, cyan in bear regimes, muted in neutral.
Six percentile band lines (upper and lower inner, mid, outer) with three pairs of atmospheric gradient fills calibrated so candles remain readable through every layer.
Optional iridescent candle recolor scales tint by signed regime score.
A probability label at the right edge of the chart shows the live bull probability.
Seven right-edge price labels, one per envelope level plus baseline, each sit at their own price.
Regime-shift timeline labels record every confirmed regime change with its baseline price and bull probability at the time of the shift.
A 21-segment vertical strength gauge at the right edge maps the continuous regime strength score onto a bull / bear / neutral scale, with a dashed sight-line drawing the gauge level back into the chart.
A short forward probability cone: two dashed segments at outer band levels with opacity scaled by class probability.
Signals
Bull / bear regime entry (CUSUM trigger with direction)
Outer band touch
Outer band rejection (wick pierces the outer band but the body closes back inside)
Baseline reclaim (close re-crosses the baseline)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
Fractional Differentiation : FFD window length.
CUSUM : volatility period, drift parameter, threshold parameter.
Regime : Hurst short / long lookbacks, entropy window / bins / z-score length.
Bands : percentile lookback.
Visual : bullish, bearish, quantum purple, quantum cyan colors. Band visibility toggles. Iridescent candles. Regime pulse. Probability label.
Labels : right-edge level labels, regime timeline (offset off candle wicks by ATR), baseline reclaim markers (direction-sensitive Y offset, configurable minimum-bar spacing), band touch and rejection labels (configurable minimum-bar spacing per type), strength gauge, sight-line needle, probability cone, FFD memory label, entropy state strip.
Dashboard : position, size.
How traders use this
Mean-reversion fades from outer-band touches inside a stable regime (Hurst mean-reverting, low entropy z) are statistically supported setups.
Regime-shift entries : when the baseline snaps and the trend turns, the first inner-band retest is a higher-quality continuation entry than chasing the breakout bar.
Probability filter : use the bull probability label as a confidence multiplier for other systems. Below 30% or above 70% are the actionable zones.
Entropy context : high entropy z (band-multiplier expanded) is a low conviction, wider stops warning. Low entropy z (bands tight) is a high conviction, tighter stops green light.
Limitations
Fractional differentiation is a smoothing and filtering tool. It cannot create information that is not already in the price series.
CUSUM, like any change-point detector, lags real-time tops and bottoms. It is calibrated to balance whipsaw against responsiveness.
The two-point Hurst estimator is a fast approximation. For long-horizon classification it agrees with the full R/S statistic. For very short windows it is noisier.
Past regime persistence does not guarantee future regime persistence.
Compatibility
Pine Script v6 open-source indicator. Any symbol, any timeframe (longer timeframes give the FFD window more meaningful history). No external request.security calls. Non-repainting: regime shifts are committed on confirmed bars and baseline values are not retroactively rewritten.
Defaults
Mint and red bullish / bearish defaults. Purple and cyan quantum accents. Top-right medium dashboard. All on-chart visualizations on. Increase the FFD window for very high timeframes (daily and above) and decrease the percentile lookback for fast intraday charts.
Credits
Fractional differentiation methodology popularized by López de Prado, Advances in Financial Machine Learning (2018).
CUSUM change-point test as published by E. S. Page, Biometrika (1954).
Standard-normal CDF approximation per Abramowitz and Stegun (1964).
مؤشر

Iridescent Helix [JOAT]Iridescent Helix
Iridescent Helix is a composite momentum oscillator that lives in a sub-pane and projects cross-pane visuals onto the price chart. The composite blends three orthogonal momentum legs into a single normalized score in the range -100 to +100. Above the math, it adds a layered iridescent ribbon, a breath-opacity histogram, gradient overbought / oversold zones, cross-pane iridescent candle recoloring, and an in-pane pivot divergence engine.
What makes it different
The composite blends three independent momentum lenses: a volume-weighted-median price distance, a Connors-style triple RSI, and a clamped volume Z-score. Smoothed with a Hull Moving Average to reduce phase lag while preserving sensitivity.
The visual stack uses seven plot layers per direction, hue-rotated through the bull or bear accent gradient, each layer at a different transparency and linewidth, producing a depth effect that single-color ribbons cannot match.
A breath-opacity histogram fades columns when momentum is decelerating and brightens them when momentum is accelerating, giving an at-a-glance read of momentum derivative.
An in-pane pivot divergence engine detects regular and hidden divergences and projects both as in-pane markers and as price-to-price connector lines on the price chart.
How it works
Volume-weighted median over a rolling window. Sort close prices ascending, accumulate volumes in that order. The price at which cumulative volume crosses half of total volume is the weighted median.
Composite equals 0.50 times the normalized distance from the volume-weighted median, plus 0.35 times the normalized Connors RSI, plus 0.15 times the clamped volume Z.
Hull-smoothed and scaled to centi-percent, clamped to the range -100 to +100. EMA(21) signal line drawn alongside.
Pivot divergence detection compares price pivots against composite pivots, gated to a 5-to-60-bar window between successive pivots.
Right-edge labels in the pane (composite, signal, volume Z) and on the price chart (cross-pane regime status).
Reading the chart
In-pane : seven-layer iridescent ribbon, breath-opacity histogram, volume-modulated zero line, overbought / oversold guide lines with gradient fills when the composite breaches them, composite-to-signal ribbon fill.
Cross-pane : iridescent candle recolor on price, divergence connector lines between price pivots, subtle reversal dots at extreme reversal closes, soft regime tint background when the composite is clearly above or below zero.
Right-edge label cluster : the pane shows current composite (with percentile rank), signal line, and volume Z. The price chart shows a single IRH summary label with composite value, percentile, and regime tag.
A right-edge state block lists current regime, zone (overbought, oversold, neutral), and bars since the last zero cross.
Signals
Bull / bear zero cross (composite re-crosses zero)
Overbought / oversold reversal (composite crosses back from an extreme)
Volume surge (volume Z above two)
Momentum acceleration / deceleration above a user-tunable threshold
Regular and hidden divergence detection (bull / bear pairs)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
Composite : VW median length, volume Z length, overbought / oversold levels, divergence lookback, percentile envelope length.
Visual : bullish / bearish / accent / magenta colors, toggles for ribbon, histogram, iridescent candles, cross-pane reversal dots, divergence dots, percentile envelope, cross-pane regime tint.
Labels : pane right-edge cluster, pane state block, cross-pane IRH label, divergence lines, divergence labels, OB/OS event labels, zero-cross events, acceleration events.
Dashboard : position, size.
Alerts : acceleration magnitude threshold.
How traders use this
Trend continuation : open positions in the direction of the composite when it crosses zero from the appropriate side and the volume Z confirms.
Reversion plays : take fades when the composite reaches an extreme zone and momentum begins decelerating (histogram fades), particularly when supported by a regular divergence connector on the price chart.
Hidden divergence : in a clear trend, a hidden divergence is a continuation signal and can be used to add to existing positions on a pullback.
Cross-system confirmation : feed the composite into other JOAT scripts (for example Position Architect) as a signal source by connecting plots in the chart UI.
Limitations
The composite is a normalized smoothed reading, not a leading indicator. It quantifies present momentum strength and direction rather than predicting future direction.
Connors RSI and volume Z need warm-up bars before they stabilize.
Pivot divergence detection inherits the right-bar delay of pivot identification (the pivot is only confirmed several bars after the actual extreme).
HMA smoothing introduces a few bars of warm-up where the composite is unavailable.
Compatibility
Pine Script v6 open-source indicator (pane). Any symbol, any timeframe. Cross-pane elements use force_overlay=true. No request.security calls. Non-repainting (divergence pivots are confirmed-bar gated).
Defaults
Mint and red defaults, plus cyan (bull accent) and magenta (bear accent) hue-rotation targets. Top-right medium dashboard. All visualizations on. For fast intraday work, shorten the VW median length and the divergence lookback.
مؤشر

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

مؤشر

Volatility Cluster Pressure [JOAT]Volatility Cluster Pressure
Introduction
Volatility Cluster Pressure tracks EWMA variance, realized volatility, vol-of-vol, jump intensity, compression, expansion, and unstable cluster states.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. EWMA Variance
A recursive lambda model emphasizes recent returns while retaining volatility memory.
2. Volatility Rank
EWMA volatility is ranked within a historical window.
3. Jump Intensity
Absolute return deviations identify abnormal movement relative to recent behavior.
4. Pressure Rails
Volatility and instability expand adaptive pressure rails around price.
ewmaVar := lambda * ewmaVar + (1 - lambda) * logRet * logRet
Features
EWMA/GARCH-style variance pressure
Volatility rank and vol-of-vol
Jump z-score
Compression, expansion, and unstable states
Adaptive pressure rails and HUD
Input Parameters
Cluster window and EWMA lambda
Cluster pressure and compression gates
Cooldown
Rails, candles, and HUD toggles
HUD position selector
How to Use This Script
Use VCP to understand volatility conditions before interpreting signals. Compression, expansion, and unstable states describe risk environment.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
VCP is original in combining recursive variance, vol rank, jump pressure, instability, and adaptive rails.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
مؤشر

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

Gatev Relative Value Arbiter [JOAT]Gatev Relative Value Arbiter
Introduction
Gatev Relative Value Arbiter studies relative value between the chart symbol and a selected peer using beta spread, z-score, stationarity, Kalman residuals, and OU speed.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Rolling Beta Spread
The chart log price is modeled against the peer log price with rolling beta and alpha.
2. Spread Z-Score
Residual spread is normalized to identify cheap and rich dislocations.
3. Kalman Residual
A recursive residual estimate adapts to changing pair behavior.
4. Stationarity and OU Speed
Correlation, beta drift, skew, kurtosis, and OU-style speed grade pair quality.
spread = logChart - (alpha + beta * logPeer)
Features
Peer relative-value model
Rolling beta and spread z-score
Kalman residual z-score
Stationarity and cointegration energy proxies
Cheap, rich, prime, broken, and fair-value states
Input Parameters
Peer symbol
Rolling beta and z-score lengths
Entry and exit z thresholds
Minimum correlation
Cooldown and display toggles
How to Use This Script
Choose a logically related peer. Cheap and rich states are most meaningful when pair validity and stationarity remain acceptable.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
GRA is original in combining rolling beta arbitrage logic, Kalman residuals, OU speed, and stationarity grading.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
مؤشر

Veyra Delta Lens [JOAT]Veyra Delta Lens
Introduction
Veyra Delta Lens estimates delta pressure from OHLCV data and converts it into auction pressure, CVD z-score, participation entropy, absorption, and pressure-shift events.
This open-source indicator is designed as a context tool, not a standalone trading system. It focuses on explaining the current market state with restrained visuals and confirmed-bar logic where signals are used.
Core Concepts
1. Signed Volume Pressure
Candle close location and body impact estimate directional volume pressure.
2. CVD Normalization
Cumulative pressure is normalized so current pressure can be compared with recent history.
3. Participation Entropy
Volume concentration and close location distinguish balanced absorption from directional release.
4. Pressure Envelope
An auction mean and delta rails display pressure on the price chart.
delta = signedVolume * 0.65 + impactVolume * 0.35
Features
Estimated signed volume pressure
CVD z-score and impulse scoring
Absorption and divergence context
Auction mean and pressure rails
Sparse VX+ and VX- labels
Input Parameters
Delta smoothing and impulse memory
CVD normalization window
Participation entropy window
Event score and cooldown
Rails, trace, and candle toggles
How to Use This Script
Use VX+ and VX- labels as confirmed pressure shifts. Gold circles show absorption or divergence conditions aligned with the current regime.
Limitations
The script uses historical OHLCV data and cannot know future prices.
Signals and states can be late during fast reversals because confirmed-bar logic is used to reduce repainting.
Model outputs should be interpreted with market context, risk controls, and independent analysis.
No visual state should be treated as a certain trade outcome.
Originality Statement
Veyra is original in combining estimated delta, CVD normalization, entropy, auction rails, absorption, and divergence in one restrained overlay.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice, investment advice, or a recommendation to buy or sell any financial instrument. All calculations are derived from historical market data and may produce inaccurate readings in some market conditions. No indicator can predict future market behavior. Use proper risk management and independent judgment.
-Made with passion by jackofalltrades
مؤشر
