OPEN-SOURCE SCRIPT
Verdance Regime Cipher [JOAT]

Verdance Regime Cipher [JOAT]
Introduction
The Verdance Regime Cipher is an open-source market regime classification overlay that identifies and tracks four distinct market states in real-time: Bullish Trend, Bearish Trend, Volatile Disruption, and Equilibrium Range. Rather than relying on a single indicator to determine market conditions, VRC fuses ATR percentile ranking, custom directional movement scoring, volume regime analysis, EMA trend alignment, and optional Chaikin volatility blending into a unified regime detection engine. A two-bar confirmation filter prevents single-bar flicker, and an optional higher-timeframe alignment check adds macro confluence before confirming any regime.
This indicator exists because most traders use trend indicators that only answer "up or down" — they fail to distinguish between a strong directional move, a choppy range, and a volatile transition that could trap both sides. VRC answers a more nuanced question: what type of market environment are we in right now, how fresh is it, and does the macro timeframe agree?

Core Engine: How Regime Classification Works
The regime engine combines four independent measurements into a single classification:
These four measurements feed into the classification logic:
Pine Script®
Volatile Disruption requires both high ATR percentile AND elevated volume percentile — this prevents misclassifying a quiet drift as volatile just because ATR is slightly elevated. Trending states require the ATR percentile to exceed the drift threshold while NOT being volatile, combined with directional confirmation from both the polarity scanner and prism alignment.
Two-Bar Confirmation and Regime Stability
Raw regime changes are not applied immediately. A pending regime must persist for two consecutive bars before it becomes the confirmed regime. This eliminates the single-bar flicker that plagues most regime indicators, where the classification bounces back and forth on noisy bars.
Thermal Pressure (Chaikin Volatility Blend)
When enabled, the indicator blends Chaikin volatility — which measures the rate of change of the high-low range — into the volatile regime detection. This adds a "thermal" dimension: the market must show not just high ATR, but accelerating range expansion, before being classified as volatile. The Chaikin volatility is percentile-ranked against its own history, and only when it exceeds the 65th percentile does it confirm the volatile state.
Horizon Lock (Higher-Timeframe Confluence)
The Horizon Lock feature fetches EMA bias from a configurable higher timeframe (default: 60-minute) and checks whether the macro trend direction agrees with the local regime. When the local regime says "bullish" but the higher timeframe EMAs are bearish, the Horizon Lock reports "DIVERGENT" — a warning that the local trend may lack macro support. This uses non-repainting security calls with lookahead disabled.
Momentum Decay Index
Every regime ages. VRC tracks how many bars the current regime has persisted and computes an exponential decay score from 100% (just started) toward 0%. Regimes are classified as FRESH (above 70%), MATURE (35-70%), or STALE (below 35%). Stale regimes have elevated reversal probability. The decay rate is calibrated so that regimes naturally transition through these phases over time, giving traders a sense of how "tired" the current move is.
Signal Architecture
VRC generates five distinct signal types, all edge-triggered and confirmed-bar only:
Visual Elements

Dashboard Metrics Explained
The Command Panel provides real-time regime intelligence:
Input Parameters
Regime Nucleus:
Chaikin Volatility Blend:
Macro Confluence:
How to Use This Indicator
Limitations
Originality Statement
This indicator is original in its multi-dimensional regime classification approach. While ATR, directional movement, and volume analysis are established concepts individually, VRC is justified because:
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regime classification helps contextualize market conditions but does not predict future price movement. Past regime patterns do not guarantee future behavior. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this tool.
-Made with passion by officialjackofalltrades
Introduction
The Verdance Regime Cipher is an open-source market regime classification overlay that identifies and tracks four distinct market states in real-time: Bullish Trend, Bearish Trend, Volatile Disruption, and Equilibrium Range. Rather than relying on a single indicator to determine market conditions, VRC fuses ATR percentile ranking, custom directional movement scoring, volume regime analysis, EMA trend alignment, and optional Chaikin volatility blending into a unified regime detection engine. A two-bar confirmation filter prevents single-bar flicker, and an optional higher-timeframe alignment check adds macro confluence before confirming any regime.
This indicator exists because most traders use trend indicators that only answer "up or down" — they fail to distinguish between a strong directional move, a choppy range, and a volatile transition that could trap both sides. VRC answers a more nuanced question: what type of market environment are we in right now, how fresh is it, and does the macro timeframe agree?
Core Engine: How Regime Classification Works
The regime engine combines four independent measurements into a single classification:
- Dispersion Gauge (ATR Percentile): The indicator computes ATR over a configurable period, then ranks it against its own history using percentile ranking. This tells you whether current volatility is high, low, or average relative to recent behavior — not just the raw ATR value.
- Polarity Scanner (Directional Movement): A custom directional movement score is calculated by comparing smoothed positive and negative directional movement. The result is normalized to a -1 to +1 range, where positive values indicate bullish directional pressure and negative values indicate bearish pressure.
- Flux Ratio (Volume Regime): Short-term volume (3-bar SMA) is divided by longer-term volume (configurable period SMA), then percentile-ranked. This identifies whether volume is elevated relative to its own history, which helps distinguish genuine trending moves from low-conviction drifts.
- Prism Alignment (EMA Spread): The spread between a fast and slow EMA is normalized by ATR. This provides a volatility-adjusted measure of trend strength — a large spread in a low-volatility environment means something different than the same spread during high volatility.
These four measurements feed into the classification logic:
Volatile Disruption requires both high ATR percentile AND elevated volume percentile — this prevents misclassifying a quiet drift as volatile just because ATR is slightly elevated. Trending states require the ATR percentile to exceed the drift threshold while NOT being volatile, combined with directional confirmation from both the polarity scanner and prism alignment.
Two-Bar Confirmation and Regime Stability
Raw regime changes are not applied immediately. A pending regime must persist for two consecutive bars before it becomes the confirmed regime. This eliminates the single-bar flicker that plagues most regime indicators, where the classification bounces back and forth on noisy bars.
Thermal Pressure (Chaikin Volatility Blend)
When enabled, the indicator blends Chaikin volatility — which measures the rate of change of the high-low range — into the volatile regime detection. This adds a "thermal" dimension: the market must show not just high ATR, but accelerating range expansion, before being classified as volatile. The Chaikin volatility is percentile-ranked against its own history, and only when it exceeds the 65th percentile does it confirm the volatile state.
Horizon Lock (Higher-Timeframe Confluence)
The Horizon Lock feature fetches EMA bias from a configurable higher timeframe (default: 60-minute) and checks whether the macro trend direction agrees with the local regime. When the local regime says "bullish" but the higher timeframe EMAs are bearish, the Horizon Lock reports "DIVERGENT" — a warning that the local trend may lack macro support. This uses non-repainting security calls with lookahead disabled.
Momentum Decay Index
Every regime ages. VRC tracks how many bars the current regime has persisted and computes an exponential decay score from 100% (just started) toward 0%. Regimes are classified as FRESH (above 70%), MATURE (35-70%), or STALE (below 35%). Stale regimes have elevated reversal probability. The decay rate is calibrated so that regimes naturally transition through these phases over time, giving traders a sense of how "tired" the current move is.
Signal Architecture
VRC generates five distinct signal types, all edge-triggered and confirmed-bar only:
- Regime Shift Signals: Labels appear when the confirmed regime transitions — ASCENT LOCK, DESCENT LOCK, ERUPTION, or EQUILIBRIUM — each with a tooltip showing polarity score and decay percentage.
- Thermal Spike Markers: Fire when Chaikin volatility surges above the 85th percentile, marking bars of extreme range expansion.
- Polarity Fracture: Detects divergence between price action and directional momentum — price making new highs while the polarity score is declining, or vice versa. This is an early warning of trend exhaustion.
- Decay Warnings: Alert when the regime freshness drops below 20%, signaling that the current regime is aging and reversal probability is elevated.
- Horizon Lock/Break Signals: Mark the moment when higher-timeframe alignment is gained or lost.
Visual Elements
- Regime Aura: Subtle background tint reflecting the current regime state (green for bullish, red for bearish, orange for volatile, purple for range). A secondary wash appears when the Horizon Lock is divergent.
- Prism Lines: Fast and slow EMAs plotted with opacity driven by regime decay — fresher regimes produce more vivid lines, stale regimes fade them.
- Regime Pulse Band: An ATR-based envelope around the fast EMA whose width scales with regime intensity. Wider bands during volatile regimes, tighter during ranges.
- Regime Candle Tinting: Candles colored by current regime state for instant visual recognition.
- Command Panel: An 11-row monospace dashboard displaying: regime substate, polarity score, dispersion rank, flux ratio, prism bias, kinetic phase, flux percentile, thermal pressure, horizon lock status, decay index, and regime age.
Dashboard Metrics Explained
The Command Panel provides real-time regime intelligence:
- POLARITY: Directional movement score (-1 to +1). Positive = bullish pressure, negative = bearish pressure.
- DISP %R: ATR percentile rank. Above the eruption threshold = volatile, above drift threshold = trending, below = ranging.
- FLUX: Volume ratio (short/long SMA). Values above 1.2 indicate elevated volume activity.
- PRISM: ATR-normalized EMA spread. Positive = fast EMA above slow, negative = below.
- PHASE: Combined kinetic classification — KINETIC (strong directional move), INERTIAL (moderate), or DORMANT (weak).
- THERMAL: Chaikin volatility percentile. Above 75% = extreme range expansion.
- HORIZON: LOCKED (macro aligned), DIVERGENT (macro conflicting), or OFF (disabled).
- DECAY: Regime freshness — FRESH, MATURE, or STALE with percentage.
Input Parameters
Regime Nucleus:
- Dispersion Gauge: ATR lookback (default 14)
- Polarity Scanner: Directional movement window (default 20)
- Flux Depth: Volume analysis period (default 14)
- Epoch Window: Percentile ranking lookback (default 50)
- Drift Threshold: ATR percentile for trending classification (default 55)
- Eruption Threshold: ATR percentile for volatile classification (default 70)
Chaikin Volatility Blend:
- Enable Thermal Pressure: Toggle Chaikin blend (default on)
- Thermal Period / Rate: Chaikin EMA and ROC parameters
Macro Confluence:
- Enable Horizon Lock: Toggle HTF alignment check (default on)
- Horizon Timeframe: Selectable from 30m to Weekly
How to Use This Indicator
- Use the regime classification to filter your existing strategy — only take trend-following setups during ASCENT or DESCENT regimes, and avoid them during EQUILIBRIUM or ERUPTION.
- Watch the Decay Index — when a regime becomes STALE, be cautious about entering new positions in that direction.
- Pay attention to Polarity Fracture signals — they often precede regime transitions by several bars.
- Use Horizon Lock to confirm that your local timeframe trend has macro support. DIVERGENT status is a warning flag.
- Thermal Spike markers highlight bars of extreme range expansion — these often mark the beginning or climax of volatile moves.
Limitations
- Regime classification is inherently lagging — the two-bar confirmation filter adds stability but delays transitions.
- The indicator classifies the current environment but does not predict the next one. A FRESH bullish regime can still reverse.
- Higher-timeframe alignment depends on the selected timeframe — different HTF choices may produce different Horizon Lock readings.
- Volume-based measurements (Flux Ratio) are less reliable on instruments with inconsistent volume data.
- The Decay Index is a heuristic, not a statistical probability — it provides intuition about regime age, not a precise reversal forecast.
- This indicator does not generate buy/sell signals — it provides context for your own decision-making.
Originality Statement
This indicator is original in its multi-dimensional regime classification approach. While ATR, directional movement, and volume analysis are established concepts individually, VRC is justified because:
- It fuses four independent measurements (ATR percentile, directional movement, volume regime, EMA spread) into a unified four-state classification that goes beyond simple "trending vs ranging."
- The two-bar confirmation filter with exponential decay tracking provides regime lifecycle awareness not found in standard regime indicators.
- Chaikin volatility blending adds a thermal dimension that distinguishes genuine volatile disruptions from merely elevated ATR.
- The Horizon Lock feature integrates macro-timeframe confluence directly into the regime engine rather than requiring a separate indicator.
- Polarity Fracture detection identifies directional divergence as an early warning system for regime transitions.
- The comprehensive dashboard presents regime intelligence across 11 metrics simultaneously.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Regime classification helps contextualize market conditions but does not predict future price movement. Past regime patterns do not guarantee future behavior. Always use proper risk management and conduct your own analysis before making trading decisions. The author is not responsible for any losses incurred from using this tool.
-Made with passion by officialjackofalltrades
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
The Institutional Grade Trading Ecosystem, Built to win trades 📈
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
The Institutional Grade Trading Ecosystem, Built to win trades 📈
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.