MESA Adaptive Moving Average
Under the Hood
MAMA is an advanced adaptive moving average developed by John Ehlers using his MESA (Maximum Entropy Spectrum Analysis) algorithm to detect dominant market cycles. It outputs two lines: MAMA (faster) and FAMA (Following Adaptive Moving Average). The fast_limit (default 0.5) and slow_limit (default 0.05) parameters control the adaptation range - MAMA adjusts its period based on detected cycle length using Hilbert Transform techniques. The indicator automatically speeds up and slows down based on measured market periodicity, making it highly responsive to changing cycle regimes.
In Practice
Advanced cryptocurrency traders use MAMA/FAMA crossovers as adaptive trend signals - buy when MAMA crosses above FAMA, sell when crossing below. The dual-line system provides faster signals than traditional moving average crossovers because both lines adapt to market cycles. MAMA excels in crypto markets with varying cycle lengths, automatically adjusting from fast day-trading signals to slower position-holding periods. It works particularly well when combined with Ehlers' other cycle indicators (HT_DCPERIOD, HT_TRENDMODE) for regime detection. Algorithmic traders favor MAMA for automated systems requiring cycle-aware trend following without manual optimization.
Build automated strategies using MESA Adaptive Moving Average and hundreds of other indicators. Connect to your favourite exchange and let the bot execute trades 24/7 — no code required.