//@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 plot(obv_osc, color=obc_color, style=line,title="OBV-Points", linewidth=2) plot(obv_osc, color=silver, transp=70, title="OBV", style=area) hline(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) plot(o_ma, color=ma_col, linewidth=2, style=circles)