Kawasaki_MFI
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © KAWASAKI-AXIS

//@version=5
indicator(title="Kawasaki_MFI", overlay=true)

my_high = request.security(syminfo.tickerid, "D", high)
my_low = request.security(syminfo.tickerid, "D", low)
my_close = request.security(syminfo.tickerid, "D", close)
my_volume = request.security(syminfo.tickerid, "D", volume)

adl = ta.cum(na(my_volume) ? na : ((my_close - my_low) - (my_high - my_close)) / (my_high - my_low) * my_volume)
plot(adl, title="ADL", color=color.new(color.blue, 0))
