Skip to content
All library documents

Expanding Candlestick Encoding for Directional Pattern Frequency Analysis

Article MQL5 articles

Summary

This article refines a symbolic candlestick classification system by splitting previously unclassified candles into bullish and bearish categories. It retains symbols for several candle shapes and assigns a direction-specific fallback when a candle matches none of them. The updated alphabet is applied to single- and multi-candle frequency analysis, with samples from GBPUSD and gold on M15 and H1 charts; additional asset examples illustrate how longer sequences affect pattern uniqueness. The analysis pipeline counts sliding sequences, ranks their frequencies, and can optionally omit the full encoded series from its output.

The article argues that the former catch-all category primarily measured classification coverage, not a meaningful recurring pattern. It reports that the expanded categories capture more directional information and that longer patterns tend to create more unique but less frequent sequences. These are descriptive frequency results, not evidence of forecasting power or a tradable edge. The examples cover limited instruments, timeframes, and sample windows, and the classification rules define shape categories rather than testing whether those categories predict future returns.

Key ideas

  • A direction-specific fallback preserves bullish or bearish information for candles outside the named shape classes.
  • The encoded sequence can be analyzed with generic sliding-window pattern counting and frequency ranking.
  • A catch-all category can reflect gaps in classification coverage rather than a market structure with trading significance.
  • Longer candle sequences tend to have more unique forms and fewer repeated observations.
  • Frequency analysis describes sampled history but does not establish predictive value.

Tags

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