Skip to content
All library documents

Building an MQL5 Indicator for Confirmed Oops Gap Reversals

Article MQL5 articles

Summary

The article develops an MQL5 chart indicator for finding bullish and bearish Oops gap reversals. It defines a gap as an open beyond the previous bar’s low or high by at least a configurable minimum, then confirms the reversal when a completed bar closes back through that prior boundary. Confirmation may occur on the gap bar or within a limited number of later bars.

The indicator maps historical signals into separate bullish and bearish buffers, draws arrows on confirmed bars, and updates recent completed data as new bars arrive. It accepts only the first qualifying fill for each gap and validates its minimum gap and validity-window inputs. These design choices make the rules consistent across manual chart review and indicator output.

The article is an implementation guide, not a performance study: it provides no evidence that the signals are profitable. Signals rely on closes rather than intrabar touches, and there are no trend, spread, session, or news filters. Broker history and session boundaries can also affect displayed results, so the tool is best treated as a research aid for studying the pattern.

Key ideas

  • A bullish gap opens below the previous low, while a bearish gap opens above the previous high, subject to a minimum size.
  • A gap is confirmed only when a completed bar closes through the relevant previous-bar boundary.
  • A setup may confirm on its gap bar or within a configurable number of later bars.
  • Separate indicator buffers hold bullish and bearish arrows, and only the first qualifying fill is recorded per gap.
  • The indicator standardizes pattern detection but does not establish profitability or account for trading filters.

Tags

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