Sidechair

earnings.* constants

Browse the reference

The fields request.earnings can return: earnings.actual, earnings.estimate and earnings.standardized (the surprise).

Try it in the editor

earnings.actual, earnings.estimate and earnings.standardized go in the field argument of request.earnings. earnings.actual is the reported earnings per share. earnings.estimate is the analysts' consensus. earnings.standardized is the surprise: the actual figure measured against the estimate, in standard deviations of past estimate errors.

Earnings arrive on the report date, so with gaps on the series is na on every other bar.

Constants

NameValueDescription
earnings.actualReported earnings per share.
earnings.estimateAnalysts' consensus earnings estimate.
earnings.standardizedThe surprise, in standard deviations of past estimate errors.

Remarks

  • Not every symbol has earnings data; funds, forex and crypto return na throughout.
  • On Sidechair: request.earnings is not supported yet; it warns once and returns na.

Example

Pine ScriptEarnings surpriseOpen in editor
//@version=6
indicator("Earnings")
actual = request.earnings(syminfo.tickerid, earnings.actual, barmerge.gaps_on)
estimate = request.earnings(syminfo.tickerid, earnings.estimate, barmerge.gaps_on)
plot(actual, "Actual", color.green, style = plot.style_circles, linewidth = 4)
plot(estimate, "Estimate", color.orange, style = plot.style_circles, linewidth = 4)
plot(close, "Close", color.gray)

See also

Runs on Sidechair