vitvlkv

Plot earnings

HOWTO Get Earnings in Pine Script
Remove from Favorite Scripts Add to Favorite Scripts
study("Plot earnings", overlay=true)
t = "ESD:" + syminfo.prefix + "_" + ticker + "_EARNINGS"
c = security(t, "D", close, true)
o = security(t, "D", open, true)
h = security(t, "D", high, true)
u = security(t, "D", updatetime, true)
plotshape(c)
plotshape(o)
plotshape(h)
plotshape(u)
// c - earning
// o - estimate
// h - date (in unix time)
// u - period ending (in unix time)

Hey @vitvlkv

Thanks very much for this code. I'm trying to divide the current quarter by the same quarter's earning in the year previous (so divide the current EPS by the EPS 4 quarters ago).

I can't figure out how to do this because when referencing c or c or c etc this fetches the previous period value, instead of the previous earnings value.

My programming skills aren't sharp enough to figure out how to do this - would you be able to help please?

Thanks!
Reply
Thank you! Great work. Just wondering do you think there is a way to plot information from external source such as publically available economic calenders (http://www.dailyfx.com/calendar) or central bank releases (http://www.dailyfx.com/calendar/bank-calendar.html). I came across today that Investing.com using tradingview has addtional function (see link: http://uk.investing.com/quotes/us-dollar-index-streaming-chart). At the end I would like for example to have a script which would display let us say all FOMC meetings on the chart.
Reply
EN English
EN English (UK)
EN English (IN)
DE Deutsch
FR Français
ES Español
IT Italiano
PL Polski
SV Svenska
TR Türkçe
RU Русский
PT Português
ID Bahasa Indonesia
MS Bahasa Melayu
TH ภาษาไทย
VI Tiếng Việt
JA 日本語
KO 한국어
ZH 简体中文
ZH 繁體中文
AR العربية
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out