Math / Reference
alerta.math.sign
TradingView-compatible spelling: math.sign, runs without warnings
Returns sign of x: -1, 0, 1.
alerta.math.sign(x) → series floatParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
x | series float | Yes | — | Input value. |
Returns
series floatExample
alerta.math.sign
sg = sign(close - open)plot(sg, { pane: "oscillator" })Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.