# Pivot Strength

A Market Structure concept (Swing grammar) in the LuxAlgo Library, with 1 indicator implementation.

## What is Pivot Strength?

Pivot strength is the bar-count rule that defines a swing point: a pivot high of strength N is a bar whose high exceeds the highs of the N bars to its left and the N bars to its right, with the mirror definition for pivot lows (left and right counts can be set independently). The larger the strength, the more neighbors the bar must dominate, so fewer and more significant pivots survive. The [Williams fractal](https://www.luxalgo.com/library/concept/williams-fractal/) is the fixed strength-2 special case, and general [swing high/low](https://www.luxalgo.com/library/concept/swing-high-low/) detection is usually this rule with adjustable settings.

Strength buys significance with delay. A pivot cannot be confirmed until every right-side bar has closed, so a strength-10 pivot is only knowable 10 bars after it printed. That lag is structural, and tools that draw the label back at the pivot bar can look prescient in replay, which is the classic [repaint-safe engineering](https://www.luxalgo.com/library/concept/repaint-safe-engineering/) concern. Choosing a strength setting is therefore choosing both the scale of structure you map and the confirmation delay you accept.

Everything structural downstream inherits the setting. Confirmed pivots are the alphabet of [swing structure grammar](https://www.luxalgo.com/library/concept/swing-structure-grammar/): higher highs, lower lows, breaks and characters are all statements about pivots, so the strength dial silently decides which structure story the chart tells. Asymmetric settings encode intent, a large left count with a small right count demands a significant structure before the turn but confirms quickly, while the reverse waits for overwhelming proof. High-strength pivots also mark where stop orders concentrate, which is why tools like QuantNomad's Significant PP watch them specifically for [swing failure](https://www.luxalgo.com/library/concept/swing-failure-pattern/) and stop-run events.

The bar-count rule is one of two common significance definitions. The other, used by zigzag tools, requires a minimum price move, a percentage or ATR multiple, before a swing counts; bar-count pivots measure dominance in time while move-based swings measure magnitude, and the two disagree exactly where it matters, in fast vertical markets and slow drifts. There is no optimal N: the honest practice is scaling the setting to the structure you trade, layering two or three strengths for hierarchy, and keeping the choice fixed so that structure reads stay comparable across charts and dates.

## How to identify pivots by strength

The rule is mechanical, so the craft is in the settings and in respecting the confirmation delay.

1. Set the left and right bar counts; remember the right count is also the confirmation delay in bars.
2. Scan for bars whose high exceeds every neighbor's high within both windows (mirror for lows); ties are handled by convention, so check how your tool breaks them.
3. Distinguish provisional from confirmed: within the right-side window a candidate can still be voided, and honest tools mark that state visibly.
4. Layer strengths for hierarchy: a small-N pass maps minor swings, a large-N pass maps the major legs, and nesting the two shows which minor pivots live inside which major structure.
5. Anchor downstream tools, structure labels, trendlines, retracement grids, stop placements, only to confirmed pivots of the strength that matches the trade's scale.

## How it's calculated

Pivot strength is the number of bars on each side that a candidate swing high or low must exceed to qualify as a pivot.

```
1. Choose the strength: the bar counts required on each side of the candidate bar, n_left and n_right (often equal; commonly 2 to 10).
2. Bar t is a pivot high when H_t > H_{t-i} for every i = 1..n_left and H_t > H_{t+j} for every j = 1..n_right.
3. Bar t is a pivot low when Lo_t < Lo_{t-i} for every i = 1..n_left and Lo_t < Lo_{t+j} for every j = 1..n_right.
4. The pivot is confirmed only after n_right further bars have closed, so detection lags the pivot bar by n_right bars.
5. Raising the strength keeps only larger swings; with strict comparisons, a pivot of strength s also qualifies at every smaller strength.

  n_left: bars to the left the candidate must exceed (commonly 2 to 10)
  n_right: bars to the right the candidate must exceed (often set equal to n_left)
  t: index of the candidate pivot bar
  H_t: high of bar t (H_{t-i} and H_{t+j} follow the same convention)
  Lo_t: low of bar t (Lo_{t-i} and Lo_{t+j} likewise)
  i: offset across the left-side bars
  j: offset across the right-side bars
  s: shorthand for the strength when n_left = n_right = s
```

A Williams fractal is the special case n_left = n_right = 2.

Implementations differ on ties: strict > and < reject equal highs or lows, while >= and <= accept them.

Also appears as pivot length, pivot period, or swing length in indicator settings.

## How traders use it

- As a scale dial: low strength maps fine intraday swing grammar, high strength maps the major legs, and mismatched settings are a common reason two traders disagree about what the structure is.
- As an anchor rule: confirmed pivots anchor structure labels, trendlines, retracement grids, and structure-based stops, so the strength setting quietly parameterizes everything built on top of them.
- As backtest hygiene: acting only on pivots after their right-side bars close keeps historical tests honest, since using the final label at the pivot's own bar leaks future information.
- As a stop-run watchlist: high-strength pivots are where resting stops concentrate, so sweeps through them that immediately fail, [false breakouts](https://www.luxalgo.com/library/concept/false-breakout/) in structure terms, are monitored as trade events in their own right.
- For leg segmentation: pivots of an appropriate strength split price into [impulse](https://www.luxalgo.com/library/concept/impulse-leg/) and [corrective legs](https://www.luxalgo.com/library/concept/corrective-leg/), the raw material for trend anatomy, ratio measurements, and structure-based targets.

## Pivot strength vs related swing definitions

- **Williams Fractal** (https://www.luxalgo.com/library/concept/williams-fractal/): The fractal is this exact rule frozen at strength 2: two bars each side. It confirms fast and prints often, which suits it to minor-swing mapping; adjustable pivot strength generalizes the same test to any scale of structure.
- **ZigZag Structure** (https://www.luxalgo.com/library/concept/zigzag-structure/): Zigzag defines a swing by minimum price movement, a percentage or volatility multiple, rather than bar dominance. Move-based swings ignore time, so one vertical day can print a pivot bar-count rules would skip, and a slow drift can dominate weeks without ever moving enough to register.
- **Swing High/Low** (https://www.luxalgo.com/library/concept/swing-high-low/): Swing high/low is the concept; pivot strength is its most common parameterization. Any tool that claims to detect swings has answered the strength question somehow, and reading its settings tells you which structure scale it actually maps.

## FAQ

### What do left bars and right bars mean in pivot settings?

Left bars set how many earlier bars the pivot must exceed; right bars set how many later bars must fail to exceed it before the pivot is confirmed. Raising left bars demands a longer structure before the turn; raising right bars demands stronger confirmation afterward and adds exactly that many bars of delay to the label.

### Do higher pivot strength settings repaint less?

They do not repaint less, they confirm later. Any pivot logic is undecided until the right-side bars complete, and a provisional marker can move or vanish during that window. Once confirmed, a correctly implemented pivot never changes. What matters is whether a tool distinguishes provisional from confirmed pivots, not the size of the strength setting.

### What pivot strength setting should I use?

Match it to the structure you trade rather than optimizing it. Small settings, two to five bars, map the swing grammar scalpers and day traders act on; ten and beyond isolates the legs swing traders care about. Layering two settings, one minor and one major, usually beats hunting a single perfect number, and keeping the choice fixed preserves comparability across charts and time.

### Are bar-count pivots better than percentage zigzag swings?

They answer different questions. Bar-count strength asks whether a bar dominated its neighborhood in time, so it registers slow, grinding turns that never retrace much. Move-based zigzag asks whether price traveled enough to matter, so it catches violent V-turns that bar counts confirm late. Fast markets favor move-based definitions, structured markets favor bar counts, and some tools sensibly require both.

### Why do two traders map different structure on the same chart?

Usually because their pivot parameters differ, not because one is wrong. Different strengths, different timeframes, or bar-count versus move-based definitions produce different pivot sets, and every structure conclusion, what counts as a higher high or a break, follows from the pivots underneath. Agreeing on the swing definition first turns most structure arguments into settings arguments, which are easier to resolve.

### Can you act on a pivot before it confirms?

Only by trading a proxy. Options include a provisional marker that accepts it may vanish, confirmation from a smaller strength or lower timeframe that resolves sooner, or an event-based substitute such as a structure break through the prior confirmed pivot. Each buys speed by accepting more false positives; what none of them do is make the full-strength pivot knowable early, because its definition includes bars that have not happened yet.

## Implementations in the Library

- Pivot Strength (LuxAlgo): https://www.luxalgo.com/library/indicator/pivot-strength/

## Related concepts

- Swing High/low: https://www.luxalgo.com/library/concept/swing-high-low/
- Swing Structure Grammar: https://www.luxalgo.com/library/concept/swing-structure-grammar/
- Zigzag Structure: https://www.luxalgo.com/library/concept/zigzag-structure/
- Williams Fractal: https://www.luxalgo.com/library/concept/williams-fractal/
- Multi-timeframe Structure Alignment: https://www.luxalgo.com/library/concept/multi-timeframe-structure-alignment/
- Swing Magnitude Filters: https://www.luxalgo.com/library/concept/swing-magnitude-filters/
- Fractal Nesting: https://www.luxalgo.com/library/concept/fractal-nesting/

---

Source: https://www.luxalgo.com/library/concept/pivot-strength/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/