Returns true when source has risen on each of the last length bars.
ta.rising tests source > source[1], source[1] > source[2], and so on for length steps. One flat or falling step makes it false.
It needs length + 1 values, so it is false on the first length bars.
Syntax
ta.rising(source: series int/float, length: series int) -> series boolArguments
| Name | Type | Default | Description |
|---|---|---|---|
| source | series int/ | required | The series tested for a rise on each of the last length bars. |
| length | series int | required | Number of consecutive rises required. A whole number of 1 or more. |
Returns
series bool: true when every one of the last length steps went up, otherwise false.
Remarks
- An na anywhere in the tested values gives false.
Example
//@version=6
indicator("Rising closes", overlay = true)
up3 = ta.rising(close, 3)
plotshape(up3, "Three up", shape.circle, location.belowbar, color.green, size = size.tiny)
bgcolor(up3 ? color.new(color.green, 90) : na)See also
Runs on Sidechair