OPEN-SOURCE SCRIPT
Mis à jour Momentum Adaptive EMA | RakoQuant

Momentum Adaptive EMA is a trend-following moving average system designed to dynamically adjust its responsiveness based on market momentum.
Instead of using a fixed smoothing speed like a normal EMA, this indicator becomes fast in strong moves and slow in choppy conditions, producing a cleaner adaptive trend structure.
This version also introduces a secondary POT Moving Average for smooth regime confirmation.
Core Idea
This indicator answers one key question:
Is momentum accelerating enough to justify a faster trend response?
By adapting the EMA’s smoothing factor in real time, the indicator avoids the two classic problems of moving averages:
Lag in strong trends
Whipsaws in sideways markets
How It Works
1. Momentum-Based Adaptivity Engine
The indicator measures momentum using a Rate-of-Change style move:
ROC = current price − price N bars ago
That momentum is normalized by volatility:
Momentum Strength = |ROC| ÷ stdev(ROC)
This produces a clean, scale-independent momentum score.
2. Adaptive EMA (Dynamic Alpha)
Instead of a constant EMA alpha, smoothing is adjusted between:
Alpha Min → slow mode (stable markets)
Alpha Max → fast mode (strong trend markets)
Adaptivity is controlled by:
k (Strength Parameter)
High momentum → EMA reacts faster
Low momentum → EMA smooths more
3. POT Moving Average (Weighted Trend Anchor)
A second moving average is calculated using a Power-Weighted POT MA, where the most recent values receive heavier weight:
Stronger emphasis on recent trend shifts
Smooth confirmation without volatility bands
This creates a clean dual-average regime filter:
Adaptive EMA = fast regime line
POT MA = slower structure anchor
Regime Signals
Trend regime is defined by crossovers:
Bullish regime: Adaptive EMA crosses above POT MA
Bearish regime: Adaptive EMA crosses below POT MA
Optional persistence keeps regimes stable instead of flipping constantly.
Visual System
Bull regime → Ice Blue trend state
Bear regime → Navy trend state
Candle painting optionally matches the active regime
The result is a clean institutional trend overlay with adaptive behavior.
Alerts Included
Bull Break Alert → Adaptive EMA crosses ABOVE POT MA
Bear Break Alert → Adaptive EMA crosses BELOW POT MA
Useful for automation or confirmation systems.
How to Use
✅ Trend filter for directional trading
✅ Adaptive MA replacement for classic EMA systems
✅ Works well on higher timeframes (4H / 1D)
✅ Combine with breakouts, momentum triggers, or volume tools for entries
Inputs Summary
Momentum Length → speed of momentum detection
Normalization Length → volatility scaling window
Alpha Min / Alpha Max → slow vs fast response bounds
Adaptivity Strength (k) → aggressiveness of adaptation
POT Length + Power → smoothing of the confirmation MA
Persistent Regime Toggle → stability vs live switching
Candle Paint Toggle → visual regime clarity
Screenshot Placement
📸 Example chart / screenshot: (insert image here)
Tip: show a strong bull trend + one bearish flip so users understand the adaptive behavior.
Instead of using a fixed smoothing speed like a normal EMA, this indicator becomes fast in strong moves and slow in choppy conditions, producing a cleaner adaptive trend structure.
This version also introduces a secondary POT Moving Average for smooth regime confirmation.
Core Idea
This indicator answers one key question:
Is momentum accelerating enough to justify a faster trend response?
By adapting the EMA’s smoothing factor in real time, the indicator avoids the two classic problems of moving averages:
Lag in strong trends
Whipsaws in sideways markets
How It Works
1. Momentum-Based Adaptivity Engine
The indicator measures momentum using a Rate-of-Change style move:
ROC = current price − price N bars ago
That momentum is normalized by volatility:
Momentum Strength = |ROC| ÷ stdev(ROC)
This produces a clean, scale-independent momentum score.
2. Adaptive EMA (Dynamic Alpha)
Instead of a constant EMA alpha, smoothing is adjusted between:
Alpha Min → slow mode (stable markets)
Alpha Max → fast mode (strong trend markets)
Adaptivity is controlled by:
k (Strength Parameter)
High momentum → EMA reacts faster
Low momentum → EMA smooths more
3. POT Moving Average (Weighted Trend Anchor)
A second moving average is calculated using a Power-Weighted POT MA, where the most recent values receive heavier weight:
Stronger emphasis on recent trend shifts
Smooth confirmation without volatility bands
This creates a clean dual-average regime filter:
Adaptive EMA = fast regime line
POT MA = slower structure anchor
Regime Signals
Trend regime is defined by crossovers:
Bullish regime: Adaptive EMA crosses above POT MA
Bearish regime: Adaptive EMA crosses below POT MA
Optional persistence keeps regimes stable instead of flipping constantly.
Visual System
Bull regime → Ice Blue trend state
Bear regime → Navy trend state
Candle painting optionally matches the active regime
The result is a clean institutional trend overlay with adaptive behavior.
Alerts Included
Bull Break Alert → Adaptive EMA crosses ABOVE POT MA
Bear Break Alert → Adaptive EMA crosses BELOW POT MA
Useful for automation or confirmation systems.
How to Use
✅ Trend filter for directional trading
✅ Adaptive MA replacement for classic EMA systems
✅ Works well on higher timeframes (4H / 1D)
✅ Combine with breakouts, momentum triggers, or volume tools for entries
Inputs Summary
Momentum Length → speed of momentum detection
Normalization Length → volatility scaling window
Alpha Min / Alpha Max → slow vs fast response bounds
Adaptivity Strength (k) → aggressiveness of adaptation
POT Length + Power → smoothing of the confirmation MA
Persistent Regime Toggle → stability vs live switching
Candle Paint Toggle → visual regime clarity
Screenshot Placement
📸 Example chart / screenshot: (insert image here)
Tip: show a strong bull trend + one bearish flip so users understand the adaptive behavior.
Notes de version
V2Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit TradingView, le créateur de ce script l'a rendu open source afin que les traders puissent examiner et vérifier ses fonctionnalités. Bravo à l'auteur! Bien que vous puissiez l'utiliser gratuitement, n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et publications ne sont pas destinées à être, et ne constituent pas, des conseils ou recommandations financiers, d'investissement, de trading ou autres fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.