VIX Ratio Histogram


Category:
0
0

Hi Pete ; Wondering if you would create ToS lower study of Vix3M/Vix. Pine script code is below and link to the code. Thanks!

/ © bauhaus28

//@version=4
study(“VIX3M/1M ratio”)
vix3m = security(“CBOE:VIX3M”, “D”,close)
vix = security(“CBOE:VIX”, “D”,close)
vratio = vix3m/vix
hline(1, title=”Zero line”, color=color.gray, linestyle=hline.style_solid)
plot(vratio, color = vratio >= 1 ? color.green : color.red, style = plot.style_histogram, histbase = 1, linewidth = 4)

 

https://www.tradingview.com/script/LEHBPgNC-VIX3M-1M-ratio/

Marked as spam
Posted by (Questions: 1, Answers: 1)
Asked on January 13, 2025 12:26 pm
9 views
0
Private answer

Here is the chart study, which includes 2 user inputs so you can adjust the ticker symbols for each element of the ratio. Which means you can use this for a much wider range of solutions than just the VIX.

Two screenshots are included below. The first one shows the current list of ticker symbols available for VIX. The two ticker symbols used as default values for this study are marked. The second screenshot shows what this looks like on a current daily chart of SPX.

declare lower;
input tickerOne = "VIX3M";
input tickerTwo = "VIX";
plot centerLine = if !IsNaN(close) then 1 else Double.NaN;
plot ratio = close(tickerOne) / close(tickerTwo);
ratio.AssignValueColor(if ratio > 1 then Color.DARK_GREEN else Color.DARK_RED);
AddCloud(ratio, 1, Color.GREEN, Color.RED);

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4121)
Answered on January 13, 2025 12:31 pm