request.security_lower_tf() - Pine Script Function
request.security_lower_tf()
Section titled “request.security_lower_tf()”Overview
Section titled “Overview”Requests the results of an expression from a specified symbol on a timeframe lower than or equal to the chart’s timeframe. It returns an array containing one element for each lower-timeframe bar within the chart bar. On a 5-minute chart, requesting data using a timeframe argument of “1” typically returns an array with five elements representing the value of the expression on each 1-minute bar, ordered by time with the earliest value first.
Syntax
Section titled “Syntax”request.security_lower_tf(symbol, timeframe, expression, ignore_invalid_symbol, currency, ignore_invalid_timeframe, calc_bars_count) → array<type>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| symbol | series string | Symbol or ticker identifier of the requested data. Use an empty string or syminfo.tickerid to request data using the chart’s symbol. To retrieve data with additional modifiers (extended sessions |
| dividend | — | adjustments |
| non-standard | — | chart types like Heikin Ashi and Renko |
| etc.) | — | — |
| create | — | a custom ticker ID for the request using the functions in the ticker.* namespace. |
Returns
Section titled “Returns”An array of a type determined by expression, or a tuple of these.
Remarks
Section titled “Remarks”- Scripts using this function might calculate differently on historical and realtime bars, leading to repainting.
Examples
Section titled “Examples”Example 1
Section titled “Example 1”//@version=6indicator("`request.security_lower_tf()` Example", overlay = true)// If the current chart timeframe is set to 120 minutes, then the `arrayClose` array will contain two 'close' values from the 60 minute timeframefor each bar.arrClose =request.security_lower_tf(syminfo.tickerid, "60", close)if bar_index == last_bar_index - 1label.new(bar_index, high, str.tostring(arrClose))