Skip to content

Aroon ​

Bars since the N-bar high and low, as 0 to 100.

Kind indicator · Drawn in its own pane

Try it ​

On the chart, press / and choose Aroon under Trend. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Lengthint14
Up colorcolor"#FB8C00"
Down colorcolor"#2962FF"

Source ​

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

js
indicator({ name: "Aroon", shortTitle: "Aroon", overlay: false, precision: 2 });
const length = input.int("Length", 14, { min: 1 });
const up = ta.calc([ta.highestbars(candle.high, length + 1)], (b) => (100 * (b + length)) / length);
const down = ta.calc([ta.lowestbars(candle.low, length + 1)], (b) => (100 * (b + length)) / length);
plot(up, { title: "Aroon Up", color: input.color("Up color", "#FB8C00", { group: "Style" }) });
plot(down, { title: "Aroon Down", color: input.color("Down color", "#2962FF", { group: "Style" }) });

AlphaScript language v0.1 · runtime 0.2.0