Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Moving Average based on Heiken-Ashi

Features:

  • Works on all symbols.
  • The indicator is multi time-frame.
  • Uses colors for up and down trend to better visualize true market trend.

Inputs:

  • Time-frame - change the time-frame for indicator calculations.
  • Period - change MA period.
  • Shift - change MA shift.
  • Method - change MA method.
  • Price - change price type.

Here is an example of 3 MA's for 5 minutes, 10 minutes and 15 minutes time-frames on a 5 minutes chart.

MetaTrader Experts, Indicators, Scripts and Libraries

The indicator only draws the MA line and not the Heiken-Ashi candles, here is an example with Heiken-Ashi candles.

MetaTrader Experts, Indicators, Scripts and Libraries

The indicator only calculates the Heiken-Ashi candles but the code inside CalculateHeikenAshi can be modified to calculate new OHLC data.

Here is an example of Heiken-Ashi Smoothed calculation.

MetaTrader Experts, Indicators, Scripts and Libraries

Heiken-Ashi smoothed is a more reliable trend following tool, better for swing trading and filter entries.

Or we can replace the code with Heiken-Ashi smoothed using ATR.

MetaTrader Experts, Indicators, Scripts and Libraries

The Heiken-Ashi smoothed ATR provides a smooth baseline for setting dynamic stop-loss/take-profit levels.

60537