# Smoothed moving average (Wilder)

`rma`

Wilder's smoothing: a slow average seeded with the mean of the first N values.

## Inputs

| Name | Type | Default | Range |
| --- | --- | --- | --- |
| source | source | close |  |
| period | int | 13 | 1 to 5000 |

## Outputs

| Name | Kind |
| --- | --- |
| rma | value |

Warm-up: period - 1 bars (12 at the defaults).

Repaints: No.

## Formula

RMA[period-1] = mean of the first period values

RMA[i] = (RMA[i-1] * (period - 1) + x[i]) / period

After a gap the average starts again with a new seed.
