# MAMA/FAMA

Plots Ehlers' MESA adaptive pair: MAMA retunes its smoothing factor every bar from the dominant cycle phase between a 0.5 Fast Limit and a 0.05 Slow Limit, with FAMA trailing at half that factor as the signal line. The pair colors by cross state under a gradient fill. For trend followers who want crossovers that sit flat through cyclic chop and jump with breakouts.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Feb 7, 2026.
- Access: free.
- Concepts: [MAMA/FAMA](https://www.luxalgo.com/library/concept/mama-fama/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=pcpcckk4utzdyre8461rx5k5
- Page: https://www.luxalgo.com/library/indicator/mama-fama/

**MAMA/FAMA** plots John Ehlers' [MESA Adaptive Moving Average](https://www.luxalgo.com/library/concept/mama-fama/) pair exactly as published: a Hilbert-transform homodyne discriminator measures the dominant cycle's period and phase, the phase's rate of change drives MAMA's smoothing factor between the 0.5 Fast Limit and the 0.05 Slow Limit, and FAMA shadows it at half of MAMA's factor. The result is the signature stair-step (nearly flat while price behaves cyclically, snapping to price when it breaks directional), with both lines colored by cross state under a gradient fill.

## How to Trade the MAMA/FAMA?

- **MAMA crosses above FAMA**: the conventional long bias; the mirror cross flips it bearish. Optional circles mark the events and both alerts fire regardless.
- **Flat treads**: MAMA pinned near the slow limit means the discriminator reads the tape as cyclic, a stretch where fresh crosses deserve less trust.
- **Glowing fill**: the gradient strengthens as trend separation widens; braided, quiet stretches mark balance.
- **MAMA slope turns**: slope-reversal alerts catch each new leg of the ratchet without waiting for the lines to cross.

The adaptation does the filtering a fixed-length pair leaves to you: the lines only separate when the cycle read stalls, so much of the chop never prints a cross, though a slow grind can still stall the phase and fake the read.

## MAMA/FAMA Settings

- **Source** (default hl2): series the pair is computed on, the bar midpoint used in Ehlers' study.
- **Fast Limit** (default 0.5): upper bound of the adaptive factor, reached when the phase stops advancing; roughly a 3-bar EMA. Widening the limits exaggerates the stair-step and adds whipsaw risk.
- **Slow Limit** (default 0.05): lower bound where MAMA pins during steady phase rotation; roughly a 39-bar EMA.
- **Style toggles**: Gradient Fill (on) and Crossover Markers (off).

## Frequently Asked Questions

### How does MAMA/FAMA differ from FRAMA?
Both adapt an EMA's factor bar by bar, but [FRAMA](https://www.luxalgo.com/library/indicator/frama/) reads roughness through fractal dimension while MAMA reads the dominant cycle's phase through a Hilbert transform. MAMA also ships with its own signal line, FAMA, so the pair generates crossovers by itself rather than against price.

### What produces the stair-step movement?
The factor lives near one of two extremes most of the time. Steady phase rotation pins it at the Slow Limit, where the line barely moves; when the phase stalls the factor leaps to the Fast Limit and the plot snaps onto price.

### Do the default limits depend on the timeframe?
No: 0.5 and 0.05 are the published values, and the discriminator measures the cycle in bars whatever the chart. The measured period is clamped between 6 and 50 bars internally, so extreme regimes read at the clamp.

## Related indicators

- [Trend Regularity Adaptive Moving Average](https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average/) (TRAMA): markdown at https://www.luxalgo.com/library/indicator/trend-regularity-adaptive-moving-average.md
- [Machine Learning Moving Average](https://www.luxalgo.com/library/indicator/machine-learning-moving-average/) (Adaptive-lookback MA): markdown at https://www.luxalgo.com/library/indicator/machine-learning-moving-average.md
- [ZLEMA](https://www.luxalgo.com/library/indicator/zlema/) (Trend): markdown at https://www.luxalgo.com/library/indicator/zlema.md
- [Moving Average Converging](https://www.luxalgo.com/library/indicator/moving-average-converging/) (EMA): markdown at https://www.luxalgo.com/library/indicator/moving-average-converging.md
- [MLMA](https://www.luxalgo.com/library/indicator/mlma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/mlma.md
- [Volume-adjusted MA](https://www.luxalgo.com/library/indicator/volume-adjusted-ma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/volume-adjusted-ma.md
- [JMA](https://www.luxalgo.com/library/indicator/jma/) (Trend): markdown at https://www.luxalgo.com/library/indicator/jma.md
- [T3](https://www.luxalgo.com/library/indicator/t3/) (Trend): markdown at https://www.luxalgo.com/library/indicator/t3.md

---

Source: https://www.luxalgo.com/library/indicator/mama-fama/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
