Simple Options Volume Indicator for ThinkorSwim

switchfire

switchfire

Member
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

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?
 
D

DBSully

New 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
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
 

Top