Sidechair

request.security_lower_tf()

Browse the reference

Requests an expression on a timeframe lower than the chart's and returns every intrabar value as an array.

Try it in the editor

request.security_lower_tf evaluates an expression on smaller bars and collects the values that fall inside each chart bar. A 1-hour chart bar with 1-minute data returns an array of up to 60 values.

The array is oldest first and its length changes from bar to bar. Read it with array.get, array.size or the array.* statistics.

Syntax

Pine Script
request.security_lower_tf(symbol: series string, timeframe: series string, expression: variable, object or function of series int/float/bool/string/color/enum, or a tuple of these, ignore_invalid_symbol: series bool (optional), currency: series string (optional), ignore_invalid_timeframe: series bool (optional), calc_bars_count: simple int (optional)) -> array<type>

Arguments

NameTypeDefaultDescription
symbolseries stringrequiredThe symbol to read. syminfo.tickerid is the chart's own symbol.
timeframeseries stringrequiredA timeframe lower than the chart's, such as "1".
expressionvariable, object or function of series int/float/bool/string/color/enum, or a tuple of theserequiredWhat to calculate on the intrabars: a series, a call, or a tuple.
ignore_invalid_symbolseries boolfalseWhen true, an unknown symbol returns an empty array instead of stopping the script.
currencyseries stringthe symbol's own currencyCurrency to convert price values to.
ignore_invalid_timeframeseries boolfalseWhen true, a timeframe not lower than the chart's returns an empty array.
calc_bars_countsimple int0Limits how many bars are calculated. 0 means all.

Returns

array<type>: an array with the expression's value from each intrabar inside the chart bar.

Remarks

  • A timeframe equal to or above the chart's is an error unless ignore_invalid_timeframe is true.
  • On Sidechair: lower-timeframe data is not available yet. The call warns and returns an empty array, so array.size gives 0.

Example

Pine ScriptIntrabar countOpen in editor
//@version=6
indicator("Intrabars")
bars = request.security_lower_tf(syminfo.tickerid, "1", close)
plot(array.size(bars), "Intrabars", color = color.blue, style = plot.style_columns)

See also

Runs on Sidechair in part