Overview
Draws smoothed Heikin Ashi candles on the chart, with a moving average before and after the Heikin Ashi step, to show trends with less noise.
Normal Heikin Ashi candles already filter some noise, but on lower timeframes they still flip colour often. Smoothed Heikin Ashi adds a moving average before and after the Heikin Ashi calculation, giving longer runs of one colour that make the trend easier to follow.
How it works
1. Open, high, low and close are each smoothed with Method 1 over Period 1 bars.
2. Heikin Ashi is calculated on the smoothed prices:
- HA close = (open + high + low + close) / 4
- HA open = (previous HA open + previous HA close) / 2
- HA high = max(high, HA open, HA close), HA low = min(low, HA open, HA close)
3. The four Heikin Ashi values are smoothed again with Method 2 over Period 2 bars, and the high and low are kept outside the body.
4. A candle is bullish (first colour) when its smoothed close is at or above its smoothed open, otherwise bearish.
The moving averages are calculated inside the indicator (SMA, EMA, SMMA, LWMA), and only the newest bar is recalculated on each tick.
Inputs
| Input | Default | What it does |
|---|---|---|
| Method 1 / Period 1 | SMMA / 6 | Smoothing before Heikin Ashi (period 1 = none) |
| Method 2 / Period 2 | LWMA / 2 | Smoothing after Heikin Ashi (period 1 = none) |
| Bullish / bearish colour | SeaGreen / IndianRed | Candle colours |
| Body width (MT4 only) | 3 | Body thickness; match it to your zoom level |
| Alert on colour change | false | One alert when a closed candle changes colour |
How to use it
- In MetaTrader open File > Open Data Folder.
- MT4: copy
FXN_HeikinAshiSmoothed.mq4intoMQL4/Indicators. MT5: copyFXN_HeikinAshiSmoothed.mq5intoMQL5/Indicators. - Right-click Indicators in the Navigator and choose Refresh (or restart the terminal). The file compiles on first use; you can also open it in MetaEditor and press Compile.
- Drag the indicator onto a chart and set the inputs.
For a clean view, set the chart to Line chart with the line colour equal to the background, or keep normal candles and use the smoothed candles as an overlay. Start with the defaults on H1 or H4. Raise Period 1 (8-12) for slower, steadier trends; lower it (3-4) for faster reaction. Many traders use the colour as a trend filter and look for entries on pullbacks in the same direction.
Good to know
- The forming candle changes with price, like any Heikin Ashi. Closed candles do not change, and the alert checks closed candles only.
- Smoothed Heikin Ashi prices are not real prices. Do not use them for stop or entry levels.
- More smoothing means more delay: colour changes come later than on plain candles.
- In MT4 the candles are drawn with histogram pairs, so the body width does not follow the zoom automatically.
- It does not trade. The four price buffers can be read with iCustom (open, high, low, close in MT5; low/high, high/low, open, close in MT4).
Trading carries risk. Test on a demo account first; past results do not predict future results.
At a glance
- What it is
- A free Indicator for MetaTrader 4, written in MQL4.
- What it does
- Draws smoothed Heikin Ashi candles on the chart, with a moving average before and after the Heikin Ashi step, to show trends with less noise.
- Shared by
- Alex
- Licence
- MIT
- Version
- 1.0 (1 Dec 2026)
- Settings
- 12 inputs
- Lab check
- Compiled with MetaEditor build 2425 for MT4 on 1 Dec 2026: 0 errors, 0 warnings.
- Price
- Free to download
Settings read from the code
| Input | Type | Default | Note |
|---|---|---|---|
| InpSep1 | string | === Smoothing before Heikin Ashi === | ---- Smoothing before Heikin Ashi ---- |
| InpMethod1 | ENUM_MA_METHOD | MODE_SMMA | Average type applied to open/high/low/close |
| InpPeriod1 | int | 6 | Average period (1 = no smoothing) |
| InpSep2 | string | === Smoothing after Heikin Ashi === | ---- Smoothing after Heikin Ashi ---- |
| InpMethod2 | ENUM_MA_METHOD | MODE_LWMA | Average type applied to the Heikin Ashi values |
| InpPeriod2 | int | 2 | Average period (1 = no smoothing) |
| InpSep3 | string | === Display === | ---- Display ---- |
| InpBullColor | color | clrMediumSeaGreen | Bullish candle colour |
| InpBearColor | color | clrIndianRed | Bearish candle colour |
| InpBodyWidth | int | 3 | Candle body width (1-5, match it to your chart zoom) |
| InpSep4 | string | === Alerts === | ---- Alerts ---- |
| InpAlertColour | bool | false | Alert once when a closed candle changes colour |
How to use it
- Download the compiled file (or the source and compile it in MetaEditor).
- Put it in MetaTrader: File → Open Data Folder → MQL4 → Indicators, then refresh the Navigator.
- Test it on a demo account before any real money.
- Want changes? Open a copy in your Lab and ask for them in plain words.