Appearance
request
Values from a higher resolution than the chart's, computed from the chart's own bars.
| Name | Description |
|---|---|
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 }): SeriesA 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.
| Field | Type | Description |
|---|---|---|
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) |
ta | typeof ta | The same ta functions, advancing once per higher-timeframe bar. (read-only) |
