• Memorial Day Sale! Claim the biggest discount of the year with $50 off VIP using code MEM50. Sign up here.

VIX product comparison Please help!

Smith1158

New member
Hello, I was trying to find a way to compare different vix products and also plot a crossover. I wanted it to plot in a lower subgraph, but I'm not tied to that. Right now I just have a vix9d chart and put vix 3m and vix as a comparison overlay. I'm not sure how to plot a crossover with this method and also the right axis becomes a percentage which makes me question the accuracy. Can someone help me with a basic script that I can tweak if needed? Idk how to plot the different products on a subgraph. What I am looking for is vix9d, vix and vix3m in a subgraph and a cross up or down indicator when vix9d crosses vix. Thank you all for what you do! This forum is amazing and I'm probably going to go pro soon to access that btd indicator. Thanks again!
 

Joshua

Well-known member
VIP
Here are the basic building blocks you'll need to tweak it how ever you want.

Code:
plot VIX = Close("VIX");
plot VIX9 = Close("VIX9D");
plot VIX3 = Close("VIX3M");
plot Up = if Crosses(VIX9, VIX,CrossingDirection.ABOVE) then VIX9 else Double.NaN;
plot Down = if Crosses(VIX9, VIX,CrossingDirection.BELOW) then VIX9 else Double.NaN;
Up.setPaintingStrategy(paintingStrategy.ARROW_UP);
Down.setPaintingStrategy(paintingStrategy.ARROW_DOWN);
 

Similar threads

Top