Gap Up & Gap Down Scanner for ThinkorSwim


2019 Donor
Prior the the "orb scanner" I think this is great but how about a gap potential or open window of opportunity. I've used the previous day closing gap but rather difficult to use since what's done is done leads to a 50/50 chance trade for opening new wedge gap


ThinkorSwim already provide users with their own Gap up and Gap down scanners.



Well-known member
@Likos the rules have changed on how Gaps work according to two former portfolio managers for William O'Neill and company. In this case, Google really IS your friend. Please search for "take the fear out of buying big gaps" that was published March 11, 2013 by Gil Morales and Dr. Chris Kacher.
They wrote more than one article but that is the only one that I have printed out. Sorry I don't have the name of the publication.

Also, see a website called Those two gentlemen might have some information on that site, as they are the ones that run it. On there they call them "BGU's". It will take some research but it's the only place I know of that has firm rules on purchasing Gap Ups.

After you have reviewed that, you will have better odds of winning on a trade using the scanner that @BenTen pointed to above.
Good investing, Markos


Well-known member
After you do your Pareto Analysis, good idea to put your links somewhere so that your helpers can send people to it. Apparently reading & watching "How to drive the scanner" is difficult to do. btw, excellent job with the video!


Thanks, Sir

Mr @BenTen, question Bookmarks, is the same as favorites? how to save my favorites post or scripts

If I want just scan for gaps up or down for the etf components: SPY, QQQ, DIA is possible? thanks


Well-known member
@wilmanv Please contact support and set up a time for your Free Tour. Have 10 questions written down to ask so that your particular questions get answered.

Also, please spend some time reading in our Tutorial Section. You will find many answers to your questions above.

Your question may have already been asked, please use the Search Box above to check that out.

Thanks, Markos
Last edited:


@wilmanv Bookmarking is like saving a comment or post.

Whatever ToS provides in their default scanner is what you can use. You can also create your own set of watchlist.


New member
This is a pretty common setup but I'm not sure which TOS scan to use to find this potential set up through the morning.

I'm looking at a 5-minute chart. The image attached shows more detail. Price eventually doesn't make a new high on the next candle. Once that happens we are looking for consolidation candles of 3 or more without the price pulling back percentage X. This should alert me of stocks with this pattern.

Here are the rules.
1. Stock must have gapped up or down at least 1% from previous days close.
2. It doesn't take into account pre or post-market activity.
3. Many can consider this a bull or bear flag type of setup.
4. We are however looking for tight consolidation without too much pullback.

I'd appreciate anyone's input on this.



New member
Hi Guys,

I need help with building a gap up scanner and as well the opening range breakout scanner. I want those gap up stocks to go through opening range breakout as well(only stocks that appeared in gap up) to enter a long position. I have used the gap up scanner and opening range scanner combined from our site but nothing shows up in the scanner. Can i do it like that. Need help guys.


New member
So I have this code that says need one defined plot when I upload it I was hoping that someone could help with this code and make it work

# choose to scan up down gaps
# 1 = Only up gaps
# 2 = Only down gaps
# 3 = BOTH up and down gaps

input GapDirection = 3;

#set min max gap size you would like.
input minimumPercentFromPriorClose = 1.0;
input minimumDollarsFromPriorClose = 1.0;
input MaximumPercentFromPriorClose = 100.0;
input MaximumDollarsFromPriorClose = 100.0;

# makes sure there is a gap between the currentprice and the prior High/low, not just from the prior close

input OutsideYesterdaysRange = no;

#Looks for only gaps that are gapping up over red candle or gapping downsideGapThreeMethods under green candle, in addition the other criteria, Some people believe this adds "shock value" and forces people to cover their positions, adding momentum in the direction of the gap.

input GapAboveRedOrBeLowGreen = no;

# choose to only look for gapsthat havent filled yet interday
input OnlyGapsThatHaventFilled = no;

# if set to yes then scan will only consider a gap to be filled id the current days price action has touch previous days close.
input GapIsOnlyFilledAtClose = yes;

#Only change these if you are dealing with special marketor know what your doing
input MarketOpenTime = 0930;
input MarketCloseTime = 1600;
Last edited by a moderator:


That code is incomplete. It only has the inputs, and the rest is missing. Maybe a copy/paste error?


New member
Hello there Everyone,

I want to know if theres a way I can scan for small cap gap ups on ToS? If so, can you please help me with how to scan on Tos for this.

Thank you

Similar threads