MAMA (Ehlers) MESA Adaptive Moving Average
Mar 30, 2020

The MAMA (Ehlers) MESA Adaptive Moving Average indicator provides a sophisticated trend-following framework that adapts its smoothing factor based on the phase rate of the market's dominant cycle. This tool aims to reduce lag significantly while maintaining smooth price tracking, offering traders a more responsive alternative to traditional moving averages.
Usage
The MAMA indicator is used to identify trend direction and potential reversal points by analyzing the relationship between two adaptive lines: the MESA Adaptive Moving Average (MAMA) and the Following Adaptive Moving Average (FAMA).
- Trend Identification: When the MAMA line is above the FAMA line, the market is considered to be in a bullish trend. Conversely, when the MAMA line is below the FAMA line, the market is in a bearish trend.
- Crossover Signals: Traders often look for crossovers between MAMA and FAMA as entry or exit signals. A "Long" signal is typically generated when FAMA crosses under MAMA, while a "Short" signal is generated when FAMA crosses over MAMA.
- Adaptability: Because the alpha (smoothing factor) is determined by the phase of the market cycle, the indicator responds rapidly to price changes during trending moves and slows down during sideways or cyclic phases to avoid whipsaws.
Details
Developed by John Ehlers, the MESA Adaptive Moving Average (MAMA) utilizes a homodyne discriminator to determine the instantaneous phase of the market. Unlike standard exponential moving averages that use a fixed alpha, MAMA adjusts its smoothing based on the rate of change of the phase.
The script executes several complex signal processing steps:
- Price Smoothing: A 4-tap WMA is applied to the median price.
- Quadrature Components: The script calculates InPhase (I) and Quadrature (Q) components to transform price data into the frequency domain.
- Phase Calculation: By determining the arctangent of the ratio of these components, the script finds the current phase of the cycle.
- Alpha Calculation: The difference in phase (delta phase) determines the alpha. This ensures that the average adapts its speed to the market's current volatility and cycle position.
- FAMA Generation: The Following Adaptive Moving Average (FAMA) is calculated by applying a secondary smoothing to the MAMA values, resulting in a signal that follows MAMA with an added lag, facilitating crossover identification.
Settings
- Fast Limit: Sets the maximum limit for the alpha value. A higher fast limit allows the indicator to respond more aggressively to rapid price movements.
- Slow Limit: Sets the minimum limit for the alpha value. This ensures that even in non-trending markets, the indicator maintains a baseline level of smoothing and does not stop updating.
FAQ
How do I interpret the MAMA and FAMA lines? The MAMA line is the primary adaptive average, while the FAMA line is a derivative of MAMA that acts as a synchronized signal line. Crossovers between these two lines indicate potential shifts in market momentum and trend direction.
What makes this indicator "adaptive" compared to an EMA? A standard EMA uses a fixed smoothing constant. This indicator calculates a unique smoothing constant (alpha) for every bar based on the rate of change of the market cycle's phase, allowing it to "speed up" during trends and "slow down" during consolidation.
How can I access the MAMA (Ehlers) MESA Adaptive Moving Average? You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

