conditional
Syntax Format
conditional(x)
Overview
The conditional
function converts a boolean value into the series of boolean values. The value for the current bar is set when the function is called.
Parameters
Parameter | Type | Purpose |
---|---|---|
x | boolean | Value for the current bar |
Returns: series[boolean]
.
Example
uptrend = conditional(close > open)
color = iff (uptrend [1], 'green', 'red')