Skip to content

Smoothed Moving Average ​

Smoothed (Wilder) moving average, the RMA used by RSI and ATR.

Kind indicator · Drawn on the price pane

Try it ​

On the chart, press / and choose Smoothed Moving Average under Moving averages. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint7
Sourcesource"close"
Colorcolor"#673AB7"

Source ​

From packages/alphascript/indicators/smma.as.js.

js
indicator({ name: "Smoothed Moving Average", shortTitle: "SMMA", overlay: true });
const length = input.int("Length", 7, { min: 1 });
const src = input.source("Source", "close");
plot(ta.rma(src, length), { title: "SMMA", color: input.color("Color", "#673AB7", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0