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 | haDifference

Indicator Heikin-Ashi Difference calculates and displays as an oscillator the difference between the Open and Close prices of Heikin-Ashi candlesticks, a signal line being added. It can be used in combination with haOpen.

It has two parameters:

  • Signal period - signal line calculation period;
  • Signal Method - signal line calculation method.

Calculation:

HA Difference = (HAClose - HAOpen) / Point
Signal = MA(HA Difference, Period, Method)

where:

HAOpen = (PrevHAOpen + PrevHAClose) / 2.0  HAClose = (Open + High + Low + Close) / 4.0  
  • HAClose - Heikin-Ashi candlestick closing price;
  • HAOpen - Heikin-Ashi candlestick opening price;
  • PrevHAClose - closing price of the previous Heikin-Ashi candlestick;
  • PrevHAOpen - opening price of the previous Heikin-Ashi candlestick;
  • MA - moving average with Signal period and Signal Method, based on the value of HA Difference.

MetaTrader Experts, Indicators, Scripts and Libraries

Fig 1. Indicator Heikin-Ashi Difference

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. Indicator Heikin-Ashi Difference in combination with Heikin-Ashi Open

21038

Best MetaTrader Indicators + Profitable Expert Advisors