# Earnings Scan?

#### IonQ

##### New member

In the book
~~a superstock is a stock with increasing earnings​
(at least 4 Consecutive quarters where earnings increase by 3-10% )​
~~and amazing earning breakout where earnings increase by more than 100%​
How do I approach converting this to a thinkorswim scanner?

(The book mentions more factors like good support on the 30wk ma and insider buying.
However, I do not think these are possible to include in a thinkorswim scanner. )

Last edited by a moderator:
Solution
This should do it, but it's difficult to test and verify. I could only find one listed stock that is meeting the criteria at present. The big pop and the consecutive quarters elements seem to be working fine independently. All combined though, it's just not happening out there in the market right now.

Set the scan to Weekly to ensure the scanner has enough price history to work with.

Code:
``````def Earn = GetactualEarnings();
def Valid = !isNaN(Earn);

def Count = if Valid then Count[1] + 1 else Count[1];

def Shift1 = if Valid then Earn else Shift1[1];
def Shift2 = if Valid then Shift1[1] else Shift2[1];
def Shift3 = if Valid then Shift2[1] else Shift3[1];;
def Shift4 = if Valid then Shift3[1] else Shift4[1];;
def Shift5 = if Valid then...``````
This should do it, but it's difficult to test and verify. I could only find one listed stock that is meeting the criteria at present. The big pop and the consecutive quarters elements seem to be working fine independently. All combined though, it's just not happening out there in the market right now.

Set the scan to Weekly to ensure the scanner has enough price history to work with.

Code:
``````def Earn = GetactualEarnings();
def Valid = !isNaN(Earn);

def Count = if Valid then Count[1] + 1 else Count[1];

def Shift1 = if Valid then Earn else Shift1[1];
def Shift2 = if Valid then Shift1[1] else Shift2[1];
def Shift3 = if Valid then Shift2[1] else Shift3[1];;
def Shift4 = if Valid then Shift3[1] else Shift4[1];;
def Shift5 = if Valid then Shift4[1] else Shift5[1];;

def Change1 = if Valid then (Shift1 - Shift2) / Shift2 * 100 else Change1[1];
def Change2 = if Valid then (Shift2 - Shift3) / Shift3 * 100 else Change2[1];
def Change3 = if Valid then (Shift3 - Shift4) / Shift4 * 100 else Change3[1];
def Change4 = if Valid then (Shift4 - Shift5) / Shift5 * 100 else Change4[1];

def AMT = 3;

def BigOne =
yes
and Change1 >= 100
and change2 >= AMT
and change3 >= AMT
and change4 >= AMT
;

def Cond = if Valid and hasearnings() and count >= 5 then bigone else Cond[1];

plot Scan = cond;``````

You can add this to the bottom of the code and slap the whole thing on a chart if you want to check it against a watch list. Make sure that the chart is long enough to have all the needed earnings announcements on it.

Code:
``````addlabel(yes," % " + round(change4,2), if change4 > AMT then color.lime else color.light_orange);
addlabel(yes," % " + round(change3,2), if change3 > AMT then color.lime else color.light_orange);
addlabel(yes," % " + round(change2,2), if change2 > AMT then color.lime else color.light_orange);
addlabel(yes," % " + round(change1,2), if change1 > 100 then color.white else color.light_orange);``````

If you really want to limit it to between 3 and 10 percent, you can replace the relevant portion of code with this, I just went with over 3. I wrote it kind of weird to make the individual lines easy to comment out.

Code:
``````def BigOne =
yes
and Change1 >= 100
and between(change2,3,10)
and between(change3,3,10)
and between(change4,3,10)
;``````

This should do it, but it's difficult to test and verify. I could only find one listed stock that is meeting the criteria at present. The big pop and the consecutive quarters elements seem to be working fine independently. All combined though, it's just not happening out there in the market right now.Set the scan to Weekly to ensure the scanner has enough price history to work with.
You can add this to the bottom of the code and slap the whole thing on a chart if you want to check it against a watch list. Make sure that the chart is long enough to have all the needed earnings announcements on it.

View attachment 22209

@Joshua what app do you use to make that gif ?

ScreenToGif, its free. You just put the box around what you want to record and push the button.

It has it's own editor inside of it too, and some other stuff.

In the book

How do I approach converting this to a thinkorswim scanner?

(The book mentions more factors like good support on the 30wk ma and insider buying.
However, I do not think these are possible to include in a thinkorswim scanner. )

1) Bull and Bear flag formations

2) Right half Cup and Handle

Happy Learning

Thanks for making this scan

87k+ Posts
408 Online

## The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
• Exclusive indicators
• Proven strategies & setups
• Private Discord community
• Exclusive members-only content
• 1 full year of unlimited support

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?