Calculating a Percentage-Reversal Zigzag Indicator
Summary
The document describes a basic procedure for drawing a zigzag indicator from historical closing prices. The user chooses a percentage reversal threshold, which filters out smaller price moves. Starting from an initial price, the first move that crosses the threshold establishes the initial direction and a turning point. If prices continue in that direction, the current endpoint is updated to the new high or low. A later move that reverses by the threshold marks the next turning point, and the process repeats.
The explanation compares the method informally with point-and-figure reversals and cites a common charting description, but it gives no performance study or trading rules. Its main caveat is that recent chart points may remain provisional: a new extreme or a qualifying reversal is needed before the direction can be classified. The indicator therefore summarizes price swings according to a chosen threshold, while the latest segment can change as new prices arrive.
Key ideas
- The zigzag indicator marks price reversals that meet a chosen percentage threshold.
- The initial qualifying move establishes whether the first identified trend is upward or downward.
- During a continuing trend, update the endpoint to each new high or low.
- A qualifying move in the opposite direction confirms a reversal and creates the next turning point.
- The latest segment can remain undetermined until prices extend the trend or reverse enough to confirm a turn.
Tags
Full text
# How do I calculate the zigzag indicator? # How do I calculate the zigzag indicator? Zigzag indicator as defined here: https://www.investopedia.com/terms/z/zig_zag_indicator.asp ## Answer by Attack68 (score 4, accepted) https://quant.stackexchange.com/a/41437 Typing 'zigzag indicator' into google yields Investopedia's entry as first search result. Importantly it states: > To use the zig zag indicator, a percentage of price movements must be set. Although the default value for a zig zag is 5%, a setting of 9% would ensure that only price fluctuations of 9% or more would be shown in the chart. This eliminates smaller price swings and allows the analyst to see the bigger picture. Normally, closing prices of securities are used, and imaginary points are placed on the given chart where the price reverses by the set percentages. These points are then connected by straight lines and the required information appears. I have never calculated one but to me these look like simpler versions of point-and-figure reversals. The steps seem to be: 1) Take a historical set of close prices and set your reversal parameter, e.g. 9%. 2) Consider the first point $x_0$. Find the first subsequent point that differs from $x_0$ by 9%, which establishes either an up or downtrend, set this point as $x_1$. 3) If the price continues in the same trend update the point $x_1$ to a new high/low. 4) The first subsequent point that reverses the trend by 9% from $x_1$ is set to $x_2$. 5) repeat 3) and 4) determining new points. Note that the final points of the chart are in an undetermined trend since information either about a new high/low or a reversal is needed to categorise them.
Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.