Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Moving Averages Based on Heiken-Ashi - MetaTrader 5 Script - MT4/MT5 Resources

author EAcpu | 4 reads | 0 comments |

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

Below is an example of 3 MAs on 5 minute, 10 minute and 15 minute timeframes on a 5 minute chart.

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

This indicator only draws MA lines and not Heiken-Ashi candles, below is an example of a Heiken-Ashi candle.

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

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

The following is an example of Heiken-Ashi smoothing calculation.

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

Heiken-Ashi smoothing is a more reliable trend following tool and is better suited for swing trading and filtered entries.

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

Moving Average based on Heiken-Ashi - indicator for MetaTrader 5

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


Attachment download

📎 heiken_ashi_ma.mq5 (9.63 KB)

Source: MQL5 #60537

Verification code Refresh