Concept

RMA

RMA, also known as Wilder smoothing, SMMA, is a Trend concept. The Library holds 1 implementation — a working definition you can pull into Quant.

Top RMA indicator

The top custom implementation, built on the original standard RMA formula.

1 total

Want to trade RMA? The implementation below is one prompt away from a backtested strategy in Quant.

What is the RMA?

The RMA (running moving average) is the recursive smoother J. Welles Wilder introduced in his 1978 book New Concepts in Technical Trading Systems, which is why it also goes by Wilder smoothing or the smoothed moving average (SMMA). Each bar it keeps (N-1)/N of its previous value and blends in 1/N of the new price: multiply yesterday's RMA by N-1, add today's value, divide by N. That makes it an EMA in disguise, just with a smaller smoothing factor: alpha equals 1/N instead of the standard 2/(N+1).

The consequence is that an N-period RMA is markedly slower than an N-period EMA; equating smoothing factors shows a 14-period RMA responds like a 27-period EMA (2N-1 in general). That matters less as a stand-alone line than as plumbing: RMA is the smoothing inside RSI's average gain and loss, ATR, and the ADX / DMI system. Wilder chose it because the recursion was easy to update by hand in 1978. Swap in a different average and those indicators still compute, but their values and feel change.

The memory arithmetic explains the temperament. With alpha at 1/N, each bar's influence decays by a factor of (N-1)/N per step, giving a half-life of roughly 0.7×N bars, and meaningful weight persists for several multiples of the stated period, far longer than the name suggests. The same slow decay makes the seed linger: whatever value starts the recursion still colors the line dozens of bars later, which is why platforms that seed differently, simple average of the first N values versus first price, disagree visibly on early history and only converge slowly.

In practice the RMA survives on convention and compatibility. Charting languages ship it as a primitive precisely because Wilder's indicators need it; the MetaTrader world calls the identical recursion SMMA; and derived tools inherit it silently, ATR bands and channel constructions defaulting to RMA-smoothed true range. The porting rule follows: an N-period smoothed MA on one platform is the same line as an N-period RMA elsewhere and close kin to a (2N-1) EMA, and knowing those equivalences is the difference between translating a system and quietly rebuilding a different one.

How to calculate the RMA

The formula is a one-line recursion; the details that matter are the seed and the smoothing factor.

  1. 1Seed it: take the simple average of the first N values (Wilder's own method) as the starting RMA. Platforms differ slightly here, which is why early-history values can disagree.
  2. 2Update each bar: multiply the previous RMA by N-1, add the current value, and divide by N. Equivalently, new RMA = previous + (price - previous)/N.
  3. 3Sanity-check it: the result should match an EMA whose smoothing factor is exactly 1/N, apart from seeding differences on the earliest bars.
  4. 4Mind the seed's tail: with alpha this small, the starting value influences the line for several multiples of N bars, so comparisons need enough warm-up history.
  5. 5For cross-platform equivalence, remember the mapping: RMA(N) equals SMMA(N) equals an EMA of period 2N-1, which is the conversion that keeps ported systems honest.

How traders use it

  • Inside Wilder's indicators: RSI, ATR, and ADX all smooth their raw components with the RMA. Reproducing textbook or platform values requires it; substituting an EMA or SMA yields a more nervous or choppier indicator.
  • As a slow trend baseline: SMMA lines are used where a calm, rarely-flipping reference is wanted, with price's position or the line's slope supplying the bias.
  • In crossover systems built for patience: pairs of RMAs flip far less often than same-length EMA pairs, trading responsiveness for fewer whipsaws.
  • As a porting detail: when translating a strategy between platforms, identifying whether a 'smoothed MA' means the RMA prevents silent changes in signal timing.
  • As the default inside derived volatility tools: ATR bands and channel constructions inherit RMA smoothing through their ATR core, so their width dynamics carry Wilder's slow decay whether the user chose it or not.

RMA vs EMA and SMA

EMA: Same recursion, different weight on the new bar: the EMA uses alpha = 2/(N+1), the RMA uses 1/N. At equal stated periods the RMA is roughly twice as slow; an N-period RMA behaves like a (2N-1)-period EMA.

SMA: The SMA averages a finite window and forgets each bar completely once it exits; the RMA never fully forgets, discounting the past exponentially instead. The SMA's memory is fixed by its window, while the RMA's effective memory stretches well beyond its nominal period.

Ehlers SuperSmoother: Opposite ends of smoothing history: the RMA is a 1978 hand-calculable recursion that survives through Wilder's indicators, the SuperSmoother a frequency-designed two-pole filter engineered for attenuation per unit of lag. For new construction the filter argues for itself; for compatibility, the RMA is non-negotiable.

Concept family

Trend

100 concepts mapped · 100 in the Library

RMA FAQ

Are RMA, SMMA, and Wilder's smoothing the same thing?

Yes. Running moving average (RMA), smoothed moving average (SMMA), Wilder's smoothing, and modified moving average all name the same recursion: previous value times N-1, plus the new price, divided by N. Differences you see between platforms almost always come from seeding choices on the earliest bars, not from the formula.

Why doesn't my RSI match the platform's when I rebuild it with an EMA?

Because Wilder's RSI smooths average gains and losses with the RMA, whose smoothing factor is 1/14 at the standard setting, while a 14-period EMA uses the larger factor 2/15 and reacts faster. To approximate the original with EMA-based tools, set the EMA period to 2N-1, which is 27 for the standard 14.

Why did Wilder use RMA instead of a regular moving average?

Practicality. In 1978 his indicators were computed by hand or on basic calculators, and the RMA needs only the previous value and the new price: multiply, add, divide. There is no window of history to store and no full recomputation each day. The stable smoothing it produces suited RSI and ATR well enough that the convention stuck.

What is the RMA's effective memory?

Longer than its name. With alpha at 1/N the half-life is about 0.7 times N bars, and the line behaves like an EMA of period 2N-1, so a 14-period RMA carries meaningful weight from several dozen bars back. That stretched memory is what makes Wilder's indicators feel calm at their standard settings, and it is also why short-history charts show RMA-based tools still settling in.

Is Pine's rma() the same as MetaTrader's SMMA?

The recursions are identical; both implement Wilder's smoothing with alpha equal to 1/N. Any visible differences come from the usual suspects: seeding method on the earliest bars, data history length, and occasionally the price input. When translating indicators between platforms, mapping smoothed MA names onto this one recursion, and checking the seed, resolves nearly every mystery mismatch.

Can I replace the RMA inside RSI or ATR?

Mechanically yes, and people do: EMA-smoothed RSI variants react faster and SMA versions chop more. What changes is comparability, since textbook levels like RSI 70/30 and every published ATR-multiple convention were calibrated on Wilder's smoothing. Swapping the average creates a related but different indicator whose thresholds deserve re-deriving, which is fine as design and misleading as a silent substitution.

Turn RMA into a trading strategy.

Take the implementation from this page into Quant, then build on it, backtest it on real data, and keep refining it with AI.