Tuesday, May 24, 2016

IV Rank watchlist where IV Rank greater than 60

http://tos.mx/DTb63M

Scan for IV rank greater than 60

http://tos.mx/ZZthtw

Code:
def IVRank =60;
def days_back = 252; # we usually do this over one year (252 trading days)
# implied volatility
# using proxies for futures
def df = if (GetSymbol() == "/ES") then close("VIX") / 100
else if (GetSymbol() == "/CL") then close("OIV") / 100
else if (GetSymbol() == "/GC") then close("GVX") / 100
else if (GetSymbol() == "/SI") then close("VXSLV") / 100
else if (GetSymbol() == "/NQ") then close("VXN") / 100
else if (GetSymbol() == "/TF") then close("RVX") / 100
else if (GetSymbol() == "/YM") then close("VXD") / 100
else if (GetSymbol() == "/6E") then close("EVZ") / 100
else if (GetSymbol() == "/ZN") then close("VXTYN") / 100
else imp_volatility();
def df1 = if !IsNaN(df) then df else df[-1];
# display regular implied volatility
# ---------------------------

# calculate the IV rank
def low_over_timespan = Lowest(df1, days_back);
def high_over_timespan = Highest(df1, days_back);
def iv_rank = Round( (df1 - low_over_timespan) / (high_over_timespan - low_over_timespan) * 100.0, 0);
#plot IVRank = iv_rank;

plot scan =IV_RANK >IVRANK;

0 comments: