The Heiken Ashi EA for MT4 and MT5 is a professional trend-following MetaTrader expert advisor that trades using the popular Heiken Ashi indicator. It automatically detects trend direction, opens trades on Heiken Ashi candle color changes, and manages positions with advanced trailing stop methods including Heiken Ashi candles, ATR, PSAR, Moving Averages, Fractals, and more.
- Detects the current trend using the powerful RobotFX Heiken Ashi indicator on multiple timeframes
- Opens and closes trades based on Heiken Ashi candle color changes (green for buy, red for sell)
- Applies advanced trailing stop techniques to protect and maximize profits on winning trades
- Offers full risk management with Stop Loss, Take Profit, BreakEven, Trailing Stop, and optional Martingale
The RobotFX Heiken Ashi Expert Advisor is a complete automated trading solution for traders who prefer smooth, noise-reduced trend following. Unlike traditional Japanese candlesticks, Heiken Ashi candles filter out market noise and make trends much easier to identify. This Heiken Ashi EA for MT4 and MT5 combines the visual clarity of Heiken Ashi with intelligent trade management, making it suitable for both beginners and experienced traders.
The EA can trade purely on Heiken Ashi signals or combine them with higher-timeframe trend confirmation for safer entries. It also includes powerful trailing options so you can let profitable trades run while protecting gains.
|
| Heiken Ashi EA trading with the trend on multiple timeframes |
Money management is fully customizable: traders can use a percentage of free margin for lot size calculation or set a fixed lot size for each trade, ensuring proper risk management while trading with the Heiken Ashi EA.
![]() |
| The RobotFX Heiken Ashi Expert Advisor settings |
- ClientEmail - fill this with your email IF you are using a paid version of this EA on a LIVE account
- Enable Lot Size Management (%) - set to true to automatically calculate the lotsize based on the “Lotsize as % of Free Margin”
- Lotsize as % of Free Margin - see above
- LotSize as Fixed Value - trade lotsize if “Enable lotsize management” set to false
- Stop Loss (pips) - stoploss value set in pips
- Take Profit (pips) - takeprofit value set in pips
- Maximum orders allowed - how many orders is the EA allowed to have opened at the same time, on the same chart
- Slippage (pips) - distance allowed for the price to move from the open/close/trail order to the execution
- Close trades at opposite Heiken Ashi signal - whether or not to close opened trade/s when the Heiken Ashi candles change color
- Do not close at Heiken Ashi if negative profit - if above is set to true and this to false, the EA will close the trade/s regardless of the profit. Set to true to close only if the profit is positive
- Close trades at opposite Heiken Ashi trend+signal - whether or not to close the trade/s if the trend changes and there is a buy or sell signal, depending on the trend
- Close opened winning trades if same signal occurs - if another trade signal occurs and existing trade/s is positive, the EA can close it before starting a new one (if instructed to do so)
- Do not close trades (if same signal) if negative profit - if above is set to true but the profit of the trade/s is negative, the EA can be instructed not to close the trade. Set to true to close an existing trade only if there is profit at the moment of changing the candle color
- Display chart info - whether or not to show information on the chart
- Information color - the chart info color Trades' comment - assign a comment for trades opened by this EA, for easy monitoring
- MagicNumber - assign a unique number to trades opened by this EA so they can be managed by other EAs or allow this EA to manage trades opened by other EAs
- Open Next Trade (bars) - this the number of bars/candles between a previously opened trade and the next signal, and it is used a filter to restrict the EA from opening too many trades in a small interval
- Heiken Ashi signal & trend settings - choose the Heiken Ashi signal settings
- Number of Heiken Ashi bars to consider the swing - choose the number of Heiken Ashi candles to consider the “swing zone” used to confirm the entry signals
- Pips away from the last swing - set to 0 pips to deactivate the swing zone.
Example: when using a “Pips away from last swing” of 30 pips the EA will enter a trade when the Heiken Ashi signal changes color AND the price (at that moment) is at least 30 pips away from the swing zone upper level (when buying) or lower level (when selling). This should be used to reject buy signals that might occur on overbought areas or sell signals that happen in oversold areas.
- FOLLOW TREND A / FOLLOW TREND B - if set to true, the trader can also set the Heiken Ashi trend. Both, one or none of these option can be used.
- Enable Martingale - whether or not to multiply the next trade’s lotsize if the previous one/s closed in loss
- Martingale if sum of last 2 orders negative - whether or not to consider the lotsize of the last 2 closed trades instead of only the last 1
- Martingale multiplier - lotsize multiplier is martingale is enabled
- Martingale consecutive trades - maximum number of times a trade lotsize is multiplied, if martingale is enabled and the loss not yet recovered
- Price Trailing Method - choose how the EA trails the winning trade/s; Heiken Ashi can also be used to trail the price
- Trailing Step (pips) - trailing step used to trail the price
- Trailing Stop Buffer (pips) - trailing buffer used to trail the price
- Minimum Profit if Trailing Stop Points - the trailing stop will be placed this distance away from the opened price
- Trail from Breakeven - whether or not to start trailing only if the price is in profit. Set to false to trail the price as soon as the trade opens, if that is allowed by the trailing option
- Trailing indicators settings - settings for some indicators used to trail the price (if that option is chosen to trail). For the Heiken Ashi trailing option, the same settings with the signal are used
- Print more logs (disable for normal use) - set to true for testing and for when something doesn’t seem to work as described. Careful as it will write too many logs and slow down your computer
How do you determine your manual GMT offset?
Go to https://greenwichmeantime.com/ Find your brokers time by seeing it displayed in your trading platform under Market Watch (the top left hand side of your MetaTrader4 platform). Now do a little math to find out the hourly difference between the GMT and your brokers time. That is the offset. If the market watch time is ahead of the GMT then your setting is a positive number. But don't use a plus sign. Just write as you normally would for a positive number. If your broker's time is behind the GMT put a negative sign in front of the number.
Differences between MT5 EA version compared to MT4 EA
The Heiken Ashi MT5 expert advisor:
- delays opening of trades by a trader defined number of candles/bars to prevent too many orders being places by:
- If no open trades, open first trade after previous - applies when there are no trades on the chart
- If opened trades, open next trade after previous - applies when there are trades on the chart
- has the option to close all trades if their (negative) profits reach the Maximum Loss amount and/or close trades based on the Minimum Profit
- also trails the price by Bollinger Bands line, along with all the other trailing methods from the MT4 version
How to Use Heiken Ashi EA MT4 / MT5
- Install the Heiken Ashi EA and the RobotFX Heiken Ashi indicator on your MetaTrader 4 or MetaTrader 5 platform.
- Attach the EA to your preferred chart (H1 or H4 recommended for best results).
- Configure trend detection (Heiken Ashi on multiple timeframes) and entry signal settings.
- Choose your preferred trailing method and set risk management parameters (Stop Loss, Take Profit, Trailing Stop, etc.).
- Optionally enable Martingale and swing zone confirmation for additional control.
- Enable AutoTrading and let the EA automatically trade with the Heiken Ashi trend.
Frequently Asked Questions
Q: Does the Heiken Ashi EA work on both MT4 and MT5?
Yes, dedicated versions are available for both MetaTrader 4 and MetaTrader 5.
Q: What makes Heiken Ashi better than regular candlesticks?
Heiken Ashi candles filter out market noise and show clearer trends, making it easier to stay on the right side of the market.
Q: Can I use custom trailing methods?
Yes. The EA supports many trailing options including Heiken Ashi candles, ATR, PSAR, Moving Averages, Fractals, and more.
Q: Is this EA suitable for beginners?
Yes. It is beginner-friendly while offering advanced features for experienced traders. Start testing on a demo account.

Please do not spam; comments and reviews are verified prior to publishing.