Skip to content
All library documents

Encoding Candlestick Shapes as Symbols for Systematic Pattern Detection

Article MQL5 articles

Summary

The article proposes turning candlestick shapes into symbolic codes so pattern recognition can be implemented consistently. It defines candle bodies and wicks from open, high, low, and close, then groups structures by direction and shape. The examples pair bullish uppercase and bearish lowercase codes for long or short candles, pin bars, inverted pin bars, and spinning tops, with a separate code for doji candles. Sequences of these symbols can then be scanned as strings to identify candidate multi-candle patterns.

The described MQL5 indicator classifies candles, scans a configurable history window, and reports detected combinations through print and alert functions. This makes pattern definitions easier to log, compare, and test than purely visual descriptions. However, the supplied text does not fully specify all classification thresholds, and its examples of pattern meaning are not evidence of predictive value. The article presents encoding as an analytical foundation; it does not establish that any code sequence has an edge. Statistical evaluation, market context, and risk controls remain necessary before using detected patterns to trade.

Key ideas

  • Body and wick measurements provide a basis for classifying candle shapes programmatically.
  • Paired uppercase and lowercase symbols distinguish bullish and bearish forms.
  • Symbol sequences can be scanned to detect candidate multi-candle patterns consistently.
  • An indicator can log or alert on detected sequences over a configurable lookback.
  • Encoding improves reproducibility but does not prove that a pattern predicts returns.

Tags

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