IV Percent Change Watchlist for ThinkorSwim

Brain Monkey

Brain Monkey

New member
On the watchlist if you click customize you can add columns like market cap price what ever. I want a custom column that shows the percent change in implied volatility from the day before. This way when I run a scan I can rank the results by the biggest change in IV from the day before. I tried cobbling a script from other studies and I tried googling for answers. But this one has me. And I'm a little slow. Thank you!
 
T

tomsk

Well-known member
VIP
@Brain Monkey Here is an IV Percent Change Watchlist that a friend gave me years ago. I just tested it on my watchlist, seems to work fine. Remember to select daily aggregation when you set up the watchlist

Code:
# IV Percent Change Watchlist
# Paris
# 12.07.2015

# Displays IV percentage change over the previous period in a Watchlist column
# Make sure you set the Aggregation to Daily. If you are not getting a value or it displays NaN, then there is no data.

def IV = Imp_Volatility();
plot R = IV / IV[1];

# End Study
 
Last edited:
T

tomsk

Well-known member
VIP
You're welcome, just sharing whatever info I have on file
 
Brain Monkey

Brain Monkey

New member
Works perfectly and it's so simple. Once again thank you.
 
Brain Monkey

Brain Monkey

New member
Ok tweeked the math a little. Now it comes out as a percentage.
Code:
def IV = imp_volatility();
plot R = 100*((IV / IV[1]) - 1);
Now is there a way to get a percentile mark next to each number in the same way that % change for price has a % next to each number and is there a way to make the positive numbers green and the negative numbers red?
 
T

tomsk

Well-known member
VIP
@Brain Monkey The only way you'll be able to force a "%" symbol is to use AddLabel, see if this is close to what you're asking for. I have also tweaked the color scheme per your request

Code:
def IV = Imp_Volatility();
def R = ((IV / IV[1]) - 1);
AddLabel(1, AsPercent(R), if R > R[1] then Color.Green else Color.Red);
 
Brain Monkey

Brain Monkey

New member
Ok so now I have the column. When I click on the column so that the results of the scan will show the results with the greatest change in IV. The script has this weird logic where it places the results in almost alphabetical order. So if I click on it to show the stocks that have gone down the most compared to the last day, it thinks the order should be: -0.007; -1.654; -11.52; -2.54; 22.71; -3.5. It's like it's using alphabet logic not placing the numbers on a number line and showing me them in order. God I hope this makes sense because I am so lost right now.
 
T

tomsk

Well-known member
VIP
Yep, that's the entire issue if you use AddLabel, when you click on it it would not sort numerically. In order to sort numerically you'll need to use a plot statement like you did before. However in so doing you would not be able to retain the trailing "%" symbol.
 
A

alphabeta

Member
@tomsk hi, is it possible to get at the money (option contract) iv percentage change ? thank you
 

Similar threads

Top