All indicators

Swing High/Low Support Resistance

Nov 12, 2025

Static chart image
Support and ResistancePivot Based (Retrospective)

The Swing High/Low Support Resistance indicator automatically identifies and marks recent pivot peaks and troughs to highlight potential supply and demand zones. By detecting market structure turning points, it provides traders with visual cues for short-term support and resistance levels across any timeframe.

Usage

The tool is designed to provide clarity on market structure by labeling confirmed swing highs and lows. Traders can use these levels to identify potential reversal zones or breakout areas.

  • Swing High Labels: These appear above the price bar when a local peak is confirmed, suggesting a resistance zone where selling pressure might increase.
  • Swing Low Labels: These appear below the price bar when a local bottom is confirmed, highlighting support areas where buying interest may emerge.
  • S/R Lines: The indicator projects horizontal dashed lines from the most recent swing levels, allowing you to see how current price action interacts with historical turning points.
  • Trend Identification: Users can monitor the sequence of labels to identify market trends (e.g., higher highs and higher lows indicate an uptrend, while lower highs and lower lows indicate a downtrend).

Details

The script utilizes the ta.pivothigh() and ta.pivotlow() functions to detect price extremes. A pivot is confirmed only after a specific number of bars (defined by the "Swing Detection Length") has passed on both sides of the high or low. This ensures that the marked levels are significant local extremes rather than minor price fluctuations. Because the script requires confirmation bars, labels are non-repainting and appear once the pivot point is mathematically secured.

Settings

  • Swing Detection Length: Determines the number of bars required on each side of a high or low to confirm it as a swing point. Higher values result in more significant, but less frequent, pivot detections.
  • Number of S/R Levels to Display: Controls how many historical swing high and swing low horizontal lines are maintained on the chart.
  • Extend Lines Forward (Bars): Sets the number of bars the support and resistance lines project forward from their origin to assist in visualizing future price interactions.

FAQ

How do I access the Swing High/Low Support Resistance indicator?

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

Does this indicator repaint?

No, the labels and lines are generated based on confirmed pivots. They will appear on the chart only after the required number of confirmation bars (set in the Swing Detection Length) have closed.

Which timeframes work best with this tool?

The indicator is versatile and works on all timeframes. Lower timeframes like the 1-minute or 5-minute will show frequent intraday swings, while higher timeframes like the Daily or Weekly will highlight major structural support and resistance levels.

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.