Skip to content

Average True Range ​

Average true range (volatility).

Kind indicator · Drawn in its own pane

Try it ​

On the chart, press / and choose Average True Range under Oscillators. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint14
Colorcolor"#B71C1C"

Source ​

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

js
indicator({ name: "Average True Range", shortTitle: "ATR", overlay: false });
plot(ta.atr(input.int("Length", 14, { min: 1 })), { title: "ATR", color: input.color("Color", "#B71C1C", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0