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

//@version=4
study("Historical Volatility Ratio")

st = close/close[1]
logst = log(st)

period1 = input(30, minval = 1)
period2 = input(50, minval = 1)

st1 = stdev(st, period1)
st2 = stdev(st, period2)

HVR = st1/st2
plot(HVR)

l1 = input(1.4, maxval = 99999)
l2 = input(0.5, maxval = 99999)

plot(l1, color=color.red)
plot(l2, color=color.red)
