# OBV (On-Balance Volume)

#### What is OBV?

**On-Balance Volume (OBV)** is a momentum-based volume indicator that uses volume flow to predict price movements and is based on the idea that volume precedes price meaning that significant changes in volume often foreshadow price trends.

OBV tracks cumulative buying and selling pressure by adding volume on up days and subtracting it on down days.

***

#### Why Use OBV in Your Strategy?

OBV gives insight into how strong a price trend is and whether it’s being supported by real volume. This makes it valuable for:

* **Early Trend Detection**: Sharp moves in OBV can hint at upcoming breakouts before price action reflects it.
* **Divergence Signals**: A classic use of OBV is spotting divergence between price and volume flow (e.g., price going up but OBV going down).
* **Confirmation Tool**: OBV can confirm whether a breakout is supported by strong volume or not helping filter false moves.
* **Volume-Based Entries**: When OBV breaks previous highs/lows, it often signals strong buying/selling pressure behind the scenes.

***

#### OBV Settings in the AlgoBuilder

\
When adding OBV to your strategy inside the **AlgoBuilder**, you’ll be able to customize or use the following parameters:

| Setting Name       | Description                                                                                            |
| ------------------ | ------------------------------------------------------------------------------------------------------ |
| `OBV Smoothing`    | Optional moving average applied to the OBV line to reduce noise. Typical values: 5, 10, or 20 periods. |
| `Timeframe`        | The timeframe on which OBV is calculated (e.g., 5m, 1h, etc.).                                         |
| `Signal Direction` | Whether you're looking for increasing (bullish) or decreasing (bearish) OBV values.                    |
| `Crossover Method` | Detect crossovers between OBV and its moving average for entry/exit signals.                           |

***

#### &#x20;Example Usage

**Entry Conditions Using OBV**

**Bullish Breakout Confirmation (Long):**

> Enter long when OBV makes a new local high while price is breaking resistance.\
> → Suggests that volume is supporting the bullish breakout.

**Uptrend Confirmation (Long):**

> Enter long when OBV is rising consistently and breaks above its moving average.\
> → Indicates strong buying pressure backing the move.

**Bearish Breakdown (Short):**

> Enter short when OBV breaks to new local lows while price is breaking support.\
> → Confirms heavy selling pressure behind the move.

**Downtrend Confirmation (Short):**

> Enter short when OBV is declining and crosses below its moving average.\
> → Suggests sustained bearish volume flow.

***

#### 🎯 Take Profit / Exit Examples Using OBV

**Long Exit – Bearish OBV Divergence:**

> Exit your long if price continues to rise but OBV flattens or starts declining.\
> → Classic divergence signal indicating weakening momentum.

**Long Exit – OBV Crossover Down:**

> Exit if OBV crosses below its moving average.\
> → Suggests loss of buying momentum.

**Short Exit – Bullish OBV Divergence:**

> Exit short when price continues falling but OBV starts to rise.\
> → Indicates bearish pressure is fading.

**Short Exit – OBV Crossover Up:**

> Exit if OBV crosses back above its moving average.\
> → Early sign of a possible reversal.

***

#### Tips for Using OBV in the AlgoBuilder

* OBV works great in **trend-following strategies** when paired with momentum indicators like MACD or RSI.
* Use OBV to confirm **breakouts or breakdowns** avoid trading moves with weak volume.
* Applying a **moving average to OBV** can help smooth out signals and reduce false positives.
* Combine OBV with price structure (support/resistance levels) for more reliable entry/exit logic.


---

# Agent Instructions: 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:

```
GET https://algotrade-1.gitbook.io/docs/indicators-library-and-guide/obv-on-balance-volume.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
