Multi Adaptive Moving Average (MAMA)
Aug 31, 2024

The Multi Adaptive Moving Average (MAMA) indicator provides a multi-layered trend analysis framework by combining four distinct moving averages with predictive forecasting to anticipate future price direction.
Usage
The Usage section describes how the script can be used to identify trend structure and potential future price paths. Traders can utilize the indicator for the following:
- Trend Confirmation: Observe the alignment of the four moving averages. A bullish alignment occurs when the Short MA is above the Mid, Long, and Very Long MAs. Conversely, a bearish alignment is established when the Short MA is at the bottom of the stack.
- Mean Reversion and Support/Resistance: The various MA lengths (20, 50, 100, 200) act as dynamic levels where price may find support or resistance.
- Predictive Forecasting: The indicator projects the moving averages into the future. If the forecast points upward, it suggests the current momentum is likely to sustain the trend; a flattening or reversing forecast can signal an exhaustion in momentum.
- Crossover Signals: Built-in alerts trigger when the Short MA crosses the Mid MA, or when the Mid MA crosses the Long MA, identifying potential entry or exit points.
Details
The MAMA tool is constructed using a combination of traditional smoothing averages and statistical projection methods.
- Moving Average Calculation: Users can toggle between Simple Moving Averages (SMA) for a smoother, lag-tolerant view, or Exponential Moving Averages (EMA) for faster reactions to recent price volatility.
- Forecasting Logic: The indicator calculates a 5-step projection for each active moving average.
- Flat Forecast: Projects the current price forward, assuming no immediate change in trend slope.
- Linear Regression Forecast: Uses a regression length to calculate the line of best fit, projecting the MA based on existing historical momentum.
- Adaptive Lookback: The indicator can be set to include or exclude the current unclosed candle, allowing traders to avoid "repainting" or lag depending on their preference for real-time data versus confirmed bar closes.
Settings
- Source: Determines the price data used for calculations (e.g., Close, Open, HL2).
- Include current candle: If enabled, the MAMA includes the live candle in its calculations; if disabled, it uses the previous confirmed candle.
- Moving average type: Switches between SMA and EMA for all four lines.
- Forecast type: Selects between 'flat' (price constancy) or 'linreg' (momentum-based projection).
- Linear regression length: Sets the lookback period used specifically for the linear regression forecast calculation.
- Short/Mid/Long/Very Long MA Lengths: Customizes the periods for the four averages (Defaults: 20, 50, 100, 200).
- Color Inputs: Allows customization of the visual styles for each moving average and its associated forecast.
FAQ
How do I interpret the dashed lines at the end of the moving averages? The dashed lines represent the 5-step forecast. They indicate the projected path of the moving average based on the selected forecast mode (Flat or Linear Regression).
Can I use this for intraday scalping? Yes, by adjusting the MA lengths to shorter periods and using the EMA setting, the indicator can be adapted for lower timeframes to capture rapid price shifts.
How can I access the Multi Adaptive Moving Average (MAMA)? 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.

