OPEN-SOURCE SCRIPT
ALMA SD Bands | RakoQuant

ALMA SD Bands | RakoQuant is a volatility-regime band system built from first principles using an institutional smoothing framework: an ALMA baseline combined with ALMA-smoothed standard deviation width, designed for clean trend containment and controlled regime classification.
This tool is part of the RakoQuant protected research line, focusing on minimal noise, persistent state logic, and volatility-aware market structure rather than traditional reactive Bollinger-style band behavior.
Core Concept
This indicator answers one key structural question:
Is price operating inside a stable volatility regime, or transitioning into a new directional band expansion phase?
Unlike classical deviation band systems that fluctuate aggressively candle-to-candle, ALMA SD Bands introduce:
* Ultra-smooth baseline structure
* Smoothed volatility width
* Persistent directional regime logic
* Deadband-based flip stabilization
The result is a clean institutional containment model rather than noisy retail band plotting.
How It Works
1. ALMA Baseline (Institutional Mean Structure)
The centerline of the system is computed using:
Arnaud Legoux Moving Average (ALMA)
ALMA provides:
* Reduced lag compared to EMA
* Superior smoothness compared to SMA
* Stable regime structure across crypto volatility
This baseline acts as the equilibrium axis of the band system.
2. Standard Deviation Volatility Width (Smoothed)
Band width is driven by volatility, measured through standard deviation, with two selectable modes:
* Price Standard Deviation
* Return Standard Deviation (log-return volatility)
Rather than using raw deviation directly, volatility is passed through a second ALMA smoothing layer:
Smoothed Volatility = ALMA(StdDev)
This eliminates the jitter and band shaking that defines most Bollinger-type systems.
3. Adaptive Containment Bands
Final bands are constructed as:
* Upper Band = ALMA Basis + Multiplier × Smoothed Volatility
* Lower Band = ALMA Basis − Multiplier × Smoothed Volatility
Unlike traditional ±2σ envelopes, the multiplier is intentionally adjustable and tuned for regime containment rather than extreme tagging.
4. Deadband Regime Engine (Persistent State Logic)
A defining feature of this protected release is its regime persistence model.
Instead of flipping trend bias instantly, the script applies a volatility-scaled deadband buffer:
* Bull regime activates only above Basis + Deadband
* Bear regime activates only below Basis − Deadband
This removes micro-flips and produces a true structural regime state:
* Bullish containment (green)
* Bearish containment (red)
* Neutral transition zone suppression
Regime state persists until a confirmed boundary transition occurs.
Visual Engine
ALMA SD Bands follows the RakoQuant minimal institutional plotting standard:
* Active volatility bands only
* Smooth containment fill
* Optional candle painting by regime bias
* Ultra-clean overlays suitable for confluence stacking
This indicator is designed as a structural layer, not a clutter generator.
How To Use
✅ Volatility containment framework ✅ Trend regime bias overlay ✅ Expansion / contraction classifier ✅ Portfolio directional filter (RSPS compatible)
Recommended workflow:
* Trade long only during bullish regime containment
* Defensive during bearish containment
* Watch for regime flips as volatility transition events
* Combine with momentum triggers for execution
Best environments:
* 4H–1D swing trend structure
* Volatility breakout classification
* Institutional band containment systems
Screenshot Placement
📸 Example chart / screenshot:

This tool is part of the RakoQuant protected research line, focusing on minimal noise, persistent state logic, and volatility-aware market structure rather than traditional reactive Bollinger-style band behavior.
Core Concept
This indicator answers one key structural question:
Is price operating inside a stable volatility regime, or transitioning into a new directional band expansion phase?
Unlike classical deviation band systems that fluctuate aggressively candle-to-candle, ALMA SD Bands introduce:
* Ultra-smooth baseline structure
* Smoothed volatility width
* Persistent directional regime logic
* Deadband-based flip stabilization
The result is a clean institutional containment model rather than noisy retail band plotting.
How It Works
1. ALMA Baseline (Institutional Mean Structure)
The centerline of the system is computed using:
Arnaud Legoux Moving Average (ALMA)
ALMA provides:
* Reduced lag compared to EMA
* Superior smoothness compared to SMA
* Stable regime structure across crypto volatility
This baseline acts as the equilibrium axis of the band system.
2. Standard Deviation Volatility Width (Smoothed)
Band width is driven by volatility, measured through standard deviation, with two selectable modes:
* Price Standard Deviation
* Return Standard Deviation (log-return volatility)
Rather than using raw deviation directly, volatility is passed through a second ALMA smoothing layer:
Smoothed Volatility = ALMA(StdDev)
This eliminates the jitter and band shaking that defines most Bollinger-type systems.
3. Adaptive Containment Bands
Final bands are constructed as:
* Upper Band = ALMA Basis + Multiplier × Smoothed Volatility
* Lower Band = ALMA Basis − Multiplier × Smoothed Volatility
Unlike traditional ±2σ envelopes, the multiplier is intentionally adjustable and tuned for regime containment rather than extreme tagging.
4. Deadband Regime Engine (Persistent State Logic)
A defining feature of this protected release is its regime persistence model.
Instead of flipping trend bias instantly, the script applies a volatility-scaled deadband buffer:
* Bull regime activates only above Basis + Deadband
* Bear regime activates only below Basis − Deadband
This removes micro-flips and produces a true structural regime state:
* Bullish containment (green)
* Bearish containment (red)
* Neutral transition zone suppression
Regime state persists until a confirmed boundary transition occurs.
Visual Engine
ALMA SD Bands follows the RakoQuant minimal institutional plotting standard:
* Active volatility bands only
* Smooth containment fill
* Optional candle painting by regime bias
* Ultra-clean overlays suitable for confluence stacking
This indicator is designed as a structural layer, not a clutter generator.
How To Use
✅ Volatility containment framework ✅ Trend regime bias overlay ✅ Expansion / contraction classifier ✅ Portfolio directional filter (RSPS compatible)
Recommended workflow:
* Trade long only during bullish regime containment
* Defensive during bearish containment
* Watch for regime flips as volatility transition events
* Combine with momentum triggers for execution
Best environments:
* 4H–1D swing trend structure
* Volatility breakout classification
* Institutional band containment systems
Screenshot Placement
📸 Example chart / screenshot:
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que la republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como asesoramiento o recomendaciones financieras, de inversión, de trading o de otro tipo proporcionadas o respaldadas por TradingView. Más información en Condiciones de uso.