Returns true when source has fallen on each of the last length bars.
ta.falling tests source < source[1], source[1] < source[2], and so on for length steps. One flat or rising step makes it false.
It needs length + 1 values, so it is false on the first length bars and wherever an na enters the tested values.
Syntax
ta.falling(source: series int/float, length: series int) -> series boolArguments
| Name | Type | Default | Description |
|---|---|---|---|
| source | series int/ | required | The series tested for a fall on each of the last length bars. |
| length | series int | required | Number of consecutive falls required. A whole number of 1 or more. |
Returns
series bool: true when every one of the last length steps went down, otherwise false.
Remarks
- Pair it with
ta.risingto colour a series by short-term direction.
Example
//@version=6
indicator("Falling lows", overlay = true)
down2 = ta.falling(low, 2)
plotshape(down2, "Two down", shape.triangledown, location.abovebar, color.red, size = size.tiny)See also
Runs on Sidechair