Simple Options Volume Indicator for ThinkorSwim

switchfire

switchfire

Member
VIP
Hello,

I've built a very basic study to show the volume of up to 2 specific chosen options. I don't know how useful this might be. If anyone has any suggestions or ideas I'm willing to listen. It would be cool if there were a way to sum of the volume of all calls or puts for a specific expiration. Or maybe add the volume for entered strike + 3 strikes above or below. I don't know if any of this is possible. Anyways just thought I'd share.

Code:
#Option_Vol - Simple Volume Histagram for up to 2 Options
#Created by Switchfire
#v1.0 08FEB2020


declare lower;

input Option1 = "";
input Option2 = "";

plot Vol1 = volume(Option1);
plot Vol2 = volume(Option2);

Vol1.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol2.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
Vol2.SetDefaultColor(GetColor(5));

#End Script
https://tos.mx/RIIAst4
This shows the calls (blue) and puts (red) for Monday, 10 Feb 2020 332c/p


(i've done a simple modification to the plot which anyone can apply in settings)
 
Last edited:
M

MrBlingBling007

New member
It would be amazing, if it is possible, to feed the options times and sales data into this study.
 
J

JJSPX

New member
Is it possible in TOS to have 3 strike prices and so you don't need to manually pick the strike, a command that says something along the lines of "choose current ATM strike, choose 1 strike OTM, choose 2 strikes OTM)... so if SPX is trading 3334, for example, it chooses the next closest expiration and the 3335, 3340 and 3345 strikes?
 
Dublin_Capital

Dublin_Capital

Member
There is a thinkscript command "GetATMoption", which would theoretically help with this, but I can't seem to get it to work, even using the basic examples given on the site. You can also call adjacent options using GetNextITMOption and NetNextOTMOption, which could perhaps accomplish your idea.

Maybe you'll have better luck: GetATMoption - thinkorswim

Is it possible in TOS to have 3 strike prices and so you don't need to manually pick the strike, a command that says something along the lines of "choose current ATM strike, choose 1 strike OTM, choose 2 strikes OTM)... so if SPX is trading 3334, for example, it chooses the next closest expiration and the 3335, 3340 and 3345 strikes?
 
BenTen

BenTen

Administrative
Staff
VIP
@Fedegrosso I believe that trader is inputting the data manually into his script.
 
switchfire

switchfire

Member
VIP
Is it possible in TOS to have 3 strike prices and so you don't need to manually pick the strike, a command that says something along the lines of "choose current ATM strike, choose 1 strike OTM, choose 2 strikes OTM)... so if SPX is trading 3334, for example, it chooses the next closest expiration and the 3335, 3340 and 3345 strikes?
That would be pretty cool. I tried to play around with GetATMOption, but i don't have the experience or skills with thinkscript to know if it's plausible
 
E

ext99k

Member
@switchfire Great work, this is great!

Is it possible to make this easier so we don't have to manually enter the strike codes?

For example, maybe it can automatically grab the ATM call and puts based on the most recent option expiry (weeklies for example) for the current symbol... that would save loads of time, as we constantly switch between companies - thanks!
 
S

spm009

Member
Would it be possible to make a version of this script that takes into account ALL p/c regardless of strike and expiration?
 
E

ext99k

Member
@spm009 your best bet would be to just use Interactive Brokers, the platform does that (aggregates all call and put volume), and it does it easily without using a huge amount of memory... In my experience, the plots aren't very valuable while day trading... there's many false signals

Interactive Brokers also does a good job of showing volume and open interest for each strike, separated by expiry

I would post a screen shot but the forum doesn't have an option

What's great about this indicator for TOS is that you can customize the plot for a particular strike you're interested in, which could be more valuable.
 
X

xexykid

New member
Hi all, Does any one know in thinkscript "Option Time & Sales", how to call this highest traded option's DOE, Class etc? (and also the second biggest option, etc) Any such example scripts available anywhere? Thanks!
 
F

fanweiwen

New member
hi, thinkscript How to get the total option trading volume of the day and Last 5 days ?
 
J

jlondono2002

New member
Hi guys I need your help, I'm trying to get the value of the percentage of the volume of options with respect to the volume of the stock, example if I have the volume of options CCL 05/29 Call 18 = 30K and the volume of the stock at that moment is 15 million, then ((30K * 100) / 15000000) * 100 = 20%, what would be the code that is required to place it in the watchlist to get that porcentage value??, I appreciate your help, thanks
 
Y

yusef

New member
@switchfire! Its possible to build a thinkscript with all volume options calls and puts?. I am reference to the total of strikes.Thanks
 

Similar threads

Top