input.*() parameters

An input line declares a parameter that becomes an editable field in the indicator settings dialog. Each declaration must fit on one line. The variable then behaves as an ordinary constant in the rest of the script.

N       = input.int(14, 'Length', minval=1, maxval=250, step=1)
MULT    = input.float(2.0, 'Band multiplier', minval=0.1, step=0.1)
SHOWSIG = input.bool(true, 'Show signals')
SRC     = input.string('close', 'Source', options=['close', 'hlc3'])
BULL    = input.color(#26A678, 'Bull colour', role='bull')
TypeNotes
input.int(defval, title, minval=, maxval=, step=)Integer. The default value is rounded. minval / maxval / step may also be given positionally in that order.
input.float(defval, title, minval=, maxval=, step=)Floating point, same options as input.int.
input.bool(defval, title)Checkbox. Materialises as 1 or 0, so it can be used directly in conditions.
input.string(defval, title, options=[…])Text, optionally constrained to a drop-down list. The default must be a string literal.
input.color(#RRGGBB, title, role=)Colour picker. Accepts #RGB, #RRGGBB or rgb(r,g,b). Declaring a role such as 'bull' / 'bear' lets the colour follow the platform theme switch.

Duplicate variable names, a missing default value or a type mismatch (a string default on input.int, for example) are reported as compile errors with the offending line number.