How it is calculated
Each bar the new value is the previous one times (length minus 1) plus the price, divided by length: an exponential average with the factor 1 / length. It is seeded with the simple average of the first length prices, so the first value comes once length bars are in. Apart from the seed it equals an EMA of length 2 times length minus 1.
Reference: Wilder 1978 (RMA, SMMA)
How to read it
Read like any moving average, only slower: an RMA 14 reacts about like an EMA 27. On a chart it is mostly useful to follow or check the smoothing inside Wilder's indicators.
In a strategy
Smoothing in Wilder's style, or a slow trend line: the close against ctx.ind("rma", length=14).
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Lengthlength | Whole number | 14 | min 1, max 5000 |
Sourcesource | Price | "close" | close, open, high, low, hl2, hlc3, ohlc4, hlcc4 |
What it draws
| Line | Drawn as |
|---|---|
| RMA | Line |
Used in
No strategy template reads it yet.