Skip to content

Balance of Power ​

Close minus open over the bar range, -1 to 1.

Kind indicator · Drawn in its own pane

Try it ​

On the chart, press / and choose Balance of Power under Oscillators. To change it, copy the source below into the AlphaScript editor.

Inputs ​

InputTypeDefault
Colorcolor"#FF5252"

Source ​

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

js
indicator({ name: "Balance of Power", shortTitle: "BOP", overlay: false, precision: 2 });
plot(ta.calc([candle.open, candle.high, candle.low, candle.close], (o, h, l, c) => (h - l ? (c - o) / (h - l) : 0)), { title: "BOP", color: input.color("Color", "#FF5252", { group: "Style" }) });
hline(0, { title: "Zero", color: "rgba(120,123,134,0.5)", style: "dashed" });

AlphaScript language v0.1 · runtime 0.2.0