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 feedParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
symbol | string | Yes | — | Symbol to query. |
field | const | Yes | — | earnings.actual | earnings.estimate | earnings.standardized. |
gaps | const | Not specified | — | barmerge.gaps_on / barmerge.gaps_off. |
lookahead | const | Not specified | — | barmerge.lookahead_on / barmerge.lookahead_off. |
ignore_invalid_symbol | bool | Not specified | — | Return na instead of raising for an unavailable symbol. |
currency | string | Not specified | — | Convert the result into this currency. |
Returns
series float — na without a fundamentals feedExample
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.