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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.