Docs

ta.pivotlow

Mark a swing low once enough later bars confirm it.

itm
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.

NameKindTypeDefaultRangeDescription
sourceSeriesnumber--The series to find pivots in. Use low for a classic pivot low.
leftConstantnumber21 to 10000Bars before the pivot that must be strictly higher.
rightConstantnumber21 to 10000Bars after the pivot that confirm it, and that the result is therefore delayed by.

Output

NameType
valuenumber

Warm-up and missing values

Warm-up
left + right + 1 bars. 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

itm
ta.pivotlow(low, 2, 2)
itm
plot(ta.pivotlow(low, 2, 2), "Swing low")