View difference between Paste ID: wZbyXgEZ and gC1GJMfB
SHOW: | | - or go back to the newest paste.
1-
# TODAY'S POTENTIAL EARNINGS PLAYS - Shows only stocks with earnings tonight or tomorrow morning
1+
# EARNINGS-FREE EQUITIES - Shows only equities that DO NOT have earnings in the next 45 days
2
#
3-
# Scan tab study that selects stocks with earnings either after the
3+
# Scan tab study that selects only equities without earnings coming up in
4-
# market today or before the market opens tomorrow. To find stocks
4+
# the next 45 days. To find stocks *with* earnings, see my other thinkScript:
5-
# *without* earnings, see my other thinkScript:
5+
# Today's Potential Earnings Plays: http://pastebin.com/gC1GJMfB
6-
# Earnings-Free Equities: http://pastebin.com/wZbyXgEZ
6+
7
# By Chris Baker <ChrisBaker97@gmail.com> @ChrisBaker97
8-
# by: Chris Baker <ChrisBaker97@gmail.com> @ChrisBaker97
8+
# Latest version maintained at: http://pastebin.com/wZbyXgEZ
9-
# Latest version maintained at: http://pastebin.com/gC1GJMfB
9+
10
#
11
# This thinkScript is designed for use in the Scan tab. Detailed
12
# instructions may be found here: http://pastebin.com/wGi1Mvuh
13
# 
14
# Future enhancement:
15
# • Incorporate extensive code from my optimal expiration cycle selection
16
#   thinkScript (http://pastebin.com/SR7NDzLB) to dynamically adjust the
17
#   horizon based on the actual expiration date of the option series closest
18
#   to a user-defined optimal days to expiration.
19-
# I created this because the default TOS Earnings filter is useless for
19+
20-
# actually highlighting earnings plays.  For example, when set to 2 days,
20+
21-
# it includes both stocks that already had earnings this morning, as 
21+
22-
# well as those that won't release until tomorrow afternoon.
22+
23
#
24-
# If (for some reason) you want to look further ahead, you may adjust the
24+
# I created this because the default TOS Earnings filter only allows you
25-
# days input.  For example, when set to 2, this will find all stocks having 
25+
# to find stocks *with* earnings, but there's no way to reverse it to 
26-
# earnings through the market open on the day after tomorrow.
26+
# eliminate stocks *without* earnings, which is often desirable.
27
#
28-
input days = 1;
28+
# If you want to tweak the time period, you may adjust the days input. 
29
# For example, when set to 60, this will find all stocks without earnings
30
# announcements through the market open 60 days from now.
31
32
input days = 45;
33-
            sum(HasEarnings(EarningTime.BEFORE_MARKET),days)[0-days] > 0;
33+
34
declare once_per_bar;
35
36
plot scan = sum(HasEarnings(EarningTime.AFTER_MARKET),days)[1-days] +
37
            sum(HasEarnings(EarningTime.BEFORE_MARKET),days)[0-days] < 1;