// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © calibrated89 //@version=5 indicator("~Experimental") ltf_delta = 0.0 // Delta calculation delta_function() => vbuy=0.0, vsell=0.0, d=0.0 if close > open vbuy := volume * math.abs( open/close ) if close < open vsell := volume * math.abs( open/close ) d := ta.cum(vbuy - vsell) d ltf_delta_ar = request.security_lower_tf(syminfo.tickerid, "3", delta_function(), false) ltf_delta := ltf_delta_ar.sum() //plot(volume) plot(ltf_delta, color = color.maroon)