Moving average with Heiken ashi

 

Hi, I want to place a moving average on heiken ashi chart in MT5. Couldn't figure how to do that. Help will be appreciated.

 
jawwadsaif:

Hi, I want to place a moving average on heiken ashi chart in MT5. Couldn't figure how to do that. Help will be appreciated.

https://www.mql5.com/en/code/22767

Dōteki Heikin Ashi (Dynamic Average Foot/Bar)
Dōteki Heikin Ashi (Dynamic Average Foot/Bar)
  • www.mql5.com
The standard Heikin Ashi candle representation has an open value that is equivalent to an Exponential Moving Average (EMA) of the Total Price, of which the alpha value of the EMA is fixed at 0.5 (equivalent to an EMA period of 3.0). In this dynamic version, the period can be changed to whatever value one wishes to use, which also allows one to...
 
jawwadsaif: Hi, I want to place a moving average on heiken ashi chart in MT5. Couldn't figure how to do that. Help will be appreciated.

You won't be able to do it because the only option that comes close to that is by selecting "Previous Indicator's Data" in the price to apply, but since Heikin Ashi is actually a candle, with Open, High, Low and Close prices, you wont be able to select which of those to apply the Moving Average. If you select "Previous Indicator's Data", it will just select the first buffer that the HA Indicator uses, which will most probably be the Open price.

To get around this, you would have to alter the HA Indicator and add a Moving Average calculation to it so that you could choose from the other prices.