Estimated Earnings Beat Scanner for ThinkorSwim

markos

markos

Well-known member
VIP
This will help you scan for estimated earning beat within the last 10 days.

Plug this into your scanner for potential Stock & Option plays.

Code:
# Earnings beat Estimated Earnings within the last 10 days
# Mobius
# Chat Room request 07.17.2019

def EE = if isNaN(getEstimatedEarnings())

         then EE[1]

         else getEstimatedEarnings();

def AE = if IsNaN(GetActualEarnings())

         then AE[1]

         else GetActualEarnings();

def AE_Bar = if AE != AE[1]

             then barNumber()

             else double.nan;

plot H = AE > EE and

         barNumber() - HighestAll(AE_Bar) <= 10;
 
Last edited by a moderator:
Tradervic

Tradervic

New member
VIP
Markos, what does this indicator do? Does it find stocks that beat earnings in the last 10 days? And if so, how do we trade it? Thanks
 
markos

markos

Well-known member
VIP
@Tradervic I am not being a wise guy, take no offense. This is not an indicator, but, a scan. It does just what it says. "Earnings beat Estimated Earnings within the last 10 days".
When you run the scan during earnings season or any other time, find the ones with the best set ups for your style of trading.
There are many ways to use it. This isn't investment advice, however, if we're in an upward market, a person could watch those "Estimate Beaters" and trade options according to their plan.
If you are a long term investor, an earnings beat may help put a floor under the stock price or reassure a dividend.
Sometimes an earnings beat causes a stock to go down. Why? You would have to ask the "algos", but, my hunch is that they're not talking! 🤫
 
Tradervic

Tradervic

New member
VIP
Got it Markos, no offense taken. I think if a stock moves up due to earnings and breaks resistance, I would look to go long...I prefer to sell bull put spreads.
 
N

Nikola

New member
Can you adjust for earnings losers? Maybe to catch when it starts recovering from a drop?
 
K

K1CK455

New member
Hi,
Is there any way i can scan for stocks with future year guidance raised??
thanks
 
T

tomsk

Well-known member
VIP
Unfortunately, we are limited to whatever data ThinkScript has access to. Pertaining to earnings the only metrics available are GetActualEarnings() and GetEstimatedEarnings(). Both of these functions were used in the code that @markos posted in post #1 above
 
mc01439

mc01439

Well-known member
2019 Donor
VIP
Unfortunately, we are limited to whatever data ThinkScript has access to. Pertaining to earnings the only metrics available are GetActualEarnings() and GetEstimatedEarnings(). Both of these functions were used in the code that @markos posted in post #1 above
Too bad about the limited earnings data. Wish TOS had a "Get ex Dividend date. Would be very useful.
 
K

K1CK455

New member
Unfortunately, we are limited to whatever data ThinkScript has access to. Pertaining to earnings the only metrics available are GetActualEarnings() and GetEstimatedEarnings(). Both of these functions were used in the code that @markos posted in post #1 above
Thanks tomsk
 
Top