Skip to content
AlertaChartAlertaScript / docs
AlertaScript / alerta.math.avg
On this pageSignatureParametersReturnsExample

Math / Reference

alerta.math.avg

TradingView-compatible spelling: math.avg, runs without warnings

Returns the arithmetic mean of two or more values (na when any of them is na).

alerta.math.avg(a, b) → series float

Parameters

NameTypeRequiredDefaultDescription
aseries floatYes—First value.
bseries floatYes—Second value.

Returns

series float

Example

alerta.math.avg
m = avg(open, close)plot(m)

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.