OPEN-SOURCE SCRIPT

MAMA [DCAUT]

65
█ MAMA Adaptive Moving Average [DCAUT]

📊 OVERVIEW

MAMA (MESA Adaptive Moving Average) is an advanced trend-following system developed by John F. Ehlers in 2001 and featured in his book "Rocket Science for Traders." This innovative algorithm uses the Hilbert Transform Discriminator to automatically adapt to market cycles.

Unlike traditional moving averages that use fixed periods, MAMA intelligently adjusts to dominant market cycles, delivering faster signals with fewer false breakouts. The indicator achieves this by dynamically adjusting its smoothing factor, resulting in reduced lag while maintaining reliable trend detection.

🎯 KEY CONCEPTS

How It Works
  • Hilbert Transform: Employs digital signal processing to detect price cycles
  • Dual-Line System: MAMA (fast line) and FAMA (slow line) create crossover signals
  • Cycle Adaptation: Automatically adjusts responsiveness based on market rhythm
  • Staircase Movement: Rapidly tracks price changes while holding values until the next shift


Key Advantages
  • Cleaner Signals: Helps reduce whipsaws in choppy markets
  • Lower Lag: Responds faster than conventional moving averages
  • Self-Adjusting: Automatically identifies and adapts to dominant cycles
  • Advanced Algorithm: Built on MESA (Maximum Entropy Spectral Analysis) technology



📋 PARAMETER SETTINGS

Source (Data Input)
Uses HL2 (average of high and low prices) by default, which is the standard input in Ehlers' original algorithm

Fast Limit - Controls Maximum Responsiveness
  • 0.3-0.4: Stable markets, longer-term analysis
  • 0.5: Default setting, works well for most conditions
  • 0.6-0.8: Volatile markets, shorter-term trading


Slow Limit - Controls Minimum Smoothing
  • 0.02-0.03: High volatility markets, needs extra smoothing
  • 0.05: Default setting, balanced response and smoothing
  • 0.07-0.10: Stable markets, increased sensitivity


📈 READING THE SIGNALS

Line Identification
  • Green Line (MAMA): Fast adaptive moving average
  • Red Line (FAMA): Following adaptive moving average


Trading Signals
  • MAMA Golden Cross: MAMA crosses above FAMA
    - Potential bullish signal
    - Consider long positions
  • MAMA Death Cross: MAMA crosses below FAMA
    - Potential bearish signal
    - Consider reducing positions or going short


Trend Confirmation
  • MAMA above FAMA: Uptrend in progress
  • MAMA below FAMA: Downtrend in progress
  • Lines moving parallel: Strong trend continuation
  • Lines converging: Potential trend change ahead


📄 License: MIT License
👨‍💻 Developer: DCAUT Team

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.