Discussing the article: "Building a Professional Trading System with Heikin Ashi (Part 2): Developing an EA"

 

Check out the new article: Building a Professional Trading System with Heikin Ashi (Part 2): Developing an EA.

This article explains how to develop a professional Heikin Ashi-based Expert Advisor (EA) in MQL5. You will learn how to set up input parameters, enumerations, indicators, global variables, and implement the core trading logic. You will also be able to run a backtest on gold to validate your work.

This article is the second part of the series "Building a Professional Trading System with Heikin Ashi." In Part One, we built a custom Heikin Ashi indicator using MetaQuotes Language 5 (MQL5), following best practices for custom indicator development. In this next part, we move a step further and develop an Expert Advisor named Zen Breakout, which uses our custom Heikin Ashi indicator and the standard MetaTrader 5 Fractals indicator to generate reliable breakout signals.

The concept is simple:

  • When a strong bullish Heikin Ashi candle closes above a recent swing high (detected by the Fractals indicator), the EA opens a long position.
  • When a strong bearish Heikin Ashi candle closes below a recent swing low, the EA opens a short position.

Each trade opened by our EA features clearly defined stop-loss and take-profit levels with a configurable risk-to-reward ratio. After reading this article, you will understand how to:

  • Hook a custom indicator and a built-in indicator to an EA.
  • Implement breakout entry logic using Heikin Ashi and fractals.
  • Apply flexible position sizing (manual or based on account risk percentage).
  • Package an EA with its indicator together as a single file for easy distribution.


    Author: Chacha Ian Maroa