Skip to content
All library documents

ZigZag Swing Detection with Depth, Deviation, and Backstep Parameters

Article MQL5 code base

Summary

The document introduces XigXag as a modification of the ZigZag indicator, used to generalize price highs and lows for trading decisions. It describes three configurable inputs: depth, which sets the bars considered when identifying a candidate high or low; deviation, which sets the minimum price movement from a prior turning point; and backstep, which sets the minimum bar separation between extrema.

The listed defaults are depth 12, deviation 5 pips, and backstep 3 bars. The text says the indicator is used to identify levels for opening and closing positions, but gives no chart, trading rules, performance evidence, or guidance on risk management. As with other swing-point indicators, the resulting turning points are only useful in context; this brief description does not explain how signals are confirmed or whether past extrema can change as new prices arrive.

Key ideas

  • XigXag is presented as a modified ZigZag indicator for identifying generalized price highs and lows.
  • Depth controls the number of bars used to assess candidate extrema.
  • Deviation sets the minimum price distance from a prior high or low.
  • Backstep enforces a minimum separation between identified highs and lows.
  • The document gives parameter defaults but no evidence that using them produces profitable trades.

Tags

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