Skip to content
All library documents

Breakout Bars Trend Detection with Extreme-Based Reversals

Article MQL5 code base

Summary

This indicator identifies trend changes without moving averages. It tracks price extremes and changes direction when price reverses by a configurable distance and a bar closes beyond the preceding bar’s high or low. The reversal distance can be set in pips or as a percentage. Optional chart displays show reversal levels and information about recent trends, including the number of breakout bars and the distance between reversals.

The document presents the tool mainly as a way to determine trend direction, with other methods needed to choose entries and exits. It suggests that several recent trends with few breakout bars or negative size may indicate a flat market, potentially preceding a longer trend. These are qualitative observations; no backtest, performance data, or rules for confirming a subsequent trend are provided. The indicator’s display also depends on a chart setting that places the chart in front being disabled.

Key ideas

  • Trend changes require both a minimum reversal from a price extreme and a close beyond the prior bar’s high or low.
  • The reversal threshold can be specified in pips or percentage terms.
  • Optional displays report reversal levels and statistics for recent trends.
  • The indicator is intended to identify trend direction, while separate methods should determine entries and exits.
  • Few breakout bars or negative trend size may suggest a flat market, but the document provides no supporting performance analysis.

Tags

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