Recursive Zigzag Pivots for Automatic Andrews Pitchforks
Summary
This indicator automatically draws pitchforks from successive pivot points found by a recursive zigzag. It iterates through zigzag levels, selects three pivots for each candidate fork, and filters candidates using a pivot ratio range and a maximum span. Users can choose Andrews, Schiff, or modified Schiff handles, and set the fork’s neck to the median or inside pivot. Optional ratio-based forks can be shown with extensions and shaded fills.
The code exposes choices that affect how stable the drawings are, including using real-time bars or confirmed bars and including the current unconfirmed pivot or waiting for confirmation. The accompanying explanation also presents the script as an example of organizing Pine Script components into reusable libraries using types and methods. It describes implementation and visualization, not a trading signal or tested strategy; the document supplies no performance evidence, and real-time pivot choices can change what appears on a chart as new bars arrive.
Key ideas
- The indicator recursively finds zigzag pivots and uses triples of pivots to construct pitchforks.
- Users can select Andrews, Schiff, or modified Schiff pitchfork geometry and a median or inside neck.
- Ratio bounds filter candidate forks, while optional ratio levels control which additional forks are drawn.
- Real-time and confirmed-pivot settings create a trade-off between responsiveness and stability.
- The accompanying programming example organizes reusable Pine Script components with types and methods.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.