All indicators

Pivot Points

Nov 12, 2021

Static chart image
Support and ResistancePivot Based (Retrospective)

The Pivot Points indicator identifies key market turning points by detecting structural highs and lows based on surrounding price action. It helps traders visualize potential reversal zones and price patterns by plotting dynamic boxes at confirmed pivot locations.

Usage

The indicator can be used to identify trend exhaustion and potential market reversals. Traders can use the pivot boxes as areas of interest for price reaction:

  • Pivot Highs: These appear when a high is surrounded by lower highs on both its left and right sides. They often act as temporary resistance levels.
  • Pivot Lows: These appear when a low is surrounded by higher lows on both its left and right sides. They often act as temporary support levels.
  • Price Patterns: By observing the sequence of these pivots, traders can more easily identify chart structures like Higher Highs or Lower Lows to determine the prevailing trend direction.

The indicator automatically extends the pivot boxes until price interacts with them, providing a visual representation of historical significance.

Details

The script utilizes the ta.pivotlow() and ta.pivothigh() functions to identify structural points. A Pivot Point High is confirmed when a bar has leftBars number of lower highs to its left and rightBars number of lower highs to its right. The same logic applies inversely for Pivot Point Lows.

A higher value for the left and right bar settings results in more significant, longer-term pivots, whereas lower values identify short-term price fluctuations. The boxes are drawn using the high/low and candle bodies of the pivot formation to create a "zone" rather than a single point.

Settings

Pivot Settings

  • Left Bars: The number of preceding bars required to have lower highs (for Pivot High) or higher lows (for Pivot Low).
  • Right Bars: The number of following bars required to have lower highs (for Pivot High) or higher lows (for Pivot Low).

Pivot Box

  • Show Pivot Boxes: Toggles the visibility of the rectangular zones drawn on the chart.

Pivot Box Customization

  • Pivot High Box: Sets the color for the resistance/high pivot boxes.
  • Pivot Low Box: Sets the color for the support/low pivot boxes.
  • Box Transparency: Adjusts the opacity of the drawn pivot zones.

Chart Customization

  • Maximum Box Displayed: Controls the total number of historical boxes kept on the chart to manage performance.

FAQ

How do I use these pivots for trading?

Pivots are often used to define market structure. For example, a series of higher pivot highs and higher pivot lows indicates an uptrend, while the failure to create a new high may signal a trend reversal.

What is the significance of the "Left" and "Right" bars?

These settings define the "strength" of the pivot. A pivot with 10 bars on each side is much more structurally significant than a pivot with only 2 bars on each side.

How can I access the Pivot Points indicator?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.