Returns the price of a pivot low once rightbars bars have confirmed it, otherwise na.
ta.pivotlow reports a swing low: a value that is the lowest across leftbars bars to its left and rightbars bars to its right. The pivot bar is rightbars bars in the past, so the value arrives that many bars after the trough.
A bar to the left may equal the pivot's value, but each of the rightbars newer bars must be strictly higher. With two arguments the source is low.
Syntax
ta.pivotlow(leftbars: series int/float, rightbars: series int/float) -> series float
ta.pivotlow(source: series int/float, leftbars: series int/float, rightbars: series int/float) -> series floatArguments
| Name | Type | Default | Description |
|---|---|---|---|
| leftbars | series int/ | required | Number of bars to the left that must not be below the pivot. A whole number of 0 or more. |
| rightbars | series int/ | required | Number of bars to the right that must be higher. A whole number of 0 or more. |
| source | series int/ | required | Series searched for pivots. Omit it, passing only the two counts, to use low. |
Returns
series float: the pivot's value on the confirming bar, otherwise na.
Remarks
- The value arrives on the confirming bar. Draw at bar_index - rightbars or plot with offset = -rightbars to line it up with the trough.
Example
//@version=6
indicator("Swing lows", overlay = true)
pl = ta.pivotlow(low, 4, 4)
plotchar(not na(pl), "Pivot low", "▲", location.belowbar, color.green, offset = -4, size = size.small)See also
Runs on Sidechair