All indicators

Pivot Points

Oct 6, 2022

Static chart image
Support and ResistancePivot Based (Retrospective)Volatility

The Pivot Points indicator identifies significant swing highs and lows to visualize the current market range and price structure. By utilizing a deviation-based threshold and depth analysis, the tool filters out minor price fluctuations to highlight major impulsive moves and key structural levels.

Usage

The tool can be used to identify trend reversals and range-bound environments. When a significant pivot is detected, the script draws horizontal lines representing the top and bottom of the most recent impulsive leg. These levels often act as support and resistance.

Examples of usage include:

  • Trend Identification: Upward sloping dashed lines connecting pivots suggest a bullish trend, while downward sloping lines suggest a bearish trend.
  • Range Trading: The extended horizontal lines (red for top, green for bottom) provide a visual representation of the current trading range.
  • Breakout Monitoring: Traders can watch for price action that breaks outside the current established pivot range.

Details

The script functions by analyzing price bars over a specific "Depth." A pivot is confirmed only if it remains the highest high or lowest low within that lookback period. To filter noise, a deviation threshold is calculated using the Average True Range (ATR). A new pivot line is only initiated if the price movement exceeds this threshold relative to the previous pivot. If a new extreme is reached in the same direction, the current pivot line is updated rather than creating a new one.

Settings

  • Deviation: A multiplier used to determine the required price move from the previous pivot. Increasing this value will filter out more market noise and show only larger structural moves.
  • Depth: The minimum number of bars used to validate a pivot high or low. Higher values result in fewer, more significant pivots.
  • Delete Last Line: When enabled, the script will only show the most recent pivot leg on the chart, cleaning up historical data.
  • Change BgColor: If enabled, the chart background will change color (green for bullish legs, red for bearish legs) to provide a quick visual cue of the current trend direction.

FAQ

How do I access Pivot Points?

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

Why is there a delay in the pivot appearing?

Pivots require a certain number of bars to the right of the extreme point to be confirmed. This is determined by the "Depth" setting; a higher depth will result in a longer confirmation delay.

What does the deviation setting do?

The deviation setting acts as a sensitivity filter. It ensures that price has moved significantly enough (based on ATR) before a new structural trend leg is identified, preventing the script from reacting to minor "choppy" price action.

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.