Open Interest Percentage Change Column for ThinkorSwim

XeoNoX

Well-known member
VIP
Ratio Open Interest to Volume Percentage Change Column for ThinkorSwim

Volume is 2 times great than the Open Interest -- OI

THIS ONLY WORKS CORRECTLY AS A OPTION CHAIN COLUMN

Appreciation goes a long way... if you like my work or you found this post useful be sure to hit the like button to keep me motivated

yWmxqUQ.png


Code:
####Please Keep Code Intact if you share#######
##volume is 2 times greater than the OI COLUMN
##NOTE: IT ONLY WORKS AS A OPTION CHAIN COLUMN
def x2 = (volume > open_interest*2);
def x = (volume / open_interest)*100;
AddLabel(yes,  + Round(x , 0) + "%",color.black);
assignBackgroundColor (if x2 then color.orange  else color.black);
#######################################
#######By XeoNoX via usethinkscript.com#######
#######################################
 
Last edited:

rad14733

Well-known member
VIP
could you please provide a share link to this because I can't seem to add it onto my TOS
I don't believe there is an auto-magic way to add the code to your Option Chain panel, you have to add it manually... Honestly, it isn't that hard... I rarely ever use the links to add resources to TOS because half the time that feature is broken... You might as well learn the right way rather than relying on a crutch...
 

Optionsguy

New member
@XeoNoX Very useful code. Thank you for sharing. Is there a way to filter out option volume with less than 10 open interest? For example, if a certain strike price has an open interest of 5 contracts, it won’t show up in the column in color if 10 or more contracts are purchased?
 

XeoNoX

Well-known member
VIP
@XeoNoX Very useful code. Thank you for sharing. Is there a way to filter out option volume with less than 10 open interest? For example, if a certain strike price has an open interest of 5 contracts, it won’t show up in the column in color if 10 or more contracts are purchased?

in regular scan settings in TOS you can filter by open interest.
 

Optionsguy

New member
in regular scan settings in TOS you can filter by open interest.
Okay, so nothing can be added to the code to take away the color from 2X volume if the strike price had 1 contract in open interest, and there are 2 contracts in volume for the day?

Just thinking it would make it easier on the eyes to not see the color in column where there were very few contracts traded.

Thank you!
 

rad14733

Well-known member
VIP
Okay, so nothing can be added to the code to take away the color from 2X volume if the strike price had 1 contract in open interest, and there are 2 contracts in volume for the day?

Just thinking it would make it easier on the eyes to not see the color in column where there were very few contracts traded.

Thank you!

We can only modify Custom Columns, not default trade data columns...
 

XeoNoX

Well-known member
VIP
Okay, so nothing can be added to the code to take away the color from 2X volume if the strike price had 1 contract in open interest, and there are 2 contracts in volume for the day?

Just thinking it would make it easier on the eyes to not see the color in column where there were very few contracts traded.

Thank you!
as per your example, you can add.. and volume is greater than 2
Code:
assignBackgroundColor (if x2 and volume >2 then color.orange  else color.black);
 

Similar threads

Top