TL;DR. An exponential average that moves 1/n of the way from its last value to each new one. It is slower than an EMA of the same period (an RMA(n) smooths exactly as an EMA(2n − 1) does), and it is the smoothing Welles Wilder built into RSI and ATR.
What it measures
- A slow, smooth trend line. Every bar nudges the line by 1/n of the gap, so it bends late and rarely whipsaws.
- The same smoothing as RSI and ATR. RSI averages gains and losses with it and ATR averages the true range with it, so an RMA of your own series sits on the same footing as those two.
- Other platforms' SMMA. "Smoothed moving average" and "running moving average" are this line under other names.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Period | 10 | 1 to 500 | The smoothing length: each bar moves the line 1/period of the way to the new value. |
| Source | Close | Close, Open, High, Low, HL2, HLC3, OHLC4 | Which value of each bar is smoothed. HL2 is (high + low) / 2, HLC3 adds the close and divides by 3, OHLC4 averages all four. |
Recommended periods
- 7 to 14 (fast): The lengths Wilder used; a line that matches an EMA of 13 to 27.
- 20 to 50 (medium): A trend line on intraday bars, close to an EMA of 39 to 99.
- 100 and up (slow): A very slow regime line; an EMA of the same feel would need about twice the period.
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| RMA | Numeric | Always | The smoothed average in the source's units, drawn over the candles. Comparable directly to price and to any other average. |
How to read it
- Price above a rising RMA: an up state for this period, and a slow one: the line confirms trends late but stays with them.
- Price below a falling RMA: the mirror, a down state.
- RMA against an EMA of the same period: the EMA turns first. Use an RMA(n) where you would otherwise reach for an EMA of about twice n.
- Flattening RMA: the recent bars are pulling evenly both ways, so the trend has paused.
Best in, worst in
Best in steady trends, as a slow line that holds a position through ordinary pullbacks, and anywhere you want to match the smoothing of RSI or ATR.
Worst in fast reversals: the line can sit on the wrong side of price for many bars after a turn.
Three setups
1. RMA trend filter
Compare price with an RMA(50) through a Comparison node and AND it into another entry: longs only above the line, shorts only below it.
2. Fast EMA over a slow RMA
Add an EMA(10) and an RMA(30) and a Crossover node reading them. The RMA(30) moves like an EMA(59), so the pair separates trends clearly.
3. A Wilder envelope
Wire an RMA(20) into Center and an ATR(14) into Width of a Bands node with multiples of 1.5 and 3. Both lines are Wilder-smoothed, so the envelope breathes at one pace: fade touches of the 1.5 lines in a range, or follow a close beyond the 3 lines as a breakout.
Common mistakes
- Copying an EMA period across. An RMA(20) is a much slower line than an EMA(20). Halve the period, roughly, to keep the feel.
- Expecting the first bars to match another platform. Platforms seed the average differently (the first value, or an SMA of the first n). The lines meet after a few times n bars.
- Tuning the period too finely. A rule that works at RMA(21) and fails at 20 or 22 has found noise (overfitting in trading).
An RMA moves 1/n of the way each bar: the slow, smooth average inside RSI and ATR, about as fast as an EMA of twice the period.