Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.str.substring
On this pageSignatureParametersReturnsExample

Utilities / Reference

alerta.str.substring

TradingView-compatible spelling: str.substring, runs without warnings

Returns a substring from begin to end.

alerta.str.substring(source, begin, end) → series string

Parameters

NameTypeRequiredDefaultDescription
sourceseries stringYes—The string.
beginseries intYes—Start index.
endseries intNo—End index (exclusive).

Returns

series string

Example

alerta.str.substring
indicator("Ticker prefix")prefix = str.substring(syminfo.tickerid, 0, 3)if barstate.islast    label.new(bar_index, high, prefix)

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.