• LIMITED TIME OFFER: use coupon code PRIMEDAY (case sensitive) at checkout to save $50 off VIP membership (down to $149 / year). Valid through Tuesday 6/22. Biggest discount this year!

Scan for stock that gap no more than 30%

Eli

New member
Hi,
I want to scan stock that doesn't gap up more than 30% in the pre-market.
Is there a built-in filter in the ThinkorSwim screener?
 

geremyh

New member
Hi,
I want to scan stock that doesn't gap up more than 30% in the pre-market.
Is there a built-in filter in the ThinkorSwim screener?
Yes, you add Condition Group>None of the following>Add Filter>Study>Price Performance>Gap_Up...then set your gap to 30%...that should eliminate any items in the 'Scan In' group you've selected that gap up beyond 30%.
Using the Condition Groups can really fine tune your scan results....just takes practice.
 

c0der

New member
Yes, you add Condition Group>None of the following>Add Filter>Study>Price Performance>Gap_Up...then set your gap to 30%...that should eliminate any items in the 'Scan In' group you've selected that gap up beyond 30%.
Using the Condition Groups can really fine tune your scan results....just takes practice.
apologies, I should have been clearer.
For condition 1, to avoid usual gaps BUT I can accept gaps that happen ONLY ± 2 days during earnings period.
For condition 2, any advice please?

Thank you.
 

XeoNoX

Well-known member
VIP
apologies, I should have been clearer.
For condition 1, to avoid usual gaps BUT I can accept gaps that happen ONLY ± 2 days during earnings period.
For condition 2, any advice please?

Thank you.
that is another builtin TOS filter that you can filter with "has earnings"
 

c0der

New member
that is another builtin TOS filter that you can filter with "has earnings"
this is different - this only filters for stocks that does/doesn't have earnings in the next X days.
my condition is - I accept GAP up/down only if it happened during earnings, else no other gaps are accepted.
 

XeoNoX

Well-known member
VIP
this is different - this only filters for stocks that does/doesn't have earnings in the next X days.
my condition is - I accept GAP up/down only if it happened during earnings, else no other gaps are accepted.
Code:
def isBefore = HasEarnings(EarningTime.BEFORE_MARKET);
def isAfter = HasEarnings(EarningTime.AFTER_MARKET);
plot isDuringOrUnspecified = HasEarnings() and !isBefore and !isAfter;

this is the code for has earnings as per https://tlc.thinkorswim.com/center/reference/thinkScript/Functions/Corporate-Actions/HasEarnings

however your scan theory is flawed as there is no "GAP" (as per what most people define as gap) if its the same day as earnings, and if its the next day after earnings then my original post applies where you can scan for had earnings 1 day ago.



Capture.png
 

XeoNoX

Well-known member
VIP
Is there a script where you can scan for a company who had earnings in the past X days then maybe add filter for a gap up after that??
can be done with TOS built in filters, no need for a special script. Both change from prev day and days before/after earnings can be scanned against with thinkorswims pre-sets.
 
Top