For those who like to read it.
/@version=3
// @author LazyBear
//And Oringan
Study (title “On Balance Volume Oscillator”, shorttitle=”OBV OSC 0.1″)
src = close
length = input(20)
obv(src) => cum(change(src) > 0 ? volume : change(src) < 0 ? -volume : 0*volume)
os=obv(src)
//obv_osc = (os – sma(os, length))
obv_osc = (os – ema(os, length))
obc_color=obv_osc > 0 ? Green: Red
Layout (obv_osc, color=obc_color, style=line, title=”OBV-Points”, linewidth=2)
Design (obv_osc, color=silver, transp=70, title=”OBV”, style=area)
line (0)
ma_len = input(14)
o_ma = rma(obv_osc, ma_len)
o_ma_s = sma(o_ma, round(pow(ma_len,0.5)))
ma_col = o_ma > o_ma_s ? Blue: Orange
lw=3
o_ma := o_ma * pow(ma_len, 0.15)
layout (o_ma, color=ma_col, linewidth=2, style=circles)
1 user thanked author for this post.