AMA Pass
Adaptive Moving Average — Series Input
IndicatorTrendOverlay
Overview
AMA Pass applies the Adaptive Moving Average (Perry Kaufman) to any upstream numeric series. The smoothing constant adapts to the efficiency ratio of recent price movement: fast in trending markets, slow in choppy conditions.
Formula
ER = |x[t] − x[t−period]| / Σ|x[i] − x[i−1]| fastSC = 2/(fastPeriod+1) slowSC = 2/(slowPeriod+1) SC = (ER·(fastSC−slowSC) + slowSC)² AMA[t] = AMA[t−1] + SC·(x[t] − AMA[t−1])
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 10 | Efficiency ratio lookback length. |
| fastPeriod | number | 2 | Fast EMA period used when market is trending. |
| slowPeriod | number | 30 | Slow EMA period used when market is ranging. |
Inputs & Outputs
| Port | Direction | Type | Description |
|---|---|---|---|
| input | Input | (number | null)[] | Any numeric series (values + timestamps). |
| values | Output | (number | null)[] | Smoothed output series, null for warm-up bars. |
| timestamps | Output | number[] | Bar timestamps aligned with values. |