Fred6724

EPS & Sales

Fred6724 Uppdaterad   
Hi everyone,

I just adapted a little utility script to visualise EPS % increase (quarters vs Year -1) and sales.

I used the code from @ARUN_SAXENA and modified it to fix what I saw as issues.
(Using base 3M instead of 1M +
request. earnings (syminfo.tickerid, earnings .actual, ignore_invalid_symbol=true)
instead of
request.financial(syminfo.tickerid, "EARNINGS_PER_SHARE", "FQ")

Data will differ from MarketSmith because they use sometimes actual EPS sometimes standard, but think we can at least trust what we see in term of %

The tool is far from being perfect !

Release Notes:
Just modified a condition that was making the script bug on given charts
Release Notes:
MarketSmith tag added
Release Notes:
Modified:
- Displays NaN when both EPS used for calculation are negative
- Displays + when increase is positive :)
- Modified calculation system, use the closer EPS to 0 when both reported and standard EPS are negative
We are now very close to the calculation method of MarketSmith.
Sometimes number differs but results are often close when differents.
To be honest I always confirm with shared graph on Twitter.
Release Notes:
Now displays '#' in front of EPS growth % to indicate if an EPS for calculation is negative
Release Notes:
Modified some comments to help to understand what I did.
if you have any constructive suggestions, please let me know in the comments
Release Notes:
- You can now change colors to suit your theme
Release Notes:
- Removed indicators that were polluting the visual overview
Release Notes:
- Adjusted Original Colors
Release Notes:
- The Script is now directly added to the chart when added
- Removed the grid transparency
- Added the possibility to choose the position of the table
Release Notes:
- Added the possibility to show the gross margin
- Tried to display Yearly EPS but highly inaccurate results convinced me to only keep the code under comments in case someone one day is able to calculate manually ?
- I'm still not satisfied with the code.
Ex:
- CELH one result is missing
-AEHR, this shoudn't happen but in Da, We, Mo, results differs. The problem is that we need to search previous earning with time and sometimes it defers from one stock to another.
I would love to find a way to get previous earning without using the time.
Release Notes:
- I have removed the colour from the table frame as it pollutes the price graph
Release Notes:
- Modified the code because the case where actual EPS was negative and reported EPS was positive was not taken into account.
(Now the '#' is diplayed correctly)
- Added the possibility to display ROE
- Added the possibility to show EPS used for calculation
Release Notes:
- Now return NaN when last EPS is negative and EPS of the previous year is positive
Release Notes:
- Now possible to plot EPS curve on the graph with another scale on the left.
Please tell me if you don't like this update, because it adds a left scale whether this new option is checked or not
Release Notes:
- I finally corrected the time base period and replace the "3M" by the function barssince. This corrected the bug on AEHR.
I complained about if few updates ago :)
Release Notes:
- Found that plotting EPS line on another scale was not very usefull
So I decided to replace them by Arrow on the chart showing EPS date and EPS % variation as you can see on MarketSmith graph
I have no solution to plot them at the bottom of the graph, if you know how, don't hesitate to tell me in comment
(I can't reply to personal messages for now)
Release Notes:
- Corrected the case in which EPS display is negative to avoid +-50%
Release Notes:
- Now the color of positive or negative variations also affects the color of the text under the arrows
- You can select arrow colors
- You can select the 'EPS' text color
Release Notes:
- You can now adjust the size of the table.
Release Notes:
- Corrected the case where arrow displayed the wrong balue between EPS reported or standard
Release Notes:
- Modified the case in which when both reported and standard EPS are negative, but the closer to 0 is > than -0.01, is not taken into account.
(Corrected the #+999% in APA which was #+712%)
Release Notes:
- Added comparison regarding sales too
- Renamed all the variables in the code that were confusing
(+ some comments here and there to facilitate understanding)
- Integrated the calculation of QoQ EPS without changing the general appearance of the script
(This way I hope I won't be HARASSED anymore :p)
- Added the viewing of 3 additional quarters
And finally...
- I really hope that, like me, you'll love the new look ! (If not you can still save it to your taste)
Release Notes:
(forgot to remove drawings on the chart...!)
Release Notes:
- Corrected the display of QoQ Eps when equals to YoY (could have and unforced # in front of result)
Release Notes:
- Finally managed to display the quarters in MMM-yy format:-)
Release Notes:
- And corrected size of the text of the date that I forgot !
Release Notes:
- Arranged the settings to allow an easier and more intuitive customization of the interface
Release Notes:
Added :
- Now possible to see Sales on the graph under EPS information
- Changed the QoQ visual
- Added Sales QoQ
- Reorganised Input
- Now possible to change text Color on the graph independently
Release Notes:
- Reduced the number of label to allow more historical data on the graph (regarding arrow part)
Release Notes:
- Replaced 'NaN%' by 'N/A' and change color from red to black.
Release Notes:
- Added the correct display of N/A vs N/A instead of NaN vs NaN on the table and on the arrows
- Changed color of the case where variation% = 0% in black color. (Both EPS & Sales)
- Corrected the display of +/-∞% by N/A.
Release Notes:
- Now the script correctly displays EPS and % when the EPS value is the same twice in a row.
- Corrected the synchronization between the EPS and Sales rows in the table
$LYTS and $WING were not correct, now they are.
Release Notes:
Arrow part:
- Modified NaN% value to N/A
- Modifier N/A color
- Corrected the 0% color

Table part:
- Changed GROSS MARGIN into GM
- Corrected the case where eps1 was negative and eps4 was 0 -∞% -> N/A
- NaN vs NaN -> N/A vs N/A on QQQ
- Recorrected the 0% color
(I think TV displayed me an old previous version of the script so I had to re-write the two last points)
Release Notes:
- Now +0% in blue is turned to 0% in black :3
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?