Appearance
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
| Input | Type | Default |
|---|---|---|
| Length | int | 14 |
| Color | color | "#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" }) });