Add inverse VIX term structure indicator

This commit is contained in:
moshferatu 2023-10-31 09:55:36 -07:00
parent 24727ac1ba
commit f23c0e47c3

View File

@ -0,0 +1,14 @@
// Credit to @keberos007.
//@version=5
indicator("Inverse VIX Term Structure", shorttitle = "Inverse VIX", overlay = false)
vix = request.security("VIX", "D", close)
vix6m = request.security("VIX6M", "D", close)
vix_ratio = vix6m / vix
fastEMA = ta.ema(vix_ratio, 7)
slowEMA = ta.ema(vix_ratio, 12)
plot(fastEMA, color = color.blue)
plot(slowEMA, color = color.red)