IldarAkhmetgaleev

OBV Shadows

Overlay shows difference between OBV and OBV's moving average as green and red dos above and below cendles.
Designed to fast divergence detection.
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study(title="OBV Shadow", shorttitle="OBVShad", overlay=true)
window_len = input(28, defval=28, minval=1, title='Window Lenght')
obv_len = input(14, defval=14, minval=1, title='OBV smooth Lenght')
price_spread = stdev(high-low, window_len)

obv = cum(change(close) > 0 ? volume : change(close) < 0 ? -volume : 0*volume)
smooth = sma(obv, obv_len)
obv_spread = stdev(obv - smooth, window_len)
shadow = (obv - smooth) / obv_spread * price_spread

out = shadow > 0 ? high + shadow : low + shadow
color = shadow > 0 ? green : red
plot(out, style=cross, color=color)
// out = close > close[1] ? shadow : -shadow
// plotarrow(out, colorup=green, colordown=red, transp=50, title='Volume Shadow')