Reference: Settings
Vex reference: settings.
For AI tools: this page as Markdown · the whole language in one file
| Name | What |
|---|---|
int | A whole-number setting with its own label and limits (at the top of the script). |
float | A decimal setting with its own label and limits. |
bool | A checkbox setting. |
string | A dropdown of choices; the first is the default. |
source | A price setting (close, open, high, low, hl2, hlc3, ohlc4). |
color | A color setting. |
int
1int(14, "Label", min =, max =, step =)A whole-number setting with its own label and limits (at the top of the script).
In Pine Script: input.int(defval, title, minval, maxval, step)
Example
1length = int(14, "RSI length", min = 2, max = 200)2plot(rsi(close, length))float
1float(2, "Label", min =, max =, step =)A decimal setting with its own label and limits.
In Pine Script: input.float(defval, title, minval, maxval, step)
Example
1mult = float(2, "Width", min = 0.5, step = 0.25)2b = bands(close, 20, mult)3plot(b.upper)4plot(b.lower)bool
1bool(true, "Label")A checkbox setting.
In Pine Script: input.bool(defval, title)
Example
1smooth = bool(true, "Smooth it")2plot(smooth ? ema(close, 9) : close)string
1string("a" or "b", "Label")A dropdown of choices; the first is the default.
In Pine Script: input.string(defval, title, options)
Example
1average = string("ema" or "sma", "Average")2plot(average == "ema" ? ema(close, 20) : sma(close, 20))source
1source(close, "Label")A price setting (close, open, high, low, hl2, hlc3, ohlc4).
In Pine Script: input.source(defval, title)
Example
1src = source(close, "Price")2plot(ema(src, 20))color
1color(blue, "Label")A color setting.
In Pine Script: input.color(defval, title)
Example
1col = color(blue, "Line color")2plot(ema(close, 20), color = col)

