ta.pivotlow
Mark a swing low once enough later bars confirm it.
ta.pivotlow(source, left, right)Pivot low, emitted at confirmation: on the bar right bars after a value that is strictly less than the left values before it and the right values after it, this returns that pivot's value. Every other bar is na. There is no lookahead, so the pivot is reported right bars late rather than back-dated onto its own bar.
Parameters
A series parameter takes a value on every bar. A constant parameter must be known before the first bar, such as a number or an input.
| Name | Kind | Type | Default | Range | Description |
|---|---|---|---|---|---|
source | Series | number | - | - | The series to find pivots in. Use low for a classic pivot low. |
left | Constant | number | 2 | 1 to 10000 | Bars before the pivot that must be strictly higher. |
right | Constant | number | 2 | 1 to 10000 | Bars after the pivot that confirm it, and that the result is therefore delayed by. |
Output
| Name | Type |
|---|---|
value | number |
Warm-up and missing values
- Warm-up
left + right + 1bars. Names in the warm-up are this operator’s parameters.- Missing values
- na on every bar that does not confirm a pivot. Returns na until left + right + 1 consecutive non-na observations are in the window. An na resets it. A tie on either side is not a pivot.
Example
ta.pivotlow(low, 2, 2)plot(ta.pivotlow(low, 2, 2), "Swing low")