bool

A true-or-false value. The two constants true and false are the literals for it. Comparisons produce one, and the marker functions take one as their condition. No fields.

bool(const bool value) → const bool
bool(input bool value) → input bool
bool(series bool value) → series bool
bool(simple bool value) → simple bool
ParameterTypeRequired
valueconst boolyes

Returns const bool or input bool or series bool or simple bool

indicator("Up bars as a bool")
plotshape(bool(close > open), title = "Up bar")

See also values and types

Part of the function index.

Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.
Upgrade