OPEN-SOURCE SCRIPT
Smooth MESA Adaptive Moving Average

Smooth MESA Adaptive Moving Average (MAMA)
The Smooth MESA Adaptive Moving Average (MAMA) is a powerful trend-following indicator designed to adapt dynamically to market conditions. It enhances the classic MESA Adaptive Moving Average by adding smoothing and multiplier features to reduce noise and improve trend identification. This indicator helps traders to better identify significant turning points in price, making it ideal for detecting trend reversals and filtering out false signals.
Key Features:
Dynamic Adaptation:
The core of the MAMA indicator is based on John Ehlers' MESA algorithm, which adapts to changing market cycles by adjusting the speed of the moving average.
The Fast Limit (fl) and Slow Limit (sl) parameters control the speed at which the MAMA reacts to price changes, allowing it to be more responsive during strong trends and slower during consolidation phases.
Smoothing Functionality:
The indicator introduces a customizable Smoothing Length and a Smoothing Multiplier to smooth out the MAMA and FAMA (Following Adaptive Moving Average), reducing short-term market noise.
This smoothing function improves the clarity of trend signals while maintaining responsiveness to market reversals.
Crossover Signals:
The MAMA and FAMA lines work together to generate crossover signals. When MAMA crosses above FAMA, it indicates a potential buy signal, while a crossover below FAMA signals a potential sell.
These crossovers are highlighted on the chart with visual arrows, making it easier for traders and investors to spot opportunities.
Trend Visualization:
A shaded area between the MAMA and FAMA lines helps visualize positive (bullish) and negative (bearish) trends. Green fill appears when MAMA is above FAMA (bullish trend), while red fill shows when MAMA is below FAMA (bearish trend).
Optional bar coloring provides additional visual cues for trend direction based on MAMA and FAMA crossovers.
Highly Customizable:
Users can adjust the smoothing parameters (Smoothing Length and Smoothing Multiplier), as well as the limits (Fast Limit and Slow Limit), to fine-tune the indicator's sensitivity to market movements.
The option to enable or disable crossover markers and color bars based on trend direction provides flexibility for different trading styles.
Usage:
Buy Signal: When MAMA crosses above FAMA, the indicator suggests a potential bullish trend. Traders and investors may consider entering a long position.
Sell Signal: When MAMA crosses below FAMA, it indicates a potential bearish trend. Traders and investors may consider exiting long positions or entering short positions.
Trend Reversals: The smooth nature of this indicator helps identify major trend reversals while filtering out minor fluctuations, making it useful for swing and position traders.
Ideal For:
Traders and investors who seek a combination of adaptive moving averages and smoothing techniques to capture long-term trends and reduce false signals.
Markets with trending behavior, such as stocks, forex, or cryptocurrencies, where trend-following strategies are effective.
This indicator offers a balanced approach between responsiveness and stability, helping traders and investors to stay on the right side of the trend without being overly sensitive to short-term market fluctuations.
The Smooth MESA Adaptive Moving Average (MAMA) is a powerful trend-following indicator designed to adapt dynamically to market conditions. It enhances the classic MESA Adaptive Moving Average by adding smoothing and multiplier features to reduce noise and improve trend identification. This indicator helps traders to better identify significant turning points in price, making it ideal for detecting trend reversals and filtering out false signals.
Key Features:
Dynamic Adaptation:
The core of the MAMA indicator is based on John Ehlers' MESA algorithm, which adapts to changing market cycles by adjusting the speed of the moving average.
The Fast Limit (fl) and Slow Limit (sl) parameters control the speed at which the MAMA reacts to price changes, allowing it to be more responsive during strong trends and slower during consolidation phases.
Smoothing Functionality:
The indicator introduces a customizable Smoothing Length and a Smoothing Multiplier to smooth out the MAMA and FAMA (Following Adaptive Moving Average), reducing short-term market noise.
This smoothing function improves the clarity of trend signals while maintaining responsiveness to market reversals.
Crossover Signals:
The MAMA and FAMA lines work together to generate crossover signals. When MAMA crosses above FAMA, it indicates a potential buy signal, while a crossover below FAMA signals a potential sell.
These crossovers are highlighted on the chart with visual arrows, making it easier for traders and investors to spot opportunities.
Trend Visualization:
A shaded area between the MAMA and FAMA lines helps visualize positive (bullish) and negative (bearish) trends. Green fill appears when MAMA is above FAMA (bullish trend), while red fill shows when MAMA is below FAMA (bearish trend).
Optional bar coloring provides additional visual cues for trend direction based on MAMA and FAMA crossovers.
Highly Customizable:
Users can adjust the smoothing parameters (Smoothing Length and Smoothing Multiplier), as well as the limits (Fast Limit and Slow Limit), to fine-tune the indicator's sensitivity to market movements.
The option to enable or disable crossover markers and color bars based on trend direction provides flexibility for different trading styles.
Usage:
Buy Signal: When MAMA crosses above FAMA, the indicator suggests a potential bullish trend. Traders and investors may consider entering a long position.
Sell Signal: When MAMA crosses below FAMA, it indicates a potential bearish trend. Traders and investors may consider exiting long positions or entering short positions.
Trend Reversals: The smooth nature of this indicator helps identify major trend reversals while filtering out minor fluctuations, making it useful for swing and position traders.
Ideal For:
Traders and investors who seek a combination of adaptive moving averages and smoothing techniques to capture long-term trends and reduce false signals.
Markets with trending behavior, such as stocks, forex, or cryptocurrencies, where trend-following strategies are effective.
This indicator offers a balanced approach between responsiveness and stability, helping traders and investors to stay on the right side of the trend without being overly sensitive to short-term market fluctuations.
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.