OBV On Balance Volume - Divergences - Libertus

Hello all,

As my RSI divergences script became popular, I got few requests for making divergences scripts on other indicators.
One of most popular and requested indicators next to RSI is OBV ( on balance volume ) which measures buy and sell volume based on candle close (green/red).

So finally, here it is, divergences script for OBV. I'll probably also make candle edition script after I iron out bugs on this one.

Have fun and good luck with trading.

Note for those that are not familiar, here you can find my RSI divergences scripts:
RSI Divergences - regular - RSI Divergences - candle edition -
Release Notes: What new:
  • adapted script to new pine language version (v4)
  • removed 8 n/a value that were cluttering indicator interface next to RSI value (only possible with v4 pine language)
  • added option to have colored indicator background instead of BULL/BEAR labels

You can also check out my two other popular divergences scripts.

RSI divergences

RSI divergences - Candle edition
Release Notes: Small fix: Pivots didn't hide if you checked both "Hide pivot" and "Color background".
Remove from Favorite Scripts Add to Favorite Scripts


thanks for this....i like this and currently use the RSI div. When both give signals its time to hunt :)...I wonder if you can share code? I usually modify them indi to show dif colour, size and names for my tired old eyes to see...just my way of making the chart mine...OBV is widely used so hopefully not an issue for you.
+1 Reply
Libertus Clenty
@Clenty, thank you for comment, I'm glad you like it. Sorry, but I'm not planing on sharing OBV code in near future. If you need to change colors you can open settings and change almost anything there.
Is this indicator still public? Can find it
Libertus EdvinasKatinas
@EdvinasKatinas, yes, type Libertus in search field and it will show all my indicators.
@Libertus, great I found it! Just want to let you know that I messaged you about your swing trade indicator in case you missed it. If that was done on purpose then thank you for the divergence indicators anyway. Have a nice day
Thank you for sharing this. I am using your RSI divergence indicator - Candle edition and was wondering if you can make the same for the OBV.
Libertus cicdubai
@cicdubai, I was thinking about integrating RSI, OBV and maybe even some other divergences in one candle indicator. But it's still in "thinking" phase.
+1 Reply
Is this v3?
@dane4, by v3 you mean pine v3 or something else? If you meant pine v3, no, it's now adapted to pine v4 since 19th October.
Home Stock Screener Forex Screener Crypto Screener Economic Calendar How It Works Chart Features Pricing Refer a friend House Rules Help Center Website & Broker Solutions Widgets Charting Solutions Lightweight Charting Library Blog & News Twitter
Profile Profile Settings Account and Billing Referred friends Coins My Support Tickets Help Center Ideas Published Followers Following Private Messages Chat Sign Out