Which earnings column is most accurate? EPS and GetActualEarnings returns two different value?

jngy2k

Member
Code:
def AECont = if IsNaN(GetActualEarnings()) then AECont [1] else GetActualEarnings();
plot Earnings = if AECont <> 0 then AECont else Double.NaN;

This is the code for a column on the scan to get earnings of latest earnings.
TOS also has fundamental columns where "EPS" is available AND a "Earnings Per Share 'period - current'" column is available.

They ALL return different values. Isn't EPS the last earnings the same?

My strat plan on trading only stocks with higher earnings than those that don't.

Anyone know which is most reliable?
 
Last edited:
The EPS column could be a different indicator, and it may have nothing to do with earnings at all. I would stick with Earnings Per Share.
 
hey @BenTen i found out by comparing to finviz that EPS is EPS(ttm).
Btw what should i do with the code
if i wanted to compare earnings of last earnings to the previous earnings aecont[2] ?
i got this but it won't work.
The math formula is correct though.
Code:
def AECont = if IsNaN(GetActualEarnings()) then AECont [1] else GetActualEarnings();
def qoqpercent = 100*(aecont[1] / aecont[2] -1);
plot earnings = qoqpercent;
 
@BenTen
i loooked through it and figured out how to define the earnings before the last as well as the last earnings :

Code:
def new = if IsNaN(GetActualEarnings()) then new[1] else GetActualEarnings();
def old = if IsNaN(GetActualEarnings()) then old[2] else GetActualEarnings();

i also know the formula for %change
but if the old earnings value is negative or 0
the plot value is a Error
so i have if then else statements for when old earnings is 0 or negative
and now need help putting the if then else statements together

what i have but don't know how to get it to work togther
the math is right
Code:
def QoQpercent =
if old is - then
100*((new-old)/absvalue(old))
and if old = 0 then
100*new;
else  100*((new-old)/old);


plot earnings = QoQpercent;



edit: i shortened the code to only use absolute values of the denominator old since
if denominator old was positive it will be a mute point
Code:
def QoQpercent =
if old = 0 then
100*new;
else
100*((new-old)/absvalue(old));

plot earnings = QoQpercent;
 
Last edited:
Code:
def new = if IsNaN(GetActualEarnings()) then new[1] else GetActualEarnings();
def old = if IsNaN(GetActualEarnings()) then old[2] else GetActualEarnings();


def qoqpercent = if old==0 then 100*new else 100*((new-old)/absvalue(old));

plot earnings = qoqpercent;

got it to work but problem is with TOS
sometimes TOS doesn't grab the earnings for most recent
even though it is shown on the graph
when it does grab the earnings whether negative or positive
the formula will work correctly
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
514 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

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?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top