ThinkorSwim pre-market gap scanners are used to find stocks that have gapped up or down in the pre-market session.
Premarket gappers are often stocks that may be trading on news or rumors. They provide traders with an opportunity to profit from these events.
Gap trading is also a popular strategy because it allows traders to capitalize on volatility in the market.
PreMarket Gap-Up Scan for ThinkorSwim
A gap up occurs when the stock is affected by positive news. Events like earning reports and new product announcements can significantly impact the stock price overnight.
Here is a ThinkorSwim pre-market gap up scanner by Mobius.
# Premarket Gap-Up Scan
# Run Scan at premarket on one minute aggregation.
# Will not be accurate after hours or prior to midnight. Default value set to 3% increase
# Mobius
def MarketClosePrice = if getTime() crosses RegularTradingEnd(getYYYYMMDD())
then close[1]
else MarketClosePrice[1];
plot PreMarketScan = close > MarketClosePrice * 1.03;
# End Scan Code
Create a new custom scanner in ThinkorSwim, copy/paste the code above and set the aggregation period to 1m (1 minute).
By default, the scanner is looking for stocks with a gap greater than 3%. If you have a different % change, you should modify the code before you hit Scan.
PreMarket Gap Down Scanner for ThinkorSwim
Gap down scanner works similarly but searches for stocks that have gapped lower instead of higher.
Some stocks may have short-term overreactions and can close strong before the end of day.
Here is the pre-market gap down scanner for ThinkorSwim.
# PreMarket Gap Down
# Mobius
# Scan Aggregation should be set to 5 min
def price = close;
def last = if secondsFromTime(1600) == 0 and
secondsTillTime(1600) == 0
then price[1]
else last[1];
def LabelTime = if SecondsFromTime(0800) > 0 and
SecondsTillTime(1000) >= 0
then 1
else 0;
def isRollover = GetYYYYMMDD() != GetYYYYMMDD()[1];
def beforeStart = GetTime() < RegularTradingStart(GetYYYYMMDD());
def Highprice = if isRollover and beforeStart
then price
else if beforeStart and price > Highprice[1]
then price
else Highprice[1];
plot PreMarketGapDn = if highPrice < (last * .99) # 1% Gap Down
then 1
else 0;
Default ThinkorSwim Gap Scanner
The default gap scanner in ThinkorSwim is an excellent option for beginners. It lets you scan for a list of gap up stocks and gap down stocks today.
The gap up scanner compares the current bar low to the previous bar high, while the gap down scanner compares the current bar high to the previous bar low.
Of course, you’ll be able to adjust each setting according to your needs.
You can set the gap percentage (%) and adjust the price type.
Here is an example of the built-in ThinkorSwim Gap_Up scanner.
The condition is set as follows: The current bar’s low gaps 2% or more above the previous high.
Once you’re happy with the defined condition, hit the Scan button.
In the example above, I’m looking to find stocks that have gapped up 10% or more.
How to access the pre-built Gap Scanner in TOS:
- Click Scan on the main navigation.
- Add filter > Study.
- Select Price Performance.
- Choose between Gap_Up and Gap_Down.
Adjust the scanner accordingly so that it can give you the best result.
Gap Down and Fill Scan
# Gap Down and Fill Scan
# DMonkey, modified by Spectrum
# 5.5.2017
# Run as a dynamic watchlist at Daily Aggregation
def price1 = low;
def percentage = 2.0;
def price2 = high;
def x = 1+percentage/100;
def term = x*price2[1];
def gap = if price1 >= term
then high[1]
else gap[1];
plot fill = low crosses below gap;