Skip to content
All library documents

A Reusable Candlestick Pattern Library with Search and Trading Tools

Article MQL5 articles

Summary

This article develops an MQL5 library for describing candle types and patterns, configuring their recognition parameters, and returning statistics from historical analysis. Its class structure stores candle features, trend state, pattern counts, occurrence rates, directional movement probabilities, and efficiency measures. Users can set weights and thresholds, define a sample range and trend period, and choose between preset and generated patterns. The library is intended for reuse in indicators, trading panels, and Expert Advisors.

The article then describes three applications built around the library: a candle search indicator, a pattern search indicator, and an Expert Advisor that can trade patterns. It discusses testing and optimization in generated-pattern and existing-pattern modes, with figures cited as examples of the workflow. The presented material is primarily a software design and implementation guide; the supplied excerpt does not report enough numerical results to judge predictive performance or robustness. Its pattern statistics and optimization outputs should therefore be treated as research tools rather than evidence that a pattern is profitable.

Key ideas

  • The library separates candle and pattern definitions, configurable recognition parameters, and analysis outputs.
  • Its statistics include pattern count, frequency in the sample, directional movement probability, and efficiency ratings.
  • Generated and predefined patterns can be searched through indicators and used by an Expert Advisor.
  • Optimization and testing illustrate the workflow, but the excerpt does not establish reliable trading performance.

Tags

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