How it is calculated
Each bar's raw value is (close minus open) divided by (high minus low), from -1 to 1; it is 0 on a bar with no range. The line is an SMA of the raw values over the smoothing length; a smoothing of 1 is the raw value itself, which is TA-Lib BOP. After Livshin 2001.
Reference: TA-Lib BOP (Livshin 2001), smoothed by an SMA
How to read it
Above zero the bars mostly closed above their open, below zero below it; near 1 or -1 they closed at their extremes. A turn of the smoothed line, or a divergence from price, can show control changing sides. Gaps between bars do not count, since only each bar's own open and close are used.
In a strategy
A filter that allows longs only while buyers control the bars: ctx.ind("bop", smooth=14) > 0, or a confirmation of a breakout when it turns positive.
Inputs
| Input | Type | Default | Range or choices |
|---|---|---|---|
Smoothingsmooth | Whole number | 14 | min 1, max 5000 |
What it draws
| Line | Drawn as |
|---|---|
| BOP | Line |
Moves between -1 and 1. Guide lines at 0.
Used in
No strategy template reads it yet.