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.
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。