Functions
input.string()
A one-line text setting. For a longer piece of text, reach for `input.text_area` instead; both return an `input string`.
Syntax
input.string(const string defval, const string title, const string tooltip, const string inline, const string group, const bool confirm) → input string
Arguments
defval required const string The text the control starts at. Required. title const string The label shown beside the control. tooltip const string Help text for the control. inline const string A key that puts several controls on one row. group const string A heading the control sits under. confirm const bool Asks the reader to confirm the value. Return Type
input string Example
indicator("String Input Example", overlay=true)
customText = input.string("Bullish", title="Trend Direction")
bgcolor(customText == "Bullish" ? color.green : customText == "Bearish" ? color.red : na)