Skip to content
Algo Trade Analytics Docs

request.security_lower_tf() - Pine Script Function

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.

request.security_lower_tf(symbol, timeframe, expression, ignore_invalid_symbol, currency, ignore_invalid_timeframe, calc_bars_count) → array<type>
NameTypeDescription
symbolseries stringSymbol 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
dividendadjustments
non-standardchart types like Heikin Ashi and Renko
etc.)
createa custom ticker ID for the request using the functions in the ticker.* namespace.

An array of a type determined by expression, or a tuple of these.

  • Scripts using this function might calculate differently on historical and realtime bars, leading to repainting.
//@version=6
indicator("`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 timeframe
for each bar.arrClose =
request.security_lower_tf(syminfo.tickerid, "60", close)
if bar_index == last_bar_index - 1
label.new(bar_index, high, str.tostring(arrClose))