# `TAlib.Indicators.MAMA`
[🔗](https://github.com/benyblack/talib/blob/main/lib/indicators/mama.ex#L1)

MESA Adaptive Moving Average (TA-Lib MAMA), translated from the TA-Lib
C reference implementation of John Ehlers' MESA machinery.

The alpha of the exponential average adapts to the phase rate of the
Hilbert-transformed price: it moves at `fast_limit` when the phase
rate is at or below one degree per bar (trending) and slows toward
`slow_limit` as the phase rate rises. `fama` is MAMA itself averaged
again with half the alpha.

Like `TAlib.Indicators.HT` (the 32-lookback family: `ht_dcperiod`,
`ht_phasor`), the first 32 entries are `nil`; TA-Lib's configurable
unstable-period machinery is not mirrored. See `TAlib` for the
conventions.

# `mama`

```elixir
@spec mama([number()], number(), number()) :: %{
  mama: [float() | nil],
  fama: [float() | nil]
}
```

Calculate the MAMA and FAMA series as a map.

## Parameters

  - prices: list of prices, oldest first.
  - fast_limit: maximum alpha, between 0.01 and 0.99 (default 0.5).
  - slow_limit: minimum alpha, between 0.01 and 0.99 (default 0.05).

## Examples

    iex> values = TAlib.Indicators.MAMA.mama(Enum.to_list(1..100))
    iex> Float.round(List.last(values.mama), 4)
    95.7327

---

*Consult [api-reference.md](api-reference.md) for complete listing*
