Add inverse VIX term structure indicator
This commit is contained in:
parent
24727ac1ba
commit
f23c0e47c3
14
inverse_vix_term_structure.pine
Normal file
14
inverse_vix_term_structure.pine
Normal 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)
|
Loading…
Reference in New Issue
Block a user