Skip to content

Moving Average Exponential ​

Exponentially weighted mean, reacts faster than SMA.

Kind indicator · Drawn on the price pane

Try it ​

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

Inputs ​

InputTypeDefault
Lengthint9
Sourcesource"close"
Colorcolor"#2962FF"

Source ​

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

js
indicator({ name: "Moving Average Exponential", shortTitle: "EMA", overlay: true });
const length = input.int("Length", 9, { min: 1 });
const src = input.source("Source", "close");
plot(ta.ema(src, length), { title: "EMA", color: input.color("Color", "#2962FF", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0