Skip to content
All library documents

Detecting Swing Patterns with Fibonacci Retracement Bands

Article TradingView scripts

Summary

This indicator builds a swing sequence from confirmed price pivots, connecting alternating highs and lows into a zigzag. It can compare that sequence with a configurable multi-leg pattern template. For each leg, the user specifies a source leg and a from-to Fibonacci retracement band; the detector checks whether the observed endpoint lies within the resulting price interval. A match is drawn as a polyline, and detected pattern times are listed in a table. The script also provides controls to draw a sample custom pattern beyond the latest bar.

The template can include successive legs through EF, with some legs optional, and the zigzag can be shown or hidden. Pivot-based identification is inherently delayed because a pivot needs subsequent bars for confirmation. The document is code for a configurable visual detector, not a tested trading strategy: it does not define entries, exits, risk controls, or outcome statistics. Its usefulness depends on the chosen pivot window and retracement bands, and no evidence is provided that detected formations predict price movement.

Key ideas

  • Confirmed highs and lows form an alternating zigzag swing sequence.
  • Users configure successive pattern legs using Fibonacci retracement bands relative to prior legs.
  • The indicator draws matching formations and records their times in a table.
  • Pivot confirmation delays recognition until later bars have formed.
  • The document provides no trading rules or evidence that the detected patterns predict returns.

Tags

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