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

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) → any

Parameters

NameTypeRequiredDefaultDescription
namestringNo—Name/title of the input parameter. Pine alias: title.
defaultValueanyNo—Default value for the input. Pine aliases: defval, def.
optionsobjectNo—{ min, max, step, options, type } constraints. Pine aliases include minval/maxval/type.

Returns

any

Example

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.

AlertaScript

No results found.

Search by name, alias, or keyword.