Wilder's slow, recursive moving average — the RMA that quietly powers RSI and ATR, and mathematically an EMA in disguise.
A smoothed moving average (SMMA) is a recursive moving average that blends each new price into the previous average with a weight of 1/n. It is the smoothing method J. Welles Wilder Jr. used inside RSI, ATR, and ADX in 1978, which is why TradingView exposes it as ta.rma — the 'running moving average' — while MetaTrader lists it as the SMMA method in its moving-average options. The identity almost nobody documents: an SMMA of length n applies exactly the same smoothing weight as an EMA of length 2n−1, so SMMA(n) and EMA(2n−1) are the same filter apart from how the first value is seeded. That single fact explains many of the cross-platform value mismatches traders report between MetaTrader and TradingView — the platforms are usually both correct, just seeded or labelled differently. Like every moving average, the SMMA is a summary of past prices, not a forecast. This material is educational only, not financial advice, and all trading carries risk of loss.
The recursion is SMMA(t) = (SMMA(t−1) × (n−1) + price(t)) / n, which rearranges to SMMA(t−1) + (price − SMMA(t−1)) / n. In filter terms, that is an exponential smoother with alpha = 1/n. A standard EMA of length L uses alpha = 2/(L+1). Setting 2/(L+1) = 1/n and solving gives L = 2n−1: an SMMA(14) applies the same per-bar weight as an EMA(27). The two lines are not bar-for-bar identical from the first candle, because implementations seed differently — RMA conventionally seeds with a simple average of the first n bars, while EMA implementations often seed with the first price — but after a warm-up period they converge and sit on top of each other. Because the calculation is recursive, every value depends on the entire prior history, so two platforms with different amounts of loaded history can show slightly different values early in the chart. Understanding this is also the key to RSI and ATR: when you change 'RSI length 14', you are changing the length of two internal RMAs, which is why RSI feels smoother and slower than its nominal length suggests.
Common lengths are 7, 14, 21, and 50 on the closing price. The Williams Alligator uses SMMAs of 13, 8, and 5 on the median price (with forward offsets). Wilder's original indicators effectively use SMMA lengths of 14 (RSI, ATR, ADX). There is no universally correct length: remember that an SMMA of length n runs at the speed of an EMA of length 2n−1, so choose with that conversion in mind.
//@version=6
indicator("SMMA / RMA vs EMA Equivalence", overlay = true)
len = input.int(14, "SMMA Length", minval = 1)
src = input.source(close, "Source")
smma = ta.rma(src, len)
emaEquiv = ta.ema(src, 2 * len - 1)
plot(smma, "SMMA / RMA", color = color.blue, linewidth = 2)
plot(emaEquiv, "EMA(2n-1) equivalent", color = color.orange)Pro tip: Run the example above and watch the two lines: after the warm-up bars they overlay almost perfectly, which is the SMMA(n) = EMA(2n−1) identity made visible. When two platforms disagree on an SMMA, RSI, or ATR value, suspect seeding or loaded-history depth before suspecting the formula. This is educational context only, not financial advice — no moving average predicts price, and all trading carries risk of loss.
Educational only — not financial advice, not a recommendation to trade. No indicator is predictive; trading involves substantial risk of loss.