Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.request.earnings
On this pageSignatureParametersReturnsExampleNotes

Data requests / Reference

alerta.request.earnings

TradingView-compatible spelling: request.earnings, runs without warnings

Requests reported earnings for a symbol. The second argument selects which figure: `earnings.actual`, `earnings.estimate` or `earnings.standardized`. As with request.financial there is no fundamentals feed, so the call returns `na` with a warning instead of failing.

alerta.request.earnings(symbol, field, gaps?, lookahead?, ignore_invalid_symbol?, currency?) → series float — na without a fundamentals feed

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes—Symbol to query.
fieldconstYes—earnings.actual | earnings.estimate | earnings.standardized.
gapsconstNot specified—barmerge.gaps_on / barmerge.gaps_off.
lookaheadconstNot specified—barmerge.lookahead_on / barmerge.lookahead_off.
ignore_invalid_symbolboolNot specified—Return na instead of raising for an unavailable symbol.
currencystringNot specified—Convert the result into this currency.

Returns

series float — na without a fundamentals feed

Example

alerta.request.earnings
eps = request.earnings(syminfo.tickerid, earnings.actual, ignore_invalid_symbol = true)plot(na(eps) ? 0 : eps, { title: "EPS", pane: "oscillator" })

Notes

  • `earnings.actual` / `.estimate` / `.standardized` are the field constants.
  • No fundamentals feed: always na plus a warning.

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.