• Get $30 off VIP with code SUMMER30. Ends July 27. Happy trading!

Scan for tight option spreads in ThinkorSwim?

trader57

New member
Hi everyone,
I need a way to be able to scan and find those options whose bid-ask price spread for their ATM strike is within a narrow range, say 10 cents or less. This will help find those options with tight bid-ask price spread.
 
Solution
I have a script that works for a watchlist column but can't make it work for a scan. Maybe someone can figure it out.

Code:
plot spread = Round(ask - bid,2);
AssignBackgroundColor(if spread < 0.05 then Color.Dark_GREEN else if spread < 0.5 then Color.Dark_ORANGE else Color.dark_RED);

Update: Watchlist column BidAskSpread: http://tos.mx/991uyR

NOTE: you cannot scan for tight Bid Ask spread, but you can create a scan and Save Query ... then open the saved query as a watchlist and sort that watchlist by this custom Bid Ask spread column.

Ken_Adams

New member
I have often wanted this. I just have created a watchlist of stocks that I know have a tight bid-ask spread.

aa, appl, Amat, amrn, amd, atvi, ba, bac, bidu, c, cat, cmg, cost, crm, caco, cvs, gdxj, dis, fb, Fdx, hd, intc, iq, m, mcd, mu, mro, nflx, nvda, pg, pypl, roku, sbux, spy, snap, sq, tlt, twtr, vxx, vz, wbc, wmt, x, xom, xop
 

RogerHill2020

New member
I have a script that works for a watchlist column but can't make it work for a scan. Maybe someone can figure it out.

Code:
plot spread = Round(ask - bid,2);
AssignBackgroundColor(if spread < 0.05 then Color.Dark_GREEN else if spread < 0.5 then Color.Dark_ORANGE else Color.dark_RED);

Update: Watchlist column BidAskSpread: http://tos.mx/991uyR

NOTE: you cannot scan for tight Bid Ask spread, but you can create a scan and Save Query ... then open the saved query as a watchlist and sort that watchlist by this custom Bid Ask spread column.
 
Solution

spencer13579

New member
Hello, would anyone happen to know, or know how to add, a custom study that could possibly scan for Stocks that have Options where the Bid price is close to the Ask price. It's a little irritating to find what looks to be a good set up on a chart, only to find out the Option Call Ask prices are $100 and the Bid is $10. Maybe something to scan for Options where there is $5, $10 or %5, %10 difference between the Ask and Bid. I already have the technical part of my scanner down, just looking for something I can slip in there to narrow it down a bit. I know it's a long shot, but any idea's or info you can give me, if it's even possible, would be much appreciated. Thanks!

Honest to god I tried searching for an answer to this like 5 times. Forgot the word for it was Spread, Thanks!
 
Seems like it should work with code like this:

Code:
plot scan = (ask - bid) / ask < 0.1;

however, it keeps saying that bid and ask are not recognized, so I'm guessing that they are allowed in Custom Quotes, but not in scans. Pity.
 

TOSscripter

New member
Hello,

I am looking at this as described above: a script to narrow the results of a scan to symbols that have a given price spread amplitude/size.
The code would be something like:

priceType.asK - priceType.BID <= (priceType.LAST*0.1)/100

When I have this above in TOS, I get 'double expected' (?)

Thanks in advance.
 

XeoNoX

Well-known member
VIP
it works as a chart study and column but wont work as a option scan as Thinkorswim doesn't let you scan against custom option related references.
 

ezrollin

Member
VIP
(close(priceType = "ASK") - close(priceType = "BID")) is less than 5

or

addlabel (yes,(close(priceType = "ASK") - close(priceType = "BID")),color.red);
 
Last edited:

Similar threads

Top