Per Volume Price Impact
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © Yuhui_w

//@version=5
// This indicator measures the impact of volume on the absolute
// (high-low)/volume

indicator("Per Volume Price Impact")

log = input(true, title = "Use Log")

price_impact = (high-low)/volume

plt = log ? math.log(price_impact): price_impact

plot(plt, style = plot.style_stepline)
