> For the complete documentation index, see [llms.txt](https://docs.optionalpha.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.optionalpha.com/technical-documentation/indicators/bop.md).

# BOP

## BOP

The Balance of Power indicator (BOP) measures the strength of buyers have to push prices higher against the power of sellers to move prices lower. When the indicator is in positive territory, the bulls are in charge; and conversely, the sellers control price when the indicator is negative. A reading near the zero line indicates a balance between the two and a possible trend reversal.

```
  /* BOP = (Close - Open)/(High - Low) */
```

The source code for the BOP function is available [here](https://app.optionalpha.com/ta/BOP.txt).\
\
Some trading platforms offer a version of BOP with a moving average added and others do not.\
\
We offer Balance of Power exactly as TA-Lib provides **without a moving average**. As a result, when using BOP inside of your bots, there will be no difference in the value provided when assessing different lookback intervals.

![](https://2799944806-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MYjluAVRcRcfh1YL43z%2Fuploads%2FP5sYObs1RXTNfpvZQEOh%2FBalance%20Of%20Power.png?alt=media\&token=a2c5c4c7-336e-466d-9e0b-bc1d9c7306b7)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.optionalpha.com/technical-documentation/indicators/bop.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
