// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © maruful_bd_yhoo //@version=5 indicator("~Bar Delta", explicit_plot_zorder = true) v = volume o = open c = close vbuy = 0.0 vsell = 0.0 if c > o vbuy := v * math.abs(o / c - 1) if c < o vsell := v * math.abs(o / c - 1) delta = vbuy - vsell plot( vbuy, title="Bar delta", color = color.rgb(102,205,170, 50), style = plot.style_areabr) plot( vsell, title="Bar delta", color = color.rgb(128,0,128, 50), style = plot.style_areabr) ma = ta.alma(delta, 12, 0.90, 6) //plot(ma)