Swing High/Low (ZigZag)

Jan 27, 2025

Static chart image
Support and Resistance
Signals
Dashboard
Patterns

The Swing High/Low (ZigZag) tool provides a comprehensive way to visualize price swings and market structure by identifying significant high and low points and connecting them with a dynamic ZigZag line.

Usage

The tool is primarily used to identify market structure and trend direction. Traders can use the generated swing levels as potential support and resistance zones.

  • Trend Identification: The ZigZag line connects major peaks and troughs, offering a visual representation of the current trend direction.
  • Support and Resistance: The horizontal lines extending from swing highs and lows mark critical price levels.
  • Breakout Analysis: When a level is breached, the script can display it as a dashed line, signaling a potential shift in market structure or a continuation of a move.
  • Sensitivity Adjustment: By modifying the "Swing Length" input, users can filter out minor price fluctuations to focus on long-term trends or decrease the value for more localized price action.

Details

The indicator calculates swing points by looking back over a user-defined "Swing Length." A swing high is confirmed when the price reaches the highest point over the period and then begins to pull back. Conversely, a swing low is confirmed when the price reaches the lowest point over the period and begins to bounce.

The script includes a real-time table in the top-right corner that displays the current swing direction using arrow symbols, providing an immediate snapshot of the prevailing market sentiment. Additionally, "Shadow" levels can be enabled to highlight the area around a swing point, providing a clearer visual anchor for price analysis.

Settings

Levels

  • Swing Length: Determines the lookback period used to identify the highest highs and lowest lows.
  • Levels: Toggles the visibility of the horizontal swing high and low lines.
  • Broken Levels: When enabled, levels that have been intersected by price action are converted into dashed lines to represent broken structure.
  • History Levels: Controls whether the script displays only the most recent swing levels or keeps historical levels on the chart.
  • Shadow: Toggles a wider, semi-transparent background line behind the main swing levels for better visibility.
  • Shadow Width: Adjusts the thickness of the shadow visual.
  • Color Inputs: Customizable color pickers for the Swing High (Red) and Swing Low (Green) visuals.

FAQ

How do I use the Swing High/Low (ZigZag) indicator?

Simply add the tool to your chart and adjust the Swing Length to match your trading timeframe. Use the horizontal levels to identify potential reversal zones and the ZigZag line to track market structure.

What does it mean when a level becomes dashed?

A dashed level indicates that the price has crossed through a previous swing high or low, suggesting that the old support or resistance level has been broken.

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 access on the following platforms
tradingviewSymbolTradingView
ninjatraderNinjaTrader
metatrader4MetaTrader 4/5
thinkorswimThinkorswim

Unlock Unlimited Access to the LuxAlgo Library

Upgrade your plan to get all indicators, strategies, charts, and full access to Quant, our AI agent.

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.