Skip to content
All library documents

Detecting and Classifying Price–Oscillator Divergences

Article MQL5 articles

Summary

The article explains how to define bullish and bearish divergence and convergence by relating price and oscillator swings to possible reversal or continuation signals. It notes that common labels can be ambiguous, then proposes a more systematic classification based on the directions of price and indicator movement, including horizontal movement and triple divergences.

It compares three ways to identify swing highs and lows: neighboring bars, a reversal threshold from the latest extreme, and crossing the oscillator midpoint. Bar-based detection is described as relatively independent of the oscillator, while threshold settings depend on the indicator and midpoint crossing can introduce lag. The article then outlines a universal oscillator and indicator for selecting an oscillator, finding extremes, checking divergence conditions, and displaying signals. It offers a framework and implementation approach, but provides no performance evidence that the signals are profitable; results depend on oscillator and parameter choices.

Key ideas

  • Divergence is framed as a discrepancy that may signal reversal, while convergence is framed as a discrepancy that may signal trend continuation.
  • Price and oscillator swing points can be identified with neighboring bars, a reversal threshold, or a midpoint crossing.
  • Bar-based swing detection is less dependent on oscillator scale than threshold-based detection.
  • Midpoint-crossing methods confirm extremes late and can add substantial lag.
  • The article organizes signal types by combining price and indicator directions, including flat movement and multiple swings.

Tags

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