← Back to all indicators
Trend

Pivot Highs & Lows

PHV

Marks significant swing highs and lows by requiring a set number of confirmation bars on each side. A pivot high occurs when a bar's high exceeds every high within the lookback window on both sides; a pivot low when its low undercuts every surrounding low. NaN is returned for non-pivot bars.

Tips

Wider left/right windows mark only the most significant structural highs and lows, filtering out minor noise
Connecting consecutive pivot highs and lows reveals trendlines and chart patterns like triangles and channels

Parameters

Left Bars
1 - 50
Right Bars
1 - 50