Pivot Points

Nov 12, 2021

Static chart image
Support and Resistance
Pivot 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 access on the following platforms
tradingviewSymbolTradingView
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

ninjatraderNinjaTrader
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

metatrader4MetaTrader 4/5
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

thinkorswimThinkorswim
Open in your browser

This in-app browser is not compatible with Get Access from the library.

Tap the menu (...) at the top of your screen and select "Open in Browser", "Open in Safari", or "Open in Chrome" to continue.

Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.

Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.

As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.

Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.

Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.

This does not represent our full Disclaimer. Please read our full disclaimer.

© 2026 LuxAlgo Global, LLC.