string - Pine Script Type
string
Section titled “string”Overview
Section titled “Overview”Keyword used to explicitly declare the “string” type of a variable or a parameter.
Remarks
Section titled “Remarks”- Explicitly mentioning the type in a variable declaration is optional, except when it is initialized with na. Learn more about Pine Script® types in the User Manual page on the Type System.
Example
Section titled “Example”//@version=6indicator("string")string s = "Hello World!" // Same as `s = "Hello world!"`// string s = na // same as ""plot(na, title=s)