Chaikin Volume Accumulation Oscillator (VAO)
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © GrannyCola
//@version=4
study("Chaikin Volume Accumulation Oscillator (VAO)")
len = input(2, minval=2, title="EMA Length")
va = (close - hl2) * volume

cumulated_va = cum(va)
smoothed_va = ema(cumulated_va, len)
osc = (cumulated_va - smoothed_va) / smoothed_va
ema_osc = ema(osc, len)

plot(osc, color=#FFFFFF)
plot(ema_osc, color=#FF0000)
//end