Heiken Ashi EA MT4/5 Settings/Inputs Guide

Heiken Ashi EA MT4/5 Settings/Inputs Guide

8 September 2021, 21:05
Juvenille Emperor Limited
0
7 267


✔️ Heiken Ashi EA MT4©: https://www.mql5.com/en/market/product/45283

✔️ Heiken Ashi EA MT5©: https://www.mql5.com/en/market/product/64877



Video Guide: How to Set Up Heiken Ashi EA MT4/5 with Provided Set Files - Please Enable Subtitles in this Video!


RECOMMENDATIONS FOR OCTOBER 2026

For the Heiken Ashi EA MT4/5, my current recommendation is to TRADE ONLY the following (and NOT ALL provided) set files: AUDUSD, EURAUD, EURCAD, EURUSD, JP225, USDJPY with a low risk of 0.5% or lower per trade.

You can find the Heiken Ashi EA MT4/5 set files, along with detailed instructions and advice, at the bottom of this guide.



Please Enable Subtitles in this Video!






How the Heiken Ashi EA Generates Trading Signals

The Heiken Ashi EA uses Classic or Smoothed Heiken Ashi candles as its main trading signal.

When the Heiken Ashi candles change from bearish to bullish, a Buy signal is generated. When they change from bullish to bearish, a Sell signal is generated.

You can select which Heiken Ashi candle of the new color will trigger the first trade using the New Signal on Heiken Ashi Candle setting.

For example, with the default setting of 2:

  • When the Heiken Ashi candles change to bullish, the EA waits for the first bullish candle to close. If the next Heiken Ashi candle is also bullish, the EA can open a Buy trade at the beginning of this 2nd bullish candle.

  • When the Heiken Ashi candles change to bearish, the EA waits for the first bearish candle to close. If the next Heiken Ashi candle is also bearish, the EA can open a Sell trade at the beginning of this 2nd bearish candle.

You can select any candle from the 2nd to the 10th, allowing you to control how much Heiken Ashi confirmation is required before the first trade is opened.

The optional Moving Average and MACD filters do not generate trading signals themselves. They only confirm or reject a Buy or Sell signal that has already been generated by the Heiken Ashi candles.



Heiken Ashi EA MT4/5 Settings/Inputs Guide


General Trading Settings

Allow Long: Enables or disables Buy trades. Set to True to allow the EA to open Buy trades, or False to disable them.

Allow Short: Enables or disables Sell trades. Set to True to allow the EA to open Sell trades, or False to disable them.

Minimum Distance for Same Direction Trades in Points: Defines the minimum required distance, in points, between trades opened in the same direction.

If you want the EA to trade Heiken Ashi changes in the traditional way, with effectively only the initial trade following each color change, you can enter a very large value here, such as 1000000.

If you allow multiple trades during the same Heiken Ashi trend, this setting prevents additional trades from being opened too close to each other.

Maximum Number of Trades per Heiken Ashi Change: Defines the maximum number of same-direction trades that the EA can open during a single Heiken Ashi color cycle. Both open and previously closed trades from the current cycle are included in this count. The counter resets when the Heiken Ashi candles change color.

Stop Same HA Change Trades After Close: If set to True, the EA will stop opening additional trades in the same direction after the first trade or trades of the current Heiken Ashi cycle have been closed, regardless of whether they were closed by Take Profit, Stop Loss, Break Even, Trailing Stop Loss, Basket protection, or manually.

If set to False, the EA can continue opening additional trades in the same direction while the current Heiken Ashi signal remains active, subject to the other entry conditions.

New Signal on Heiken Ashi Candle: Defines which Heiken Ashi candle of a new color will trigger the first trade.

The default value is 2, meaning that the EA waits for the first Heiken Ashi candle of the new color to close and can enter at the beginning of the second candle if it remains the same color.

You can select any candle from the 2nd to the 10th. A higher value requires the new Heiken Ashi direction to persist for more candles before the first trade is allowed.

First Session Trade on Next Signal: Controls how the EA handles its first trade after being attached to a chart or when a new trading session begins.

If set to False (default), the EA can start working with the currently active Heiken Ashi direction and wait for the next eligible Heiken Ashi candle.

If set to True, the EA waits for the next opposite Heiken Ashi signal before beginning to trade. This can help avoid entering late into an already established Heiken Ashi trend.

Lot Size: Defines the fixed lot size used for trades.

Use Risk %: When set to True, the EA calculates the lot size according to the percentage of the account balance you want to risk instead of using the fixed Lot Size setting.

Risk %: Defines the percentage of the account balance to be risked per trade. The lot size is calculated automatically using the Virtual Stop Loss level.

Magic Number: A unique identifier assigned to trades opened by the EA. This helps distinguish Heiken Ashi EA trades from other trades on the same account.

EA Comment: Defines the text that appears in the Comments section of the MT4/MT5 Terminal/Toolbox for trades opened by the EA.

Offset in Points: Defines the number of points away from the current price that the EA will wait before opening a new trade. A positive offset allows the EA to wait for a more favorable entry price before executing the trade.

Opposite Logic: When enabled, the EA trades in the opposite direction of the Heiken Ashi signal. A normally generated Buy signal becomes a Sell signal, while a normally generated Sell signal becomes a Buy signal.


Heiken Ashi Signal Settings

EA Timeframe: Defines the timeframe on which the EA operates and processes its trading logic.

Heiken Ashi Timeframe: Defines the timeframe of the Heiken Ashi candles used to generate Buy and Sell signals. This does not have to be the same as the EA Timeframe.


Moving Average Filter

Use MA Filter: Enables or disables the additional Moving Average confirmation filter.

It is important to understand that the Moving Average filter does not generate Buy or Sell signals. The trading signal is generated by the Heiken Ashi candles. The MA filter only checks whether that existing Heiken Ashi signal is confirmed by the position of the current price relative to the selected Moving Average.

For a Buy signal:

  • The Heiken Ashi candles must first generate a Buy signal.

  • If the current price is above the MA Filter, the Buy signal is confirmed and the EA is allowed to open the trade.

  • If the current price is below the MA Filter, the Buy signal is rejected and the EA skips that trade.

For a Sell signal:

  • The Heiken Ashi candles must first generate a Sell signal.

  • If the current price is below the MA Filter, the Sell signal is confirmed and the EA is allowed to open the trade.

  • If the current price is above the MA Filter, the Sell signal is rejected and the EA skips that trade.

Therefore, the Heiken Ashi candles determine the direction and timing of the trading signal, while the Moving Average acts only as an additional trend confirmation filter.

MA Filter Timeframe: Defines the timeframe of the Moving Average used for filtering trades. This can be different from the EA Timeframe and the Heiken Ashi Timeframe.

MA Filter Period: Defines the number of candles/bars used to calculate the Moving Average. A higher period produces a smoother and slower Moving Average, while a lower period reacts more quickly to price changes.

MA Filter Method: Defines the Moving Average calculation method, such as Simple, Exponential, Smoothed or Linear Weighted.

MA Filter Shift: Defines the number of bars by which the Moving Average is shifted on the chart.

MA Filter Applied Price: Defines the price data used to calculate the Moving Average, such as Close, Open, High, Low or Median price.


MACD Filter

Use MACD Filter: Enables or disables the additional MACD confirmation filter.

Just like the Moving Average filter, the MACD filter does not generate the original trading signal. The Heiken Ashi candles first generate a Buy or Sell signal, and the MACD filter then confirms or rejects that signal.

For a Buy signal:

  • The Heiken Ashi candles must first generate a Buy signal.

  • If the MACD main line is above the signal line, the Buy signal is confirmed and the EA is allowed to open the trade.

  • If the MACD main line is below the signal line, the Buy signal is rejected and the EA skips that trade.

For a Sell signal:

  • The Heiken Ashi candles must first generate a Sell signal.

  • If the MACD main line is below the signal line, the Sell signal is confirmed and the EA is allowed to open the trade.

  • If the MACD main line is above the signal line, the Sell signal is rejected and the EA skips that trade.

If both the MA Filter and MACD Filter are enabled, the Heiken Ashi signal must satisfy the enabled confirmation conditions before the trade is allowed.

MACD Filter Timeframe: Defines the timeframe on which the MACD filter is calculated. This can be different from the EA Timeframe and Heiken Ashi Timeframe.

MACD Filter Fast EMA: Defines the period of the Fast Exponential Moving Average used in the MACD calculation. A lower value makes the MACD more responsive to recent price changes.

MACD Filter Slow EMA: Defines the period of the Slow Exponential Moving Average used in the MACD calculation. A higher value makes the MACD respond more slowly to price changes and reflect a longer-term movement.

MACD Filter SMA: Defines the period of the signal line used in the MACD calculation.

MACD Filter Applied Price: Defines the price data used for the MACD calculation, such as Close, Open, High or Low.


Trading Time and Day Settings

Start Hour: Defines the hour at which the EA begins opening new trades. The setting uses your broker's server time. For example, enter 1 for trading to begin at 01:00.

Start Minutes: Defines the exact minute within the Start Hour at which the EA begins opening new trades.

End Hour: Defines the hour at which the EA stops opening new trades.

End Minutes: Defines the exact minute within the End Hour at which the EA stops opening new trades.

For example, for a trading session from 01:05 until 15:30, use:

Start Hour: 1
Start Minutes: 5
End Hour: 15
End Minutes: 30

Trade on Monday: Enables or disables the opening of new trades on Mondays.

Trade on Tuesday: Enables or disables the opening of new trades on Tuesdays.

Trade on Wednesday: Enables or disables the opening of new trades on Wednesdays.

Trade on Thursday: Enables or disables the opening of new trades on Thursdays.

Trade on Friday: Enables or disables the opening of new trades on Fridays.

Trade on Saturday: Enables or disables the opening of new trades on Saturdays.

Trade on Sunday: Enables or disables the opening of new trades on Sundays.

Max Spread in Points: Defines the maximum spread, in points, allowed for opening a new trade. If the current spread is higher than this value, the EA will not open the trade.

Max Slippage in Points: Defines the maximum permitted slippage, in points, when executing a trade.


Stop Loss, Take Profit, Break Even and Trailing Stop

Use SL/TP Levels in: Select either Points or Percentage of Average Daily Range to determine how the Stop Loss, Take Profit, Break Even and Trailing Stop Loss levels are calculated.

If Points is selected, the EA uses the fixed point values configured below.

If Percentage of Average Daily Range is selected, the EA calculates these levels dynamically as percentages of the instrument's Average Daily Range (ADR).

Stop Loss in Points: Defines the fixed Stop Loss distance, in points, for each trade.

Take Profit in Points: Defines the fixed Take Profit distance, in points, for each trade.

Virtual Stop Loss in Points: Defines a Stop Loss level that is managed internally by the EA instead of being placed as a visible Stop Loss order with the broker.

Virtual Take Profit in Points: Defines a Take Profit level that is managed internally by the EA instead of being placed as a visible Take Profit order with the broker.

Break Even Profit in Points: Defines the number of points in profit required before the EA moves the Stop Loss to the trade's entry price.

Trailing Start in Points: Defines the profit level, in points, at which the EA begins trailing the Stop Loss.

Trailing Stop in Points: Defines the distance, in points, that the Trailing Stop Loss maintains behind the current price.

Trailing Step in Points: Defines the increment, in points, by which the Trailing Stop Loss is adjusted as price moves in the trade's favor.


Average Daily Range (ADR) Levels

Average Daily Range Candles: Defines the number of daily candles used to calculate the Average Daily Range. This calculation is used for the Stop Loss, Take Profit, Break Even and Trailing Stop Loss settings when Percentage of Average Daily Range is selected.

Stop Loss in % of ADR: Defines the Stop Loss as a percentage of the instrument's Average Daily Range. For example, if this setting is 30 and the ADR is 1000 points, the Stop Loss will be 300 points.

Take Profit in % of ADR: Defines the Take Profit as a percentage of the instrument's Average Daily Range. For example, if this setting is 50 and the ADR is 1000 points, the Take Profit will be 500 points.

Break Even in % of ADR: Defines the profit level at which the EA moves the Stop Loss to Break Even, calculated as a percentage of ADR. For example, a value of 20 with an ADR of 1000 points activates Break Even at 200 points of profit.

Trailing Start in % of ADR: Defines the profit level at which the EA starts trailing the Stop Loss, calculated as a percentage of ADR.

Trailing Stop in % of ADR: Defines the Trailing Stop Loss distance as a percentage of ADR.

Trailing Step in % of ADR: Defines the Trailing Stop adjustment step as a percentage of ADR.


Heiken Ashi Candle Trailing Stop

Use Heiken Ashi Candles Trailing: Enables or disables the Heiken Ashi candle-based Trailing Stop Loss.

When enabled, this method overrides the normal Trailing Stop settings based on points or percentage of ADR.

Instead of maintaining a fixed trailing distance, the EA adjusts the Stop Loss according to previous Heiken Ashi candle bodies, allowing the Stop Loss to follow the Heiken Ashi trend.

Number of Trailing Heiken Ashi Candles: Defines how many previous Heiken Ashi candle bodies are considered for the trailing calculation.

For Buy trades, the Stop Loss is placed according to the bottom of the selected previous Heiken Ashi candle bodies.

For Sell trades, the Stop Loss is placed according to the top of the selected previous Heiken Ashi candle bodies.

As new Heiken Ashi candles are formed, the Stop Loss is adjusted accordingly.


Basket Trade Management

Basket Take Profit %: Defines the Take Profit level for all applicable open positions combined as a percentage of the account balance. When this level is reached, the EA closes the positions. Decimal values can be used. *

Use Basket Stop Loss: Enables or disables the Basket Stop Loss feature.

Basket Stop Loss %: Defines the Basket Stop Loss level as a percentage of the account balance. When the combined floating loss reaches this level, the EA closes the applicable open positions. Decimal values can be used. *

Use Basket Break Even: Enables or disables the Basket Break Even feature.

Basket Break Even %: Defines the combined profit level, as a percentage of account balance, at which the Basket Stop Loss is moved to Break Even. Decimal values can be used. *

Use Basket Trailing Stop Loss: Enables or disables the Basket Trailing Stop Loss feature.

Basket Trailing Start %: Defines the combined profit level, as a percentage of account balance, at which Basket Trailing begins.

Basket Trailing Stop %: Defines the Basket Trailing Stop Loss level as a percentage of account balance. *

Basket Trailing Step %: Defines the percentage step by which the Basket Trailing Stop Loss is adjusted as combined profit increases.


Closing Trades on Opposite Signals

Close by Opposite Signal: Enables or disables closing trades when a complete opposite trading signal is generated.

This means that the Heiken Ashi candles must generate an opposite signal and any additional filters that are currently enabled, such as the Moving Average or MACD filters, must also confirm that opposite signal.

For example, if a Buy trade is open and the Heiken Ashi candles generate a Sell signal:

  • With no additional filters enabled, the opposite Heiken Ashi signal can close the Buy trade.

  • If the MA Filter is enabled, the Sell signal must also satisfy the MA Filter condition.

  • If the MACD Filter is enabled, the Sell signal must also satisfy the MACD Filter condition.

  • If both filters are enabled, the complete opposite signal must satisfy both filters.

Close by Opposite Heiken Ashi Candle: Enables or disables closing trades based solely on an opposite Heiken Ashi candle/color change.

Unlike Close by Opposite Signal, this option does not require the MA or MACD filters to confirm the reversal.

This provides a more direct exit based purely on a change in the Heiken Ashi direction.


Automatic Time-Based Trade Closure

Close All Trades on: Enables or disables the automatic closure of all open trades at a specified time. You can select a particular day of the week or every day.

The EA will not automatically close trades that are opened after the specified closing time. If you do not want new trades to be opened after that time, set the EA's End Hour/Minutes earlier than the configured closing time.

Close All Trades Hour: Defines the hour at which the EA automatically closes the open trades on the selected day. This setting uses the broker's server time.

For example, to close trades at 22:40, enter 22.

Close All Trades Minutes: Defines the minute at which the automatic closure occurs.

For example, to close trades at 22:40, enter 40.


Classic and Smoothed Heiken Ashi Settings

Heiken Ashi Candles Type: Selects whether the EA uses Classic or Smoothed Heiken Ashi candles to generate its trading signals.

With Classic Heiken Ashi, the EA uses standard Heiken Ashi candles and their color changes to determine the trading direction.

With Smoothed Heiken Ashi, the EA uses the Heiken Ashi Smoothed indicator and its blue/red color changes to determine the trading direction.

The selected candle type is the EA's main signal generator. The Moving Average and MACD settings described earlier remain optional confirmation filters.

When using Smoothed Heiken Ashi, make sure that the Heiken Ashi Smoothed indicator is installed correctly in the MT4/MT5 Indicators folder.

MA Method 1: Defines the Moving Average calculation method used for the first stage of the Smoothed Heiken Ashi calculation. **

MA Period 1: Defines the Moving Average period used for the first stage of the Smoothed Heiken Ashi calculation. **

MA Method 2: Defines the Moving Average calculation method used for the second stage of the Smoothed Heiken Ashi calculation. **

MA Period 2: Defines the Moving Average period used for the second stage of the Smoothed Heiken Ashi calculation. **

When comparing the EA's Smoothed Heiken Ashi signals with the indicator displayed on your chart, make sure that the indicator uses the same MA Method 1, MA Period 1, MA Method 2 and MA Period 2 settings as the EA. Different settings can produce different Smoothed Heiken Ashi colors and therefore make the EA's trades appear inconsistent with the indicator shown on the chart.


* Basket-related settings are calculated as equity over balance and take swaps and commissions into account.

** These settings apply only to Smoothed Heiken Ashi candles and do not affect Classic Heiken Ashi candles.




✔️ Heiken Ashi EA MT4©: https://www.mql5.com/en/market/product/45283

✔️ Heiken Ashi EA MT5©: https://www.mql5.com/en/market/product/64877



www.juvenille-emperor.com

www.local-trade-copier.com

www.prop-firm-copier.com

www.prop-challenge-copier.com

www.forex-local-trade-copier.com

www.low-latency-copier.com

www.fast-trade-copier.com

www.best-trade-copier.com

www.mt5-to-mt5-copier.com

www.trade-copier-mt5.com

www.mt4-mt5-trade-copier.com

www.matrix-arrow-indicator.com

www.matrixarrowindicator.com

www.best-forex-indicator-mt4.com

www.best-forex-indicator-mt5.com