Skip to content
All library documents

Detecting Bullish and Bearish Outside Bar Breakouts with MQL5

Article MQL5 articles

Summary

The article defines the two directional forms of the Outside Bar pattern and describes how to detect and display them with the DoEasy MQL5 library. A bullish outside bar fully covers the prior candle and closes above its high; the suggested entry is a break above the signal bar’s high with a small filter. A bearish outside bar covers the prior candle and closes below its low, with entry on a filtered break below its low. The article also updates library properties for candle-size ratios and revises pattern access methods to support multiple patterns more compactly.

The implementation is compiled and run to show detected patterns on a chart. The author deliberately uses permissive candle-proportion settings to find more examples, noting that stricter proportions produce fewer but more selective patterns. This is a pattern-detection and library-development demonstration, not evidence that the breakout rules are profitable. No systematic backtest, transaction-cost analysis, or comparison against alternatives is provided.

Key ideas

  • A bullish outside bar covers the previous candle and closes above its high, while a bearish one closes below the previous low.
  • The described entries trigger on a filtered break beyond the signal candle’s high or low.
  • The library represents candle proportions and size ratios as pattern properties to support configurable detection.
  • Looser candle-proportion settings increase detected examples, while stricter settings make patterns rarer.
  • Chart detection demonstrates implementation behavior but does not establish trading profitability.

Tags

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