Skip to content
All library documents

Using MQL4 to Study Candle Sequences and Indicator Distributions

Article MQL5 articles

Summary

The article presents MQL4 as a way to investigate price behavior with historical data. Its examples count bullish and bearish candles, estimate how often each color follows the other, and build separate candle-color histograms across RSI and Williams %R readings. It reports sample proportions from one dataset, including a slight excess of opposite-color transitions over same-color transitions, but does not establish that these patterns predict returns.

It then argues that trade outcomes are a more practical object of study than candle colors alone. A sample routine simulates whether a hypothetical buy or sell reaches a fixed stop loss or take profit within a chosen number of bars, accounting for spread in its entry-price setup. These examples are exploratory tools rather than a complete backtest methodology. The article does not report results for the stop-and-target experiment or address broader issues such as out-of-sample validation, intrabar event ordering, or transaction costs beyond spread, so its statistics should not be treated as evidence of a tradable edge.

Key ideas

  • MQL4 can automate counts of candle colors and their successive patterns.
  • The article reports a small excess of opposite-color transitions in its historical sample.
  • RSI and Williams %R readings can be grouped into histograms by candle color.
  • A simple historical simulation can classify trades by whether a stop or target is reached first.
  • Exploratory frequency counts alone do not establish predictive power or profitability.

Tags

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