CBOE Implied Volatility Indicator for ThinkorSwim

rlohmeyer

Active member
I coded 3 CBOE Implied Volatility Indicators that I watch on SPY,QQQ,DIA, which I swing trade on the daily. The IWM I like to day trade on the 1 minute time frame as a result of it's higher daily bar ranges. Each are coded as an inverse indicator on a 0-100 normalized scale, so that near 0 is HIGHER VOLATILITY and generally a down move on the indices. I watch for divergences with price action and the other indicators I have posted. Image of the 3 below. I have these loaded in the same lower window as another set of Normalized Scale Indicators. Code for the VIX is below the image. The way to get the other 2 is to substitute either VXN or VXD in the code at the appropriate place. May interest someone for the bigger time frame. PS: I am out of a swing trade since 3/5. Suspicious of the divergence. It may break higher, but rather be safe after a nice swing.

oVLHI0F.jpg


Code:
declare lower;
script normalizePlot {
    input normalize_data = close;
    input MinRng = -1;
    input MaxRng = 1;
    def HH = HighestAll( normalize_data );
    def LL = LowestAll( normalize_data );
    plot NR = ((( MaxRng - MinRng ) * ( normalize_data - LL )) / ( HH - LL )) + MinRng;
}

input MaxRng = 100;
input MinRng = 0;

def ind = (close("vix") * -1);
plot vix = normalizePlot(ind, MinRng, MaxRng );
vix.setDefaultColor(color.white);
vix.setlineWeight(2);
vix.hidebubble();

plot mid = (maxrng+minrng)/2;
mid.setdefaultColor(color.white);
mid.hidebubble();
mid.hidetitle();
 
I coded 3 CBOE Implied Volatility Indicators that I watch on SPY,QQQ,DIA, which I swing trade on the daily. The IWM I like to day trade on the 1 minute time frame as a result of it's higher daily bar ranges. Each are coded as an inverse indicator on a 0-100 normalized scale, so that near 0 is HIGHER VOLATILITY and generally a down move on the indices. I watch for divergences with price action and the other indicators I have posted. Image of the 3 below. I have these loaded in the same lower window as another set of Normalized Scale Indicators. Code for the VIX is below the image. The way to get the other 2 is to substitute either VXN or VXD in the code at the appropriate place. May interest someone for the bigger time frame. PS: I am out of a swing trade since 3/5. Suspicious of the divergence. It may break higher, but rather be safe after a nice swing.

oVLHI0F.jpg


Code:
declare lower;
script normalizePlot {
    input normalize_data = close;
    input MinRng = -1;
    input MaxRng = 1;
    def HH = HighestAll( normalize_data );
    def LL = LowestAll( normalize_data );
    plot NR = ((( MaxRng - MinRng ) * ( normalize_data - LL )) / ( HH - LL )) + MinRng;
}

input MaxRng = 100;
input MinRng = 0;

def ind = (close("vix") * -1);
plot vix = normalizePlot(ind, MinRng, MaxRng );
vix.setDefaultColor(color.white);
vix.setlineWeight(2);
vix.hidebubble();

plot mid = (maxrng+minrng)/2;
mid.setdefaultColor(color.white);
mid.hidebubble();
mid.hidetitle();
Hi, would you mind sharing a link to the code. I am not sure if this is the full code to the lower indicator as is represented in the pic
 
Hi, would you mind sharing a link to the code. I am not sure if this is the full code to the lower indicator as is represented in the pic
I trade NQ futures and would like to see how this indicator can be of use..appreciate ur help
 
I coded 3 CBOE Implied Volatility Indicators that I watch on SPY,QQQ,DIA, which I swing trade on the daily. The IWM I like to day trade on the 1 minute time frame as a result of it's higher daily bar ranges. Each are coded as an inverse indicator on a 0-100 normalized scale, so that near 0 is HIGHER VOLATILITY and generally a down move on the indices. I watch for divergences with price action and the other indicators I have posted. Image of the 3 below. I have these loaded in the same lower window as another set of Normalized Scale Indicators. Code for the VIX is below the image. The way to get the other 2 is to substitute either VXN or VXD in the code at the appropriate place. May interest someone for the bigger time frame. PS: I am out of a swing trade since 3/5. Suspicious of the divergence. It may break higher, but rather be safe after a nice swing.

oVLHI0F.jpg


Code:
declare lower;
script normalizePlot {
    input normalize_data = close;
    input MinRng = -1;
    input MaxRng = 1;
    def HH = HighestAll( normalize_data );
    def LL = LowestAll( normalize_data );
    plot NR = ((( MaxRng - MinRng ) * ( normalize_data - LL )) / ( HH - LL )) + MinRng;
}

input MaxRng = 100;
input MinRng = 0;

def ind = (close("vix") * -1);
plot vix = normalizePlot(ind, MinRng, MaxRng );
vix.setDefaultColor(color.white);
vix.setlineWeight(2);
vix.hidebubble();

plot mid = (maxrng+minrng)/2;
mid.setdefaultColor(color.white);
mid.hidebubble();
mid.hidetitle();
THIS IS a nice indicator man, thank you, what's the logic behind it?
 
@hectorgasm

Hi,
The logic of the indicator you are looking at is the same as the logic of using the standard RSI indicator with the CBOE Volatility Indicator (VIX) thrown in. You can lookup up the RSI indicator on any site that explains indicators, Investopedia, Stock Charts, etc. The same with the VIX indicator, The indicator you are looking at allows you to see 2 versions of the RSI plus the Vix within the same frame of reference.

I am presently using just the Volatility indicator to swing trade the Index ETF's, See below for the image of the setup on SPY. As you can see, we are presently looking at the possibility of a pullback on the Spy supported by the Volatility Indicator. This indicator was coded without a normalized scale so that you could see historical information better, with the addition of setting it up as a candlestick bar, which gives additional information that can be useful in making a judgement. Below the image is the code for this indicator.
pOq2Yd4.jpg


Code:
#@rlohmeyer Volatility Indicator for SP500, Nasdaq100, Dow, or Russell 2000
declare lower;

def na = double.NaN;
input whichInd = {default "SP500", "Nasdaq100", "Russell2000", "DOW"};
input MaxRng = 100;
input MinRng = 0;
def V;
switch (whichInd) {
case Russell2000:
    V =(close("rvx") * -1);
case Nasdaq100:
    V = (close("vxn") * -1);
case DOW:
    V = (close("vxd") * -1);
default:
    V =(close("vix") * -1);
}

#Plot Chart
def ind = v;
def h = Max(ind, ind[1]);
def l = Min(ind, ind[1]);
def c = ind;
def op = c[1];
AddChart(high = h, low = l, open = op, close = c, type = ChartType.CANDLE, Color.white);
 
@RDX17

Hi,
Sorry for the delay in response. You can easily just copy the code that is posted and create the indicator yourself by
1. clicking on the Indicator symbol at the top of a chart,
2. then click on "edit studies"
3. then click on "create" at the bottom left
4. then paste the code to replace the code that is already there
5 and lastly, at the top name your indicator and click the OK button at the bottom right
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
457 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top