bool - Pine Script Type
Overview
Section titled “Overview”Keyword used to explicitly declare the “bool” (boolean) type of a variable or a parameter. “Bool” variables can have values true or false.
Remarks
Section titled “Remarks”- Explicitly mentioning the type in a variable declaration is optional. Learn more about Pine Script® types in the User Manual page on the Type System.
Example
Section titled “Example”//@version=6indicator("bool")bool b = true // Same as `b = true`plot(b ? open : close)