Fountain, Colorado
Posts: 1 since Jun 2020
Thanks Given: 0
Thanks Received: 1
|
Hey everyone,
I am a newbie and searched around for awhile to find a custom column to allow the sorting of Implied Volatility Rank in my scanner or watchlist. This optimizes my selling strategy to only thie highest RANKED implied volatility regardless of their current volatility percentage because the two seem to not always go hand in hand like I assumed.
Here is the simple code I used to create the custom column using thinkscript. Hopefully this will help someone.
def vol = Imp_Volatility();
#rec data = if !isNaN(vol) then vol else data[1];
def data = vol;
def hi = highest(data,252);
def lo = lowest(data,252);
def perct = round((data - lo)*100/ (hi - lo),0);
plot x = perct;
|