input.int
A whole-number setting, with optional bounds and an optional increment.
It and input.float are the only two input functions that take minval, maxval and step. Read the note on step before you use it: naming that argument does not parse.
input.int(const int defval, const string title, const int minval, const int maxval, const int step, const string tooltip, const string inline, const string group, const bool confirm) → input int| Parameter | Type | Required | Description |
|---|---|---|---|
defval | const int | yes | The number the control starts at. Required. |
title | const string | no | The label shown beside the control. |
minval | const int | no | The lowest value accepted. May be na to mean unbounded. |
maxval | const int | no | The highest value accepted. May be na to mean unbounded. |
step | const int | no | The size of one increment. May be na to mean unstepped. It can only be passed positionally — step is a word the grammar reserves for counted loops, so writing step = 5 is a parse error. |
tooltip | const string | no | Help text for the control. |
inline | const string | no | A key that puts several controls on one row. |
group | const string | no | A heading the control sits under. |
confirm | const bool | no | Asks the reader to confirm the value. |
Returns input int — An input int.
indicator("Length input")
plot(talib.sma(close, input.int(20, "Length")))See also inputs · input.bool · input.color · input.float
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.