# `TAlib.Indicators.BOP`
[🔗](https://github.com/benyblack/talib/blob/main/lib/indicators/bop.ex#L1)

Balance of Power: `(close - open) / (high - low)`.

Ranges from -1 (close at the low after opening at the high) to 1. Bars
are maps with `:open`, `:high`, `:low` and `:close`; zero-range bars
give `nil`. See `TAlib` for the conventions.

# `bop`

```elixir
@spec bop([map()]) :: float() | nil
```

The Balance of Power of the latest bar.

## Examples

    iex> bars = [
    ...>   %{open: 9.5, high: 10, low: 9, close: 9.5},
    ...>   %{open: 10.0, high: 11, low: 9.5, close: 10.5}
    ...> ]
    iex> TAlib.Indicators.BOP.bop(bars) |> Float.round(4)
    0.3333

# `bop_list`

```elixir
@spec bop_list([map()]) :: [float() | nil]
```

The Balance of Power of every bar.

    iex> TAlib.Indicators.BOP.bop_list([
    ...>   %{open: 9.5, high: 10, low: 9, close: 9.5},
    ...>   %{open: 10.0, high: 11, low: 9.5, close: 10.5}
    ...> ])
    [0.0, 0.3333333333333333]

---

*Consult [api-reference.md](api-reference.md) for complete listing*
