Skip to content

Arnaud Legoux Moving Average ​

Arnaud Legoux: Gaussian-weighted window with an adjustable centre.

Kind indicator · Drawn on the price pane

Try it ​

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

Inputs ​

InputTypeDefault
Window sizeint9
Offsetfloat0.85
Sigmafloat6
Sourcesource"close"
Colorcolor"#2962FF"

Source ​

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

js
indicator({ name: "Arnaud Legoux Moving Average", shortTitle: "ALMA", overlay: true });
const length = input.int("Window size", 9, { min: 1 });
const offset = input.float("Offset", 0.85, { min: 0, max: 1, step: 0.05 });
const sigma = input.float("Sigma", 6, { min: 0.1, step: 0.5 });
const src = input.source("Source", "close");
plot(ta.alma(src, length, offset, sigma), { title: "ALMA", color: input.color("Color", "#2962FF", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0