Utilities / Reference
alerta.input
TradingView-compatible spelling: input, runs without warnings
Defines a user-configurable parameter that appears in the indicator settings. Supports AlertaScript input(name, defaultValue), Pine-style input(defaultValue, title="Name"), input(title="Name", defval=value), and legacy type=bool/int/float/string/source.
alerta.input(name, defaultValue, options) / input(defval, title, type) → anyParameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | — | Name/title of the input parameter. Pine alias: title. |
defaultValue | any | No | — | Default value for the input. Pine aliases: defval, def. |
options | object | No | — | { min, max, step, options, type } constraints. Pine aliases include minval/maxval/type. |
Returns
anyExample
alerta.input
length = input(20, title="Length")useTr = input(true, title="Use TR", type=bool)plot(sma(close, length))Names and aliases
Guides and navigation are localized. Built-in reference descriptions and code examples are maintained in English.