INVITE-ONLY SCRIPT
RT-Anchored OBV

OBV, or On Balance Volume, is a classic tool for traders who want to pick up on subtle shifts in buying and selling pressure that price alone may not show. It accumulates volume up or down depending on whether price closes higher or lower, creating a running total of “who is in control” behind the candles.
Introduction
This Anchored OBV builds on the base OBV concept and pushes it a step further by anchoring the OBV calculation to a specific lookback window. It also adds color coding and a bull/bear midpoint line so traders can more easily see when the trend in Anchored OBV is tilting bullish or bearish over the selected window.

How The Anchor Works
Traditional OBV is cumulative from the start of the chart, which means very old data can still influence the current line. Anchored OBV instead focuses on a moving “anchor” window:
This approach allows the indicator to respond to changes in trend over a defined period, rather than carrying the full history of older market regimes. In the example image, the built-in OBV is shown alongside Anchored OBV so you can see how the anchored version reacts differently to recent data.

Reading The Color States
The Anchored OBV line is color-coded so trend states are easy to read at a glance:
By watching how long Anchored OBV stays in each state, traders can quickly judge whether a move is being supported or faded by underlying volume.

Spotting BART / Distribution Style Setups
One practical use for Anchored OBV is to help identify situations where price chops sideways but volume is quietly bleeding in one direction. For example:
These types of “OBV diverging while price is flat” sequences are easier to see when Anchored OBV is anchored to a fixed window instead of the entire chart history. In the example image, we can see Anchored OBV trending downwards and holding below the midpoint before price breaks down from the sideways range; the Bart doodle on the price pane highlights that structure visually.

Settings
Three main settings can be adjusted by the trader:
Different markets and timeframes may benefit from different combinations of these settings. Many traders will use a longer anchor on higher timeframes and a shorter one for intraday work.

What Makes This Tool Different
While standard OBV is widely available, this Anchored OBV is tailored for traders who want a more localized, regime-aware view of volume pressure:
Important Note
This indicator is intended to provide additional context around volume trends and accumulation/distribution behavior. It is not a standalone signal generator and should always be used together with your own analysis, testing, and risk management. Historical Anchored OBV behavior does not guarantee future results.
🐋 Tight lines and happy trading!
Introduction
This Anchored OBV builds on the base OBV concept and pushes it a step further by anchoring the OBV calculation to a specific lookback window. It also adds color coding and a bull/bear midpoint line so traders can more easily see when the trend in Anchored OBV is tilting bullish or bearish over the selected window.
How The Anchor Works
Traditional OBV is cumulative from the start of the chart, which means very old data can still influence the current line. Anchored OBV instead focuses on a moving “anchor” window:
- Anchored OBV is recalculated over a sliding lookback range defined by the Anchor Historical Length (in bars).
- As each new candle forms, the window rolls forward, effectively re-anchoring Anchored OBV to recent data.
- A central bull/bear trend line is drawn as a midpoint so traders can see when Anchored OBV is spending more time above (bullish) or below (bearish) that level.
This approach allows the indicator to respond to changes in trend over a defined period, rather than carrying the full history of older market regimes. In the example image, the built-in OBV is shown alongside Anchored OBV so you can see how the anchored version reacts differently to recent data.
Reading The Color States
The Anchored OBV line is color-coded so trend states are easy to read at a glance:
- Bull Trend – Anchored OBV is rising and holding above the midpoint line, suggesting sustained accumulation over the anchor window.
- Bear Trend – Anchored OBV is falling and holding below the midpoint line, suggesting sustained distribution over the anchor window.
- Neutral / Transition Zone – Anchored OBV is flat or choppy around the midpoint, often marking consolidation or a potential shift in control.
By watching how long Anchored OBV stays in each state, traders can quickly judge whether a move is being supported or faded by underlying volume.
Spotting BART / Distribution Style Setups
One practical use for Anchored OBV is to help identify situations where price chops sideways but volume is quietly bleeding in one direction. For example:
- Price may move sideways in a tight range while Anchored OBV trends lower below the midpoint, which can hint at stealth distribution before a breakdown.
- Conversely, price can drift sideways while Anchored OBV trends higher above the midpoint, hinting at accumulation before an upside expansion.
These types of “OBV diverging while price is flat” sequences are easier to see when Anchored OBV is anchored to a fixed window instead of the entire chart history. In the example image, we can see Anchored OBV trending downwards and holding below the midpoint before price breaks down from the sideways range; the Bart doodle on the price pane highlights that structure visually.
Settings
Three main settings can be adjusted by the trader:
- Rainbow Color Threshold – Adjusts the threshold that controls when the Anchored OBV line changes color between bullish, bearish, or neutral states.
- Rainbow Color Sensitivity – Adjusts how sensitive the color changes are to shifts in Anchored OBV. Higher sensitivity will flip colors more quickly; lower sensitivity will require stronger moves in Anchored OBV.
- Anchor Historical Length (bars) – Controls how far back the Anchored OBV “anchor” looks in time. Shorter windows make the tool more reactive to recent activity; longer windows smooth out the line and focus on bigger trends.
Different markets and timeframes may benefit from different combinations of these settings. Many traders will use a longer anchor on higher timeframes and a shorter one for intraday work.
What Makes This Tool Different
While standard OBV is widely available, this Anchored OBV is tailored for traders who want a more localized, regime-aware view of volume pressure:
- It recalculates Anchored OBV over a rolling anchor window instead of relying on the entire chart history.
- It introduces a clear bull/bear midpoint line to separate accumulation from distribution within that window.
- It adds a configurable color-coding layer so trend states and transitions are visually obvious without needing additional oscillators.
- It is designed to work alongside price structure, volume profile, or other tools as a dedicated “volume trend lens” rather than a generic momentum overlay.
Important Note
This indicator is intended to provide additional context around volume trends and accumulation/distribution behavior. It is not a standalone signal generator and should always be used together with your own analysis, testing, and risk management. Historical Anchored OBV behavior does not guarantee future results.
🐋 Tight lines and happy trading!
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡RainbowRunner144。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
To request access to this invite only script, send me a Direct Message on TradingView or visit my website for more information about access and documentation.
Access our +10,000 lines of code that put you ahead in the markets at RainbowTrends.com 🐋
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
僅限邀請腳本
僅作者批准的使用者才能訪問此腳本。您需要申請並獲得使用許可,通常需在付款後才能取得。更多詳情,請依照作者以下的指示操作,或直接聯絡RainbowRunner144。
TradingView不建議在未完全信任作者並了解其運作方式的情況下購買或使用腳本。您也可以在我們的社群腳本中找到免費的開源替代方案。
作者的說明
To request access to this invite only script, send me a Direct Message on TradingView or visit my website for more information about access and documentation.
Access our +10,000 lines of code that put you ahead in the markets at RainbowTrends.com 🐋
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。