Search
Trading Tools
    Menu Close

    cTrader Ehlers MESA Adaptive Indicator


    Support via Forum & AI Assistant

    The Ehlers MESA Adaptive Moving Average (MAMA) uses advanced signal processing to adjust in real time to changing market cycles. Unlike standard moving averages, it reduces lag and reacts quickly to price action, making it a valuable tool for identifying trend shifts, especially in algorithmic trading on platforms like cTrader.
    (OS) Type: Windows & Mac OS Compatible
    Current version: 1.0.0
    Updated: Sunday, 29 November 2026

    cTrader Indicator

    Please review our Licensing Terms and Disclaimer.

    ⚡ Claim £5 Free AI Credit

    Free for personal use under our license agreement.

    Two downloads per day. No account needed.

    Buy Source Code
    cTrader License

    MESA Adaptive Moving Average indicator is a trend-following indicator developed by John Ehlers, and unlike standard moving averages that use a fixed lookback period, MAMA adapts in real time by analysing price cycles through Ehlers' Maximum Entropy Spectrum Analysis. This advanced method allows the indicator to respond more quickly to shifts in market conditions, making it especially useful for identifying trend changes and improving entry and exit timing.

    The MAMA indicator is made up of two lines, the main MAMA line and the FAMA (Following Adaptive Moving Average) line. Unlike static averages, this adaptive approach helps cut through noise during sideways markets while staying responsive when prices move sharply.

    Traders using platforms like cTrader benefit from MAMA’s dynamic nature, especially when precision and timely signal detection are key for both trend and countertrend trading strategies.

     

    cTrader Ehlers MESA Adaptive Indicator

     

    Ehlers MESA Adaptive Moving Average Formula

    The formula for the Ehlers MESA Adaptive Moving Average Indicator involves several steps, using both price data and phase calculations derived from digital signal processing techniques. Here is a simplified version of the core logic behind it, based on John Ehlers' original work:

    // Step 1: Calculate the Typical Price
    price = (high + low) / 2
    
    // Step 2: Determine the phase (using Hilbert Transform methods - simplified here)
    deltaPhase = rate of phase change (from Hilbert Transform)
    alpha = fastLimit / deltaPhase (bounded by slowLimit)
    
    // Step 3: Calculate MAMA and FAMA
    MAMA = alpha * price + (1 - alpha) * previous_MAMA
    FAMA = 0.5 * alpha * MAMA + (1 - 0.5 * alpha) * previous_FAMA
    

    Notes:

    • fastLimit is typically 0.5
    • slowLimit is typically 0.05
    • MAMA adapts faster in trending markets and slows down in sideways markets

     

    Key Concepts:

    • MAMA adapts to the dominant market cycle

    • FAMA lags behind MAMA, forming a signal line

    • Crossovers between MAMA and FAMA are used as trading signals

    This formula is non-linear and not based on fixed periods, making it different from traditional moving averages. It's often implemented using DSP techniques, so most traders use it via pre-built indicators on platforms like cTrader or MetaTrader rather than coding it from scratch.

     

    How To Install & Remove

    First, ensure that you have the cTrader trading platform installed. Then, unzip the file and double-click it to install the platform automatically.

     

    Build or customise a cTrader indicator with Xen AI

    Describe the indicator you want to build, or paste your existing cTrader source code into Xen. For example, you can ask Xen to add an alert when a signal appears or change how the indicator draws it on the chart. You can also use Xen to build and modify cBots.

    Open cTrader Xen AI

     

    Looking for a cTrader broker?

    If tight spreads and fast execution matter to you, use our cTrader broker guide to compare your options.

    Compare cTrader brokers →