Chart Pattern Scanning with Zigzag Pivots and Shape Constraints
Summary
This Pine library implements chart-pattern scanning and drawing from Zigzag pivot points. It represents patterns with pivot arrays, paired trend lines, and drawing properties, and includes pattern families such as channels, wedges, triangles, flags, and pennants. Its scan settings allow users to choose the number of pivots and set tolerances for comparing line slopes, identifying flat lines, assessing flags, and checking bar ratios.
The library can draw pattern boundaries, zigzag paths, pattern names, and numbered pivots. It also exposes controls for overlapping patterns and repainting; the documentation identifies an offset setting of one as the choice for non-repainting scans. Pattern recognition depends on pivot construction and configurable thresholds, and allowing repainting can change detected coordinates as new data arrives. This is reusable charting code, not a standalone trading system: the document gives no entry or exit rules, backtest, or evidence that detected shapes have predictive value.
Key ideas
- The library detects chart formations from Zigzag pivots and trend-line relationships.
- Scan settings control pivot count, slope tolerance, flatness, flag shape, and bar-ratio checks.
- Supported formations include channels, wedges, triangles, flags, and pennants.
- Drawing options control trend lines, zigzag paths, labels, and pivot markers.
- An offset of one is documented for non-repainting scans, while repainting can be enabled as an option.
- The library offers pattern tools but no tested trading rules or performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.