OPEN-SOURCE SCRIPT
EMA Micro Trend Exhaustion

Overview
EMA Micro Trend Exhaustion is a momentum oscillator that measures where a short-term Exponential Moving Average (EMA) is positioned relative to its own rolling range over a configurable lookback period.
Instead of evaluating price directly, the indicator analyzes the moving average itself. This approach helps reduce market noise and provides a clearer view of short-term trend extension.
The oscillator plots two histogram series:
• Distance from the current EMA to its highest EMA value within the lookback period.
• Distance from the current EMA to its lowest EMA value within the lookback period.
By measuring these distances, traders can quickly identify when short-term momentum becomes increasingly stretched.
How It Works
The indicator first calculates a 10-period Exponential Moving Average.
It then determines the highest and lowest EMA values observed during the previous 10 bars.
The current EMA is compared against these two reference levels, and the resulting distances are normalized for JPY and non-JPY instruments so that values remain visually comparable across different Forex pairs.
The histogram represents the magnitude of these deviations.
As the EMA approaches its recent upper boundary, the upper-distance histogram moves toward its extreme.
Likewise, as the EMA approaches its recent lower boundary, the lower-distance histogram expands in the opposite direction.
Interpretation
Large positive values indicate that the moving average is approaching its recent upper range.
Large negative values indicate proximity to its recent lower range.
These conditions suggest that short-term momentum has become increasingly extended relative to recent market behavior.
The indicator is designed to visualize momentum extension rather than generate standalone buy or sell signals.
It is generally more useful when combined with trend analysis, market structure, or price action.
Typical Use Cases
• Detect short-term momentum exhaustion
• Monitor trend extension
• Identify potential pullback areas
• Filter momentum-based trading setups
• Confirm discretionary market analysis
Inputs
EMA Length
Controls the moving average period.
Default: 10
Lookback Period
Defines the rolling range used to calculate EMA extremes.
Default: 10
Notes
The indicator measures the behavior of the moving average itself rather than raw market price.
As a result, it reacts more smoothly than price-based oscillators and is intended as a market analysis tool instead of a complete trading system.
Disclaimer
This indicator is provided for educational and analytical purposes only.
It does not provide financial advice and should not be used as the sole basis for trading decisions.
Release Notes
Version 1.0
Initial public release.
Introduces an oscillator that visualizes the position of a short-term EMA within its recent rolling range.
EMA Micro Trend Exhaustion is a momentum oscillator that measures where a short-term Exponential Moving Average (EMA) is positioned relative to its own rolling range over a configurable lookback period.
Instead of evaluating price directly, the indicator analyzes the moving average itself. This approach helps reduce market noise and provides a clearer view of short-term trend extension.
The oscillator plots two histogram series:
• Distance from the current EMA to its highest EMA value within the lookback period.
• Distance from the current EMA to its lowest EMA value within the lookback period.
By measuring these distances, traders can quickly identify when short-term momentum becomes increasingly stretched.
How It Works
The indicator first calculates a 10-period Exponential Moving Average.
It then determines the highest and lowest EMA values observed during the previous 10 bars.
The current EMA is compared against these two reference levels, and the resulting distances are normalized for JPY and non-JPY instruments so that values remain visually comparable across different Forex pairs.
The histogram represents the magnitude of these deviations.
As the EMA approaches its recent upper boundary, the upper-distance histogram moves toward its extreme.
Likewise, as the EMA approaches its recent lower boundary, the lower-distance histogram expands in the opposite direction.
Interpretation
Large positive values indicate that the moving average is approaching its recent upper range.
Large negative values indicate proximity to its recent lower range.
These conditions suggest that short-term momentum has become increasingly extended relative to recent market behavior.
The indicator is designed to visualize momentum extension rather than generate standalone buy or sell signals.
It is generally more useful when combined with trend analysis, market structure, or price action.
Typical Use Cases
• Detect short-term momentum exhaustion
• Monitor trend extension
• Identify potential pullback areas
• Filter momentum-based trading setups
• Confirm discretionary market analysis
Inputs
EMA Length
Controls the moving average period.
Default: 10
Lookback Period
Defines the rolling range used to calculate EMA extremes.
Default: 10
Notes
The indicator measures the behavior of the moving average itself rather than raw market price.
As a result, it reacts more smoothly than price-based oscillators and is intended as a market analysis tool instead of a complete trading system.
Disclaimer
This indicator is provided for educational and analytical purposes only.
It does not provide financial advice and should not be used as the sole basis for trading decisions.
Release Notes
Version 1.0
Initial public release.
Introduces an oscillator that visualizes the position of a short-term EMA within its recent rolling range.
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.
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.