Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.matrix.add_col
On this pageSignatureParametersReturnsExample

Matrices / Reference

alerta.matrix.add_col

TradingView-compatible spelling: matrix.add_col, runs without warnings

Inserts a column from array values; without them a column of na, at the end by default.

alerta.matrix.add_col(id, index, colArray) → void

Parameters

NameTypeRequiredDefaultDescription
idstringYes—Matrix ID.
indexintNo—Insert position. Default: after the last column.
colArrayArrayNo—Array handle with column values. Default: a column of na.

Returns

void

Example

alerta.matrix.add_col
m = matrix.new(2, 1, 0)c = array.from(7, 8)if barstate.isfirst    matrix.add_col(m, 1, c)plot(matrix.columns(m), { title: "cols+", pane: "oscillator" })

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.