The Heiken Ashi Expert Advisor is a trend-based automated trading system developed for MetaTrader 4 and MetaTrader 5, built around the well-known Heiken Ashi charting technique. The EA uses the platform’s standard Heiken Ashi indicator and applies a deliberately simple, rule-based logic focused on trend strength, exhaustion, and early reversals.
Unlike many indicator-heavy systems, this EA analyzes only the two most recently completed Heiken Ashi candles, without relying on complex patterns or curve-fitted parameters. One of its key advantages is that it offers no traditional strategy inputs to optimize, reducing the risk of overfitting to historical data. Optional ATR-based position sizing is available for more advanced money management.
The Expert Advisor is available in two versions:
- A standard version
- A Z-Score optimized version, designed to reduce drawdown by filtering trade sequences
Both versions are available for MT4 and MT5.
Heiken Ashi Overview
Heiken Ashi (Heikin Ashi, 平均足) is an alternative candlestick representation that smooths price action to make trends and reversals easier to identify. Unlike traditional candlesticks, Heiken Ashi candles do not reflect exact Open, High, Low, and Close prices. Instead, they emphasize direction, momentum, and trend quality.
- White candles typically indicate bullish conditions
- Red candles typically indicate bearish conditions
A change in candle color often signals a potential trend reversal, while longer candle bodies indicate strengthening momentum. Wicks provide additional insight into volatility and trend stability.
Trading Logic
The Heiken Ashi Expert Advisor uses a counter-trend entry logic by default, aiming to capture early reversals after strong directional moves.
Entry Rules
- Sell when:
- The latest Heiken Ashi candle is bullish
- Its body is longer than the previous candle’s body
- The previous candle is also bullish
- The latest candle has no lower wick
- Buy when:
- The latest Heiken Ashi candle is bearish
- Its body is longer than the previous candle’s body
- The previous candle is also bearish
- The latest candle has no upper wick
If a position in the opposite direction is open, it will be closed when a new signal appears. If the open position matches the signal direction, the signal is ignored.
Exit Rules
- Exit short positions when:
- Two consecutive bearish Heiken Ashi candles appear
- The latest candle has no upper wick
- Exit long positions when:
- Two consecutive bullish Heiken Ashi candles appear
- The latest candle has no lower wick
This inverted trading logic allows the EA to enter trades against strong trends, attempting to catch reversals early. Traders can disable this behavior by setting the Inverted parameter to false, switching the EA to a trend-following mode.
Position Sizing & Risk Management
The EA supports:
- Fixed lot sizing
- ATR-based fixed fractional position sizing, allowing risk to scale with market volatility
The Z-Score optimized version introduces a virtual trading mode. After a profitable trade, the EA temporarily stops real trading and simulates trades internally. Once a losing virtual trade occurs, real trading resumes. This mechanism is designed to reduce drawdown, not to maximize profit.
Backtest Results
Backtests were performed on EUR/USD D1 from January 1, 2013 to April 13, 2022.
Standard Version
- Fixed lot (0.1):
- Net Profit: $2,920
- Maximum Drawdown: 18%
- ATR-based position sizing:
- Net Profit: $1,025
- Maximum Drawdown: 22.4%
Z-Score Optimized Version
- Fixed lot (0.1):
- Net Profit: $421
- Maximum Drawdown: 9.5%
- ATR-based sizing:
- Net Profit: $62
- Maximum Drawdown: 8.2%
The Z-Score version significantly reduces drawdown but also limits trading frequency and profitability.
Trading Frequency & Characteristics
- Average trades (standard version): ~3 trades per month
- Average trades (Z-Score version): ~11 trades per year
- Average loss: ~136 pips
- Average win: ~83 pips
Testing shows that EUR/USD is the most suitable instrument for this strategy, while other pairs tend to suffer from higher drawdowns.
Conclusion
The Heiken Ashi Expert Advisor is best suited for traders interested in:
- Heiken Ashi–based market structure
- Early trend reversal detection
- Minimal parameter optimization
- Research-focused or discretionary-assisted automated trading
It is not a high-frequency or high-profit EA, but rather a methodical trend and reversal system with controlled logic and transparent behavior.
| Heiken Ashi | MT4 |
| Heiken Ashi | MT5 |
Password:forexsignalpro.net
⚠ Disclaimer: Always test the robot on a demo account before using real money. Trading involves risk.