Skip to content
Algo Trade Analytics Docs

input.string() - 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 field for a string input to the script’s inputs.

input.string(defval, title, options, tooltip, inline, group, confirm, display, active) → input string
NameTypeDescription
defvalconst stringDetermines the default value of the input variable proposed in the script’s “Settings/Inputs” tab
fromwhere the user can change it. When a list of values is used with the options parameter
thevalue must be one of them.

Value of input variable.

  • Result of input.string function always should be assigned to a variable, see examples above.
//@version=6
indicator("input.string", overlay=true)
i_text = input.string("Hello!", "Message")l =
label.new(bar_index, high, i_text)label.delete(l[1])