Back to Docs
Traderoid

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

ParameterTypeDefaultDescription
periodnumber10Efficiency ratio lookback length.
fastPeriodnumber2Fast EMA period used when market is trending.
slowPeriodnumber30Slow EMA period used when market is ranging.

Inputs & Outputs

PortDirectionTypeDescription
inputInput(number | null)[]Any numeric series (values + timestamps).
valuesOutput(number | null)[]Smoothed output series, null for warm-up bars.
timestampsOutputnumber[]Bar timestamps aligned with values.