Smooth MA Signals MT4
- Indicatori
-
Allan Aparece Ninal
Sviluppo indicatori ed Expert Advisor per MetaTrader 5.
Come lavoro:
- Ogni indicatore viene controllato contro il repainting: i segnali vengono decisi solo su barre chiuse, e un test su ogni tick conferma che non cambiano in seguito. - Versione: 1.0
Smooth MA Signals MT4 is a free indicator for MetaTrader 4. It draws one smooth moving average of your choice (Hull (HMA), TMA, McGinley Dynamic, ALMA, T3, ZLEMA, VIDYA, SMA, EMA and LWMA; Hull 55 by default), green while it rises and red while it falls, with a dot where it turns. Every value is written when a bar closes and never changes afterwards.
It draws and alerts. It does not trade. It shows which way an average is moving. It is not a signal system and it promises no profit. The section How it was checked shows what was tested and what was not.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
In plain words
A moving average is the average close of the last few bars. The plain ones (SMA, EMA) lag behind price. The smooth ones here are built to lag less or to stay calm in a range: Hull reacts fast and stays smooth, McGinley speeds up and slows down with the market, ALMA and T3 are very smooth, ZLEMA removes part of the lag, VIDYA slows down when price goes nowhere.
The line is coloured by its slope: green while it is higher than one bar before, red while it is lower. Where it changes colour, it has turned.
The line describes the trend that has already happened. It does not say what price will do next.
What you see on the chart
- The line, green while it rises and red while it falls.
- A small dot below the line where it turns up, above it where it turns down (the last 30 are kept).
- The line's name at its right end, for example Hull 55.
- A status pill at the bottom right, for example Hull 55 | rising | turned up 12 bars ago.
Worked example
EURUSD H1, Hull 55, from the test data of this indicator (broker history, server time). The line read 1.118157, 1.118156, 1.118219 on the last three closed bars up to 2026-10-08 17:00 (close 1.12074): it had been falling and is now higher than one bar before, so that bar gets the up dot and the turn alert fires when the next bar opens.
Key facts
| Item | Detail |
|---|---|
| Type | Indicator for MetaTrader 4, in the chart window |
| Averages | Hull (HMA), TMA, McGinley Dynamic, ALMA, T3, ZLEMA, VIDYA, SMA, EMA and LWMA, length 2-500 |
| Lines | 1, on the chart's timeframe |
| Colour | Up / down |
| When a value is final | When its bar has closed. Data on the forming bar stays empty. |
| After a reload or timeframe change | The same closed bars give the same values. Old events send no alerts. |
| Alerts | The line turns up or down. Pop-up, sound, push, e-mail. Closed bars only. |
| Trades | No. It places no orders. |
| Other products needed | None |
| Tested on | BTCUSD, EURUSD, GBPJPY, XAUUSD on H1, H4 charts, plus the repaint and error runs below |
Quick start
- Attach the indicator to any chart. The defaults work without optimising.
- Read the colour and the pill: rising or falling, and how long ago it turned.
- Choose another average or length in the inputs (for example McGinley 14 or ALMA 21).
- Leave the turn alert on, or switch it off.
Who it is for
Traders who follow one smooth average for direction (the Hull 55 of the Hull Suite, McGinley, ALMA, T3) and want it coloured by slope with clean turn points. It is a reading tool, not an automatic buy and sell signal.
How it works under the hood
Averages
- Hull: LWMA(2 x LWMA(n/2) - LWMA(n), square root of n).
- TMA: SMA of an SMA, lengths (n+1)/2 rounded up and down. It is plotted on the bar it uses, so it never repaints (the centred TMA does).
- McGinley: starts from the SMA of the first n bars, then MD = MD + (close - MD) / (k x n x (close / MD)^4), k 0.6 by default.
- ALMA: Gaussian weights, offset 0.85, sigma 6.
- T3: six chained EMAs with volume factor 0.7.
- ZLEMA: EMA of close + (close - close (n-1)/2 bars ago).
- VIDYA: an EMA whose speed is scaled by the 9-bar Chande momentum.
- SMA, EMA, LWMA: the standard ones. EMA starts from the SMA of its first bars.
Slope and turns
On each closed bar the line is up when its value is above the value one bar before, otherwise down (equal counts as down; values within a relative 1e-10 count as equal). A turn is the first bar whose direction differs from the bar before. The first direction after the warm-up is not a turn.
Inputs
| Input | Default | What it does |
|---|---|---|
| Average | Hull | One of the 10 averages. |
| Length | 55 | 2-500 bars. |
| McGinley k; ALMA offset, sigma; T3 factor | 0.6; 0.85, 6; 0.7 | Settings of those averages. |
| Turn dots / dots kept | true / 30 | 1-200, the newest are kept. |
| Line name / status pill | true / true | Label and pill. |
| Debug log for bug reports | false | See Found a problem? |
| Pop-up alert | true | Alert window in the terminal. |
| Play a sound | false | Plays the sound file below. |
| Sound file | alert.wav | File from the terminal Sounds folder. |
| Push notification | true | Needs your MetaQuotes ID. |
| false | Needs e-mail set up in the terminal options. | |
| Alert: the line turns | true | Switch. |
Alerts and Expert Advisor use
Alerts. One message per closed bar, sent when the next bar opens, for example: Hull 55 turned up. Nothing is sent while the history loads, twice for the same bar, or in the Strategy Tester.
Buffers for Expert Advisors (iCustom). The data buffers come first. The forming bar stays empty: read from shift 1.
| Buffer | Content |
|---|---|
| 0 | Line value |
| 1 | Direction: 1 up, -1 down |
| 2 | Turned on this bar: 1 up, -1 down |
How it was checked
- Values: compared with an independent Python version of the rules, on broker history. 104 files (BTCUSD, EURUSD, GBPJPY, XAUUSD; H1, H4; 13 input settings, which cover every average) held 2,453,334 buffer values and 75,886 events. There were 0 differences.
- Repaint: 105 Strategy Tester runs (1 with every tick, 104 with open prices only). 777,168 closed bars were compared with the values read when they closed. 0 changed after the close, and 0 values appeared on the forming bar.
- Error check: 147 finished MT4 Strategy Tester runs of the test harness, 0 error lines in the tester log. Same indicator source as the MT5 edition, compiled with the MT4 compiler.
Trading-rule test: I have not tested the turns as a trading rule, and I make no claim about what price does after them.
Not tested: alerts on a live chart (the tester is silent for alerts), and the MQL5 Market validator itself.
Limits
- Every average lags. A turn comes after the move has started, and in a range the line turns often.
- A line needs as many bars as its length before it has a value (T3 needs about six times its length).
- It gives no stop loss, target or lot size.
- Alerts need the terminal to be running with the chart open.
FAQ
Does it repaint? No value changes after its bar has closed. The line is also drawn on the forming bar, as any moving average is, but the colours of closed bars, the turns and the alerts use closed bars only.
Which average should I pick? Hull 55 is the common default. McGinley and VIDYA turn less in a range; ALMA and T3 are the smoothest; ZLEMA and Hull are the fastest. Try them in the tester on your symbol.
Can an Expert Advisor read it? Yes. Read the buffers listed under Alerts and Expert Advisor use, from shift 1.
Is there a MetaTrader 5 version? Yes, Smooth MA Signals, with the same rules.
Try it first
It is free. Attach it to a chart on a demo account, or run it in the Strategy Tester in visual mode on history.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| MA Ribbon Clouds Signals MT4 | Add it to the same chart. | A ribbon of plain EMAs with clouds, for whether short and long averages agree. |
| Session Levels MT4 | Add it to the same chart. | Session boxes and the previous day and week levels, for where a trend meets a level. |
| HTF Candle Sweep MT4 | Add it to the same chart. | The candles of a higher timeframe on this chart. |
Related products
- Smooth MA Signals: the same indicator for MetaTrader 5.
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk of loss. Past behaviour of an indicator does not predict future results.
