OPEN-SOURCE SCRIPT
On-Balance Volume (OBV) — Background Trend

What OBV Means
OBV stands for On-Balance Volume.
It’s a volume-based indicator that helps you see whether money is flowing into or out of a stock or index.
Think of OBV as a “running total” of buying and selling pressure.
⚙️ How It Works
OBV starts at zero and then adds or subtracts each day’s trading volume based on the day’s closing price:
If today’s close is higher than yesterday’s → OBV goes up by that day’s volume.
If today’s close is lower → OBV goes down by that day’s volume.
If the price is unchanged → OBV doesn’t move.
Over time, this creates a line that moves up and down with volume pressure.
📈 What OBV Tells You
Rising OBV → Buying Pressure
More volume is happening on up days.
It means traders are accumulating shares.
Often a bullish signal.
Falling OBV → Selling Pressure
More volume is happening on down days.
It means traders are distributing (selling) shares.
Often a bearish signal.
Flat OBV → No clear direction
Volume is balanced.
The market is waiting for a breakout.
🧠 How Traders Use It
Trend Confirmation:
When price goes up and OBV goes up too → the move is healthy and supported by volume.
If price goes up but OBV stays flat or falls → the move might be weak or false.
Divergences:
If price makes a new high but OBV doesn’t → it’s a warning that the trend may reverse soon.
Signal Line Crossovers (like your chart):
You can smooth OBV with an EMA (moving average).
When OBV crosses above its EMA → possible buy signal.
When OBV crosses below → possible sell signal.
🟢 In Simple Terms
OBV tells you “is the smart money buying or selling?”
Green / rising = buyers in control.
Red / falling = sellers in control.
It’s a quick way to confirm if price trends are backed by real trading activity — not just short-term noise.
OBV stands for On-Balance Volume.
It’s a volume-based indicator that helps you see whether money is flowing into or out of a stock or index.
Think of OBV as a “running total” of buying and selling pressure.
⚙️ How It Works
OBV starts at zero and then adds or subtracts each day’s trading volume based on the day’s closing price:
If today’s close is higher than yesterday’s → OBV goes up by that day’s volume.
If today’s close is lower → OBV goes down by that day’s volume.
If the price is unchanged → OBV doesn’t move.
Over time, this creates a line that moves up and down with volume pressure.
📈 What OBV Tells You
Rising OBV → Buying Pressure
More volume is happening on up days.
It means traders are accumulating shares.
Often a bullish signal.
Falling OBV → Selling Pressure
More volume is happening on down days.
It means traders are distributing (selling) shares.
Often a bearish signal.
Flat OBV → No clear direction
Volume is balanced.
The market is waiting for a breakout.
🧠 How Traders Use It
Trend Confirmation:
When price goes up and OBV goes up too → the move is healthy and supported by volume.
If price goes up but OBV stays flat or falls → the move might be weak or false.
Divergences:
If price makes a new high but OBV doesn’t → it’s a warning that the trend may reverse soon.
Signal Line Crossovers (like your chart):
You can smooth OBV with an EMA (moving average).
When OBV crosses above its EMA → possible buy signal.
When OBV crosses below → possible sell signal.
🟢 In Simple Terms
OBV tells you “is the smart money buying or selling?”
Green / rising = buyers in control.
Red / falling = sellers in control.
It’s a quick way to confirm if price trends are backed by real trading activity — not just short-term noise.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с открытым кодом
В истинном духе TradingView автор этого скрипта опубликовал его с открытым исходным кодом, чтобы трейдеры могли понять, как он работает, и проверить на практике. Вы можете воспользоваться им бесплатно, но повторное использование этого кода в публикации регулируется Правилами поведения.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.