get_value¶
- get_value(x[, default])¶
- Parameters
x – Input value
default – Optional default value
- Returns
type of x
Returns the value of x at the current bar or default value, if x does not have the current value
This function is helpful when one needs to use the series as a condition for the if statement.
If type of x is not
series
- x is returned, if x is not nil, default otherwiseuptrend = conditional (close > open) if get_value (uptrend) then print ("Going up") end