Weighted Volatility
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © peacefulLizard50262

//@version=5
indicator("Weighted Volatility")
import peacefulLizard50262/peacefulIndicators/1 as p 

src    = input.source(close, "Source")
length = input.int(10, "Length", 1)

weighted_volatility = p.weighted_volatility_oscillator(src, length)

plot(weighted_volatility, "Weighted Volatility")
hline(0)