Skip to content
AlertaChartAlertaScript / docs
AlertaScript / if
On this pageSignatureReturnsExample

Utilities / Reference

if

TradingView-compatible spelling: if, runs without warnings

Runs an indented block when its condition is true. An optional else branch handles the other case.

if close > open → language construct

Returns

language construct

Example

//@version=6indicator("Conditional block")if close > open    log.info("Up bar")

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.