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

Data requests / Reference

alerta.request.economic

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

Pine v6: an economic series of a country — the ECONOMICS:<country><field> symbol — read at the chart's timeframe. AlertaChart carries the US headline series: GDP (USGDP), IRYY inflation rate (USIRYY), INTR interest rate (USINTR), UR unemployment rate (USUR), BOT balance of trade (USBOT) and DEBT government debt (USDEBT), monthly. Any other country or field returns na with a warning.

alerta.request.economic(country_code, field, gaps?, ignore_invalid_symbol?) → series float

Parameters

NameTypeRequiredDefaultDescription
country_codesimple stringYes—Two-letter country code, e.g. "US".
fieldsimple stringYes—Series code, e.g. "GDP", "IRYY", "INTR", "UR".
gapsboolNot specified—barmerge.gaps_on shows the value only on the bar it arrives.
ignore_invalid_symbolboolNot specified—Return na instead of raising for an unavailable series.

Returns

series float

Example

alerta.request.economic
indicator("US inflation", overlay=false)plot(request.economic("US", "IRYY"), "Inflation YoY %")

Notes

  • Requires the requested economic series; unavailable series return na.

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.