Thinkorswim custom script for Stock/ETF / volatility percent percentile range - ThinkOrSwim | futures io social day trading
futures io futures trading


Thinkorswim custom script for Stock/ETF / volatility percent percentile range
Updated: Views / Replies:13,513 / 11
Created: by peroulias Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 1  
 
Thread Tools Search this Thread
 

Thinkorswim custom script for Stock/ETF / volatility percent percentile range

  #11 (permalink)
Trading Apprentice
singapore
 
Futures Experience: Intermediate
Platform: thinkorswim
Favorite Futures: options
 
Posts: 1 since Nov 2013
Thanks: 1 given, 1 received


alchemist74 View Post
Hi,
sorry i delayed my answer but i trade very heavily last few months. I find better TOS code for IV rank, here it is:

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;
plot H = 90;
plot L = 20;

this will draw a line tool bellow your chart . If u want to see just a number at your left chart corner use this:

declare upper;
input period = AggregationPeriod.DAY ;

input length =252 ;

def ivGapHi = if isnan(imp_volatility(period=period)) then 99999999999 else imp_volatility(period=period);
def ivGapLo = if isnan(imp_volatility(period=period)) then -99999999999 else imp_volatility(period=period);
def periodHigh = highest( ivGapLo,length=length);
def periodLow = lowest( ivGapHi, length=length);
def ivRange = periodHigh - periodLow ;
def ivp = round( 100*(imp_volatility(period=period) - periodLow)/ivRange, 0);
AddLabel(1, Concat("IV%: ", ivp), color = Color.PLUM);

Thank u Alchemist74, created an account just to thank u. The code is just what i needed.

Reply With Quote
The following 2 users say Thank You to loadup for this post:
 
  #12 (permalink)
Trading Apprentice
Bahia Blanca + Buenos Aires/Argentina
 
Futures Experience: Beginner
Platform: NinjaTrader
Favorite Futures: Stocks
 
Posts: 1 since Sep 2013
Thanks: 0 given, 0 received

IV missing days on last year ruining the % study


alchemist74 View Post
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;
plot H = 90;
plot L = 20;

Alchemist, when there is at least one missing day in the IV within the last 252 trading days the whole study breaks.

I see you started to address the issue here on the commented line:

#rec data = if !isNaN(vol) then vol else data[1];

Have you fixed it? I cannot believe that they havenīt fixed it yet on TOS. The scanner, columns and studies.. all with the same problem. As if they wanted to have it that way..

I think this happens because of the division by 0 here:
def perct = round((data - lo)*100/ (hi - lo),0);

If there is just one missing day, the hi and the lo will be 0, so there will be a division by zero in the formula and that will break the study.

I think we could solve it if we can ignore the 0. I came up with a logic like this:


def hi = If (vol = 0, [use the highest between 0.1 and the high], else highest(vol,252);

def lo = If (vol = 0, [use the lowest between 0.1 and the low], else lowest(vol,252);


But I donīt know how to code it.

What do you think?

Can anyone help me fix it so that it works even if there are missing days in the IV in the last year?

Reply With Quote

Reply



futures io > > > > Thinkorswim custom script for Stock/ETF / volatility percent percentile range

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stock, ETF, Options Brokers Big Mike Reviews of Brokers and Data Feeds 15 February 28th, 2013 06:51 PM
Vant Tharp's Percent Volatility Position Sizing - FX equation - PLEASE ANYONE? fxhst329 Psychology and Money Management 5 November 16th, 2012 11:58 PM
thinkorswim now has Range Bars built-in shodson ThinkOrSwim 2 January 27th, 2012 08:27 AM
Needed Bid / Ask bar script for thinkorswim Rad4633 ThinkOrSwim 3 October 8th, 2011 03:05 PM
How to install Range Bar code in Thinkorswim rcs9234 ThinkOrSwim 5 July 7th, 2011 03:12 PM


All times are GMT -4. The time now is 06:47 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-18 in 0.08 seconds with 24 queries on phoenix via your IP 54.163.209.109