Skip to content
All library documents

Recursive Zigzag Scanning for Reversal Chart Patterns

Article TradingView scripts

Summary

This indicator scans multilevel zigzag pivots for reversal chart patterns and draws detected formations on the price chart. Its selectable pattern families include double taps and triple taps, with cup-and-handle and head-and-shoulders patterns also available. A configurable error tolerance and shoulder-ratio range guide ratio-based pattern matching, while zigzag length, pivot depth, and minimum scan level shape which swings are considered.

Optional RSI, MFI, OBV, and external-series inputs add divergence checks to pattern confirmation. Detected patterns can be described in alerts, and trade properties include a risk adjustment used in stop calculations. The code presents a configurable detection and annotation framework, not empirical evidence that these patterns forecast reversals or yield profitable trades. Pivot-based patterns depend on swing identification and settings, and the supplied text does not report validation results, execution assumptions, or risk-adjusted performance.

Key ideas

  • The scanner uses recursively calculated zigzag pivots to search for reversal formations.
  • Pattern selection includes double taps and triple taps, with additional pattern types available as options.
  • Error tolerance and shoulder ratios govern parts of the pattern matching process.
  • Optional indicator divergence checks can be used to confirm detected patterns.
  • The document provides no evidence of predictive accuracy or trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.