All indicators

Swing High/Low Signals

Aug 9, 2025

Static chart image
Price Action BasedSupport and ResistanceSignalsDashboard

The Swing High/Low Signals indicator identifies market turning points by detecting confirmed price pivots based on a user-defined lookback period. It provides traders with clear, non-repainting signals for swing highs and lows, facilitating the identification of trend reversals and support/resistance levels.

Usage

The tool is designed to highlight structural market shifts through a combination of visual markers and labels. When the script detects a new swing point, it plots a triangle at the historical pivot location and generates a "LONG" or "SHORT" label on the current candle to indicate signal confirmation.

  • Identifying Trends: Users can utilize the sequence of swing highs and lows to determine the current market structure (e.g., Higher Highs and Higher Lows for an uptrend).
  • Entry/Exit Points: The "LONG" and "SHORT" labels trigger exactly when a pivot is confirmed, making them useful for identifying potential entry zones.
  • Dynamic Levels: The info table in the top-right corner provides immediate access to the most recent swing high and low prices, which can be used for stop-loss placement or take-profit targets.

Details

This script utilizes the ta.pivothigh() and ta.pivotlow() functions to detect market turns. Because a pivot requires a specific number of bars to the right to be confirmed, the script is designed to be non-repainting; it only triggers a signal once the "Lookback Period" has passed and the pivot is mathematically locked in. This ensures that the signals seen on the chart are final and will not disappear or move after the candle closes.

Settings

  • Lookback Period: Defines the number of bars required on both sides of a high or low to confirm it as a swing point. Higher values result in more significant but delayed signals, while lower values detect minor fluctuations.
  • Show Signal Labels: Toggles the visibility of the "LONG" and "SHORT" labels on the chart.
  • Show Swing Lines: Toggles the display of lines connecting swing points to visualize market structure (if enabled in visual components).

FAQ

How do I use the Swing High/Low Signals?

You can use the signals to identify trend reversals or key support and resistance zones. When a "LONG" signal appears, it confirms that a swing low has been established.

Does this indicator repaint?

No, the indicator is programmed to wait for the lookback period to conclude before plotting a signal, ensuring that confirmed swings remain fixed on the chart.

How can I access this tool?

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.