Skip to content
All library documents

Gann Swing Trend Detection from Consecutive Highs and Lows

Article MQL5 code base

Summary

Gann Swing is presented as a ZigZag-like indicator that connects selected highs and lows to show swings and possible trend changes. It has no configurable inputs. Two successively higher highs suggest an upswing, while two successively lower lows suggest a downswing. The rules then use each new bar’s high and low relative to the preceding bar to decide whether to extend the line upward or downward; inside bars are skipped, and external bars are resolved using the following bar’s direction.

A price move that holds above a prior peak is described as a possible uptrend start, while a move below a prior bottom may indicate a downtrend. These are interpretive signals rather than confirmed forecasts. The document gives no parameterization, market-specific guidance, test results, or risk controls, and the bar-by-bar rules may need careful implementation to avoid ambiguity around equal highs or lows and the meaning of price holding beyond a swing level.

Key ideas

  • The indicator connects swing highs and lows using Gann-style rules and has no input parameters.
  • Successive higher highs indicate an upswing, while successive lower lows indicate a downswing.
  • Inside bars are skipped, and the next bar helps determine how to connect an external bar.
  • A break above a prior peak or below a prior bottom is presented as a possible trend change.
  • The document provides no performance tests or risk-management guidance.

Tags

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