Applying ZigZag Extrema Detection to Indicator Buffers and Arrays
Summary
This document explains how to run a ZigZag extrema calculation on a source buffer, illustrated with an RSI buffer in an indicator. The function writes detected turning points to an output buffer and accepts a search mode for highs, lows, or both. It can also process an ordinary array by passing the array length as the number of rates, rather than relying on an indicator's bar count.
The excerpt provides a usage pattern and notes an absolute minimum input length of 100 bars. It does not include the underlying calculation, define how depth, deviation, and backstep affect detection, or show completed examples for each search mode. As with ZigZag methods generally, extrema can be revised as new data arrives, so the excerpt alone is insufficient to establish that detected turns are stable or suitable as real-time signals.
Key ideas
- The calculation can use an indicator buffer or a regular numeric array as its source.
- A search mode selects highs, lows, or both for the output.
- The example refreshes an RSI source buffer before calling the ZigZag routine.
- The stated minimum input length is 100 bars.
- The excerpt omits the calculation details and does not address the stability of detected extrema.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.