Skip to content
Algo Trade Analytics Docs
Pine library page — review pending. This page is preserved for compatibility but is not part of the reviewed search index. Check the official Pine Script v6 reference before relying on its explanation, signature, or example.

bool - Pine Script Type

Keyword used to explicitly declare the “bool” (boolean) type of a variable or a parameter. “Bool” variables can have values true or false.

  • 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.
//@version=6indicator("bool")bool b = true    // Same as `b = true`plot(b ? open : close)