Volatility Regime Cycle [AGPro Series]Volatility Regime Cycle
🌀 Overview
Volatility Regime Cycle classifies every bar on your chart into one of four distinct volatility phases: Contraction, Expansion, Climax, and Reset. Unlike traditional trend or regime indicators that focus on price direction, this tool maps the cyclical behavior of volatility itself — helping traders recognize whether the market is coiling, releasing, climaxing, or resetting. Each phase is detected through a multi-factor confluence engine and displayed with gradient background shading, transition markers, and S/R-style climax reaction zones. The framework is asset- and timeframe-agnostic: it adapts to crypto, forex, indices, stocks, and commodities on any timeframe.
💎 Unique Edge
Most volatility tools present a single metric (ATR, Bollinger Width, VIX proxy). Volatility Regime Cycle differs in structure and intent:
🔸 Phase-based classification, not just a reading — every bar is assigned to a named regime with a trader-actionable bias.
🔸 Multi-factor confluence scoring — five independent volatility inputs (ATR level, BB Width level, BB/KC squeeze, volume z-score, ATR rate-of-change) vote on the active phase. No single factor can dominate.
🔸 Winsorized normalization — outlier events (single extreme bars) do not compress the scale and hide current readings, a common flaw in simple percentile-based tools.
🔸 Climax Reaction Zones — each Climax event is preserved as an S/R-style rectangle with mid-pivot line, creating a memory of past volatility exhaustion levels that often act as future reaction areas.
🔸 Cycle-aware analytics — tracks historical phase durations and estimates current cycle progress based on rolling averages of past phases of the same type.
🔸 Phase-specific Trader Bias — panel translates the current regime into a plain-language bias (Breakout-watch, Momentum-favor, Reversal-risk, Cooldown).
This is not a Wyckoff phase tool, an Elliott counter, or a Dow-theory classifier. It is a pure volatility-cycle mapper, engineered from the ground up to stand apart from both classical cycle indicators and single-metric volatility meters.
🧠 Methodology
The engine runs three layers:
🔹 Factor Layer
• ATR Level — 14-period ATR, winsorized min-max normalized (5%-95% range) over a configurable lookback window.
• BB Width Level — Bollinger Band width as percent of basis, normalized identically.
• Squeeze State — true when Bollinger Bands are contained inside Keltner Channels (classic volatility compression).
• Volume Z-Score — standardized volume relative to its rolling mean and standard deviation.
• ATR Rate-of-Change — momentum of volatility itself.
🔹 Scoring Layer
Each of the four phases has its own scoring formula that weights the five factors differently. For each bar, all four phase scores are calculated in parallel, and the phase with the highest score is the candidate regime for that bar.
🔹 Confirmation Layer
To suppress whipsaw, the candidate phase must persist for a configurable number of bars (default 3) before replacing the active phase. A minimum phase duration lock additionally prevents rapid flips. Climax events include a de-duplication cooldown so that clustered climax bars produce a single marker rather than a cluster of overlapping labels.
Phase transitions are classified as major (Contraction→Expansion breakouts and Climax entries) or minor (all other routine changes). Only major transitions receive labels; minor changes are shown as subtle dotted lines to keep the chart clean.
🔔 Signals & Alerts
The script exposes alerts for every phase transition as well as two high-value composite events:
🔸 Any Phase Transition — fires whenever the active phase changes.
🔸 Entered Contraction / Expansion / Climax / Reset — fires for specific phase entries.
🔸 Contraction → Expansion (Breakout) — coil release event; of interest to breakout traders.
🔸 Climax Entry (Exhaustion Warning) — volatility peak event; of interest to mean-reversion and risk-management traders.
All alerts fire only on confirmed bar close to prevent intra-bar flip-flop.
⚙️ Key Inputs
🔹 Engine Settings — normalization lookback, ATR length, Bollinger/Keltner length and multipliers, volume z-score length, ATR rate-of-change length, confirmation bars, minimum phase duration.
🔹 Phase Thresholds — low volatility level, high volatility level, climax volatility gate, climax volume z-score threshold, climax de-dup cooldown.
🔹 Visuals — toggles for background shading, major transition labels, minor transition lines, volatility ribbon, current phase label.
🔹 S/R Zones — climax zones toggle, breakout zones toggle, maximum active zones, zone initial length, zone range lookback.
🔹 Panel — show/hide, location, Dark/Light theme, font size.
🔹 Label Sizing — font size for on-chart labels.
🔹 Alerts — per-event toggles.
📘 How to Use
🔸 Breakout traders: watch for Contraction phase on the panel with Trader Bias showing Breakout-watch. When the phase transitions to Expansion, a coil release is underway and a Breakout label is printed. Optional Breakout Zones can be enabled to preserve the breakout level as a retest reference.
🔸 Momentum / trend traders: ride the Expansion phase while Trader Bias reads Momentum-favor. Phase Duration and Cycle Progress on the panel give a sense of where the current momentum leg sits relative to historical averages.
🔸 Mean-reversion / exhaustion traders: a Climax label with Trader Bias Reversal-risk highlights volatility exhaustion. The Climax Reaction Zone drawn at each climax often behaves as a future reaction level and can be used as confluence with other reversal tools.
🔸 Risk managers: the Reset phase with Trader Bias Cooldown typically signals reduced market conviction and can be used to scale down position size until a new Contraction builds up.
🔸 Multi-timeframe reading: run the script on the higher timeframe for regime context and on the lower timeframe for entry timing.
Hover the panel header to see a statistics tooltip with average durations of each phase over the last completed cycles.
⚠️ Limitations & Transparency
🔹 The script does not predict future prices or issue buy/sell recommendations. It is a classification and context tool.
🔹 Phase detection is inherently lagging because it requires the confirmation window and minimum duration lock. This is a deliberate design choice to suppress whipsaw at the cost of some responsiveness.
🔹 Normalization uses a rolling lookback window; the first lookback bars after loading the script may show compressed or unstable readings while the window fills.
🔹 Cycle Progress is an estimate based on historical phase averages and may exceed 100% when the current phase runs longer than past cycles.
🔹 Climax and Reset scores rely partly on volume; on instruments with unreliable or missing volume feeds, volume-dependent factors will contribute less.
🔹 All visual elements are cosmetic and toggleable; they do not alter the underlying phase logic.
🛡️ Risk Disclosure
This indicator is a technical analysis tool. It is not a trading system, not a signal service, not financial advice, and not a guarantee of future results. Trading involves substantial risk of loss. Past market behavior does not predict future market behavior. Users are solely responsible for their own trading decisions, risk management, and position sizing. Always test any tool on your preferred instruments and timeframes with appropriate historical review before using it as part of a live decision-making process.
Pine Script® indicator






















