Skip to content
All library documents

Heikin Ashi and Fractal Breakouts with Risk-Based Position Sizing

Article MQL5 articles

Summary

The article develops a MetaTrader Expert Advisor that combines Heikin Ashi candles with fractal swing points to identify breakouts. A bullish candle with no lower wick closing above a recent swing high triggers a long setup; a bearish candle with no upper wick closing below a swing low triggers a short setup. Stops are placed at the breakout candle's opposite extreme, and take profit is set from a configurable risk-to-reward ratio. The EA can use fixed lot sizes or calculate size from a chosen percentage of account balance at risk.

The implementation discussion covers connecting the custom and built-in indicators, reading their buffers, configuring trade parameters, and packaging the custom indicator with the EA. A reported gold backtest covers eight months in 2025 and begins with a $100,000 balance; the article says equity grew slightly above 12%, while also characterizing the system as roughly breakeven. This single backtest does not establish robustness, and the author suggests parameter optimization and additional filters such as trading sessions. The article provides no broader out-of-sample evidence.

Key ideas

  • The entry signal combines a wick-filtered Heikin Ashi candle with a break beyond a recent fractal swing point.
  • The stop is placed at the breakout candle's low for longs and high for shorts.
  • A configurable risk-to-reward ratio sets the take-profit distance relative to the stop distance.
  • Position size can be fixed or calculated from account balance and a per-trade risk percentage.
  • The reported gold backtest is limited evidence and the article suggests further filtering and optimization.

Tags

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