Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.request.security_lower_tf
On this pageSignatureParametersReturnsExampleNotes

Data requests / Reference

alerta.request.security_lower_tf

TradingView-compatible spelling: request.security_lower_tf, runs without warnings

Requests EVERY lower-timeframe value that falls inside each chart bar. Unlike `request.security`, which projects one value per bar, this returns an ARRAY per bar — read it with `array.size` / `array.get` / `for … in`. The requested timeframe must not be higher than the chart timeframe (the chart's own gives one element per bar). When no intrabar series is available the arrays come back empty (size 0) and a warning is raised, so guard with `if arr.size() > 0`.

alerta.request.security_lower_tf(symbol, timeframe, expression) → array (or a tuple of arrays)

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes—Symbol to query. An empty string ("") means the chart's own symbol, same as `syminfo.tickerid`.
timeframestringYes—Lower timeframe token.
expressionanyYes—Expression to evaluate.
ignore_invalid_timeframeboolNot specified—Pine v6: return na instead of raising when the requested timeframe is higher than the chart's.
currencystringNot specified—Pine v6: convert the result into this currency.
ignore_invalid_symbolboolNot specified—Pine v6: return na instead of raising for an unavailable symbol.
calc_bars_countintNot specified—Pine v6: use only the last N bars of the requested context.

Returns

array<any> — one array per bar; a tuple expression returns one array per member

Example

alerta.request.security_lower_tf
vols = request.security_lower_tf("", "1S", volume)n = array.size(vols)plot(n > 0 ? array.sum(vols) : na, { title: "Intrabar volume" })

Notes

  • Returns an ARRAY per bar, not a projected series — `plot(request.security_lower_tf(...))` is a type error in Pine and here.
  • A tuple expression returns a tuple of arrays: `[h, l, v] = request.security_lower_tf("", "1", [high, low, volume])`.
  • No lookahead: a bar receives only the lower-timeframe bars that fall inside it.
  • A timeframe higher than the chart's is an error; the chart's own timeframe returns one element per bar.
  • No intrabar data available → empty arrays plus a warning, never a stopped script.

Names and aliases

Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.

AlertaScript

No results found.

Search by name, alias, or keyword.