VixFix RVol + EMA
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © MooseLondon

//@version=5
indicator("VixFix RVol + EMA")

lookBackBars = input(60, title="VixFix lookback period")
emaLength = input(900, title="EMA length")

RVol = ((ta.highest(close, lookBackBars)-low)/(ta.highest(close, lookBackBars)))*100

RVolEMA = ta.ema(RVol, emaLength)

plot(RVol)
plot(RVolEMA, color=color.red)