Discussing the article: "Encoding Candlestick Patterns (Part 4): Frequency Analysis for Double-Candlestick Structures"

 

Check out the new article: Encoding Candlestick Patterns (Part 4): Frequency Analysis for Double-Candlestick Structures.

This article extends single-candlestick analysis to ordered double-candlestick patterns using an MQL5 script. The script encodes candles into symbols, extracts every consecutive two-symbol sequence (treating Aa and aA as different), counts occurrences and percentages, and writes sorted frequency tables to a text file. Readers can quickly identify the most recurrent transitions by symbol, timeframe, and lookback for further statistical testing.

For the double-candlestick analysis, we extracted every unique two-symbol pattern from the encoded market series, counted its frequency of occurrence, and sorted the patterns in descending order. A total of 1,500 candlesticks were analyzed. Since each observation consists of two consecutive candlesticks, the sliding-window procedure generated 1,499 overlapping double-candlestick patterns.

The study was conducted on gold (XAUUSD) and GBPUSD across three timeframes: 1 hour (H1), 15 minutes (M15), and 5 minutes (M5). This multi-timeframe approach allows us to assess whether the frequency characteristics of double-candlestick patterns remain consistent across different market resolutions or exhibit timeframe-dependent variations.

Author: Daniel Opoku