Skip to content

Triple EMA ​

Triple EMA: three nested EMAs combined to cut lag further.

Kind indicator · Drawn on the price pane

Try it ​

On the chart, press / and choose Triple EMA 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/tema.as.js.

js
indicator({ name: "Triple EMA", shortTitle: "TEMA", overlay: true });
const length = input.int("Length", 9, { min: 1 });
const src = input.source("Source", "close");
const e1 = ta.ema(src, length), e2 = ta.ema(e1, length), e3 = ta.ema(e2, length);
plot(ta.calc([e1, e2, e3], (a, b, c) => 3 * (a - b) + c), { title: "TEMA", color: input.color("Color", "#2962FF", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0