Skip to content
All library documents

Building a Heikin-Ashi Trend-Following System and Testing Its Limits

Article MQL5 articles

Summary

The document explains how Heikin-Ashi candles smooth ordinary price bars and make trends easier to read. It gives the synthetic open, high, low, and close calculations, then describes visual cues: candle color indicates direction, candles with small bodies and long shadows can signal consolidation or a possible turn, and candles with little shadow can indicate a stronger trend. These cues inform a simple rule-based system that reverses on an opposite-color candle and trails stops behind prior bars.

The article describes implementing the rules as an MQL5 expert advisor and testing it on EURUSD and GBPUSD across several timeframes. The reported outcomes vary by pair and timeframe: EURUSD results are described as ineffective, while GBPUSD is positive in two cases, including a reported profit over a long test period. The author presents this as an illustration rather than evidence of a robust edge. The system has no filter to distinguish reversals from consolidations, and the suggested need for extra signals, broader instrument tests, and attention to volatility limits the conclusions.

Key ideas

  • Heikin-Ashi bars average current and prior price information to smooth chart movement.
  • Candle color provides a basic directional cue, while body size and shadows help assess trend strength or consolidation.
  • The example system opens or reverses positions on a candle color change and trails stops behind prior bars.
  • Reported backtest results differ across currency pairs and timeframes, so the example does not establish a reliable trading edge.
  • A filter may be needed to distinguish genuine reversals from consolidation signals.

Tags

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