Skip to content

request ​

Values from a higher resolution than the chart's, computed from the chart's own bars.

NameDescription
request.security()A value from a higher resolution (TradingView request.security), e.g.

request.security() ​

ts
request.security(resolution: Resolution, fn: (ctx: SecurityContext) => Series, options?: { confirmed?: boolean }): Series

A value from a higher resolution (TradingView request.security), e.g. the daily EMA on a 1h chart: request.security("1D", (h) => h.ta.ema(h.candle.close, 20)). The result is bar-aligned with the chart and follows the forming higher-timeframe bar; { confirmed: true } returns the last completed bar's value instead.

Types: Resolution, SecurityContext, Series

Types ​

SecurityContext ​

The higher-timeframe context passed to request.security.

FieldTypeDescription
candle{ readonly open: Series; readonly high: Series; readonly low: Series; readonly close: Series; readonly volume: Series; readonly turnover: Series; readonly time: Series }Candles of the requested resolution, built from the chart's bars; the last one is still forming. (read-only)
tatypeof taThe same ta functions, advancing once per higher-timeframe bar. (read-only)

AlphaScript language v0.1 · runtime 0.2.0