Metatrader Heiken Ashi expert advisor can trade with the trend and enter/exit trades based on the Heiken Ashi indicator, also trail the price of the winning trades by pips, percentage, ATR, MA, PSAR, Heiken Ashi, chandelier. There are two versions, a MT5 Heiken Ashi EA and MT4 Heiken Ashi EA.
- Detect the trend using the RobotFX Heiken Ashi indicator on multi-timeframe (trend detector can be disabled)
- Follow the Heiken Ashi trading strategy and Open/Close trades based on the Heiken Ashi indicator color change
- Trail the winning trades using various methods, such as the Heiken Ashi candles, moving average indicator, PSAR, ATR, fractals indicators
- Manage opened trades by placing StopLoss, TakeProfit, TrailingStop, BreakEven etc
This RobotFX Heiken Ashi strategy is an all-in-one Heiken Ashi trading solution for traders trading with the trend, so we can safely say that this Heiken Ashi strategy is a trend trading strategy. The EA can detect the trend – if the trader chooses so – and trade accordingly, meaning that the Heiken AShi EA will only buy if there is an uptrend and sell in downtrend. The trend itself is decided by the Heiken Ashi indicator color on the higher or current timeframe. It should be noted however that the trend detector can also be disabled and that the Heiken Ashi EA can be allowed to trade by simply following the Heiken Ashi signals on the current timeframe. However, not following the trend might not be the best Heiken Ashi trading strategy.
To better understand how this trend trader expert advisor works, please take a look at the Heiken Ashi chart below.
In the trading chart above, the Heiken Ashi is in uptrend on H1 and H4, meaning that the Heiken Ashi candle color is green (up) on both of these timeframes.
The type of Heiken Ashi candles can be customized by the trader, who has the possibility to set the moving averages’ method (smoothed, exponential, simple, linear), period or shift, for the trend detection as well as trade entry signals. When one or both trend detectors are used, the uptrend or downtrend is determined by the Heiken Ashi color on their respective timeframes. When any of the Heiken Ashi Trend A or Heiken Ashi Trend B are enabled, they are displayed in the lower-left corner of the chart. Note that if the trader enables both these trend detectors (A and B), the EA will consider entering a trade only if they both coincide and it will ignore the Heiken Ashi trading signals if one trend is up while the other is down.
When the Heiken Ashi candles change their color from down (red) to up (green) the EA will open a long trade; opposite happens for short trades. This Heiken Ashi entry signals can be validated by another safety feature – if the trader wants to use it – that is the swing zone confirmation. This swing zone is also used by both the Fluid and the NonLagMA expert advisors, and it has the purpose to ensure that the EA will not open a buy trade when higher-highs are formed, or sell trades when the price forms a lower-low.
After a trade is opened, the Heiken Ashi EA has the ability to place a classic stop-loss and/or take-profit, and also trail the price using various methods (using the Tailing Stop EA algorithm) including trailing by Heiken Ashi candles, moving average, PSAR trailing, ATR trailing and others. This Heiken Ashi EA can even martingale if the previous trade closed in negative profit. Below are some examples of trades opened and closed with different trailing stop options.
Money management is also possible by setting the EA to use a percentage of the Free Margin as lotsize, or by using a fixed lotsize.
Take your time to understand what each of these settings does. After you’ve done that, try to optimize the default settings based on the pairs you are trading, the time-frame you trade on, your equity and initial LotSize etc.
- 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.
The Heiken Ashi MT5 expert advisor:
- includes the hedging algorithm behind Auto Recovery EA, that allows loss prevention and recovery of losing trades
- 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