# Donchian Zig-Zag

Donchian Zig-Zag is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Donchian Zig-Zag draws a line that bounces between Donchian channel extremes, recreating zig-zag behavior with a tunable bounce speed. Slow it down for a lagging trend line that crosses price at potential entries, or speed it up for a leading, projective read. Its extended peaks and troughs double as support and resistance references.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Feb 15, 2021.
- Access: free.
- Concepts: [Zigzag Structure](https://www.luxalgo.com/library/concept/zigzag-structure/) (primary), [Donchian Channels](https://www.luxalgo.com/library/concept/donchian-channels/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn1a06001pvhsgrphd9jqt
- Page: https://www.luxalgo.com/library/indicator/donchian-zig-zag/

**Donchian Zig-Zag** draws a line that bounces off the extremities of a [Donchian channel](https://www.luxalgo.com/library/concept/donchian-channels/), recreating the familiar [zig-zag structure](https://www.luxalgo.com/library/concept/zigzag-structure/) with one twist: you decide how fast the line travels. At the lowest bounce speed it lags price and rides trends in straight segments; at higher speeds it converges on the extremes quickly enough to take on a leading, projective character. Extended lines through its peaks and troughs add a further layer of support and resistance analysis.

## How to Trade the Donchian Zig-Zag?

- **Bounce Speed at 1**: the line lags, and its cross with price can serve as an entry cue; the straight trajectory ignores retracements, which helps in holding a position through a trend.
- **Bounce Speed above 1**: faster convergence gives the line a predictive lean, sketching where the swing may be headed.
- **Peaks and troughs**: connect them with earlier highs and lows to project support and resistance. Approximate by nature, but a useful extra read.

This is an experimental take rather than a staple, one that aims to inspire unconventional approaches as much as to serve as a finished system. Treat its signals as a framework to test against your own process.

## Donchian Zig-Zag Settings

- **Length**: the period of the Donchian channel; larger values flip the line less often, favoring stable trend identification.
- **Bounce Speed**: how quickly the line heads for the channel extremities. Higher values converge faster for earlier trend reads.
- **Gradient** (default On): applies a gradient color to the area between the extremities.
- **Transparency**: sets how visible that filled area is.

## Frequently Asked Questions

### Is the Donchian Zig-Zag leading or lagging?

Both, depending on configuration. At Bounce Speed 1 it is deliberately lagging, crossing price late but filtering retracements; above 1 it converges ahead of confirmation and behaves more like a projection. That dial is the whole personality of the tool.

### How does it compare with Donchian MA Bands?

[Donchian MA Bands](https://www.luxalgo.com/library/indicator/donchian-ma-bands/) builds two-sided cloud zones from Donchian math applied to moving averages, while this build reduces the channel to a single bouncing line. One gives you zones to trade around, the other a minimalist trend path.

### Is the Donchian Zig-Zag free to use?

Yes. It is available at no cost from this page in the LuxAlgo Library, ready to add to your chart. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Delta ZigZag](https://www.luxalgo.com/library/indicator/delta-zigzag/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/delta-zigzag.md
- [Price Simplification](https://www.luxalgo.com/library/indicator/price-simplification/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/price-simplification.md
- [Elliott Wave](https://www.luxalgo.com/library/indicator/elliott-wave/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/elliott-wave.md
- [Wave Consolidation](https://www.luxalgo.com/library/indicator/wave-consolidation/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/wave-consolidation.md
- [Zig Zag Channels](https://www.luxalgo.com/library/indicator/zig-zag-channels/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/zig-zag-channels.md
- [Structural Leg Profiler](https://www.luxalgo.com/library/indicator/structural-leg-profiler/) (Zigzag Structure): markdown at https://www.luxalgo.com/library/indicator/structural-leg-profiler.md
- [Donchian MA Bands](https://www.luxalgo.com/library/indicator/donchian-ma-bands/) (Donchian Channels): markdown at https://www.luxalgo.com/library/indicator/donchian-ma-bands.md
- [Donchian Channels](https://www.luxalgo.com/library/indicator/donchian-channels/) (Market Structure): markdown at https://www.luxalgo.com/library/indicator/donchian-channels.md

---

Source: https://www.luxalgo.com/library/indicator/donchian-zig-zag/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
