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

Utilities / Reference

alerta.bool

TradingView-compatible spelling: bool, runs without warnings

Casts a value to boolean using Pine-style truthiness.

alerta.bool(value) → bool or series bool

Parameters

NameTypeRequiredDefaultDescription
valueanyYes—Value to cast.

Returns

bool or series bool

Example

alerta.bool
isUp = bool(close - open)plot(isUp ? close : na)

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.