Skip to content
Algo Trade Analytics Docs

input.bool() - Pine Script Function

Adds an input to the Inputs tab of your script’s Settings, which allows you to provide configuration options to script users. This function adds a checkmark to the script’s inputs.

input.bool(defval, title, tooltip, inline, group, confirm, display, active) → input bool
NameTypeDescription
defvalconst boolDetermines the default value of the input variable proposed in the script’s “Settings/Inputs” tab
fromwhere the user can change it.

Value of input variable.

  • Result of input.bool function always should be assigned to a variable, see examples above.
//@version=6
indicator("input.bool", overlay=true)
i_
switch = input.bool(true, "On/Off")
plot(i_
switch ? open : na)