Skip to content
All library documents

Finding Multi-Bar Doji Patterns with Flexible Metabar Recognition

Article MQL5 articles

Summary

The article presents a method for detecting Doji candlesticks that span variable numbers of chart bars. Fixed timeframe boundaries can split continuous price movements in ways that hide a pattern; the proposed indicator instead combines consecutive bars into metabars and checks their aggregated OHLC values. Users set maximum body and shorter-shadow proportions, a range of metabar widths, and filters for minimum size. The indicator examines completed bars, signals a detected pattern, and can show its width and direction.

Examples illustrate detections across multiple bars, including a five-bar Doji that a conventional timeframe view would miss. These examples demonstrate the indicator’s behavior, not the profitability of trading the patterns. Small or noisy formations and repeated signals can be problematic, and a Doji is not a trade signal on its own. The article says practical effects depend on the trading strategy and calls for further experiments to measure trade outcomes and test how metabar signals work with other forms of analysis.

Key ideas

  • Fixed bar boundaries can obscure price formations that become visible when adjacent bars are combined.
  • Metabars aggregate OHLC values across a configurable range of consecutive bars.
  • Body and shadow proportions define Doji shape, while size filters can exclude small formations.
  • The indicator signals only after the relevant bars are complete and can report metabar width and direction.
  • Doji detections require additional analysis; the article does not establish that they produce profitable trades.

Tags

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