Smooth MA Scanner MT4
- Indicadores
-
Allan Aparece Ninal
Desenvolvo indicadores e Expert Advisors para o MetaTrader 5.
Como trabalho:
- Cada indicador é verificado quanto a repintura: os sinais são decididos apenas em barras fechadas, e um teste tick a tick confirma que não mudam depois. - Versão: 1.0
- Ativações: 10
Smooth MA Scanner MT4 is a paid indicator for MetaTrader 4. It draws up to three smooth moving averages (Hull (HMA), TMA, McGinley Dynamic, ALMA, T3, ZLEMA, VIDYA, SMA, EMA and LWMA), each on its own timeframe, coloured by slope with three strength shades and a flat zone, with a band, cross arrows, dashboard rows and a slope scanner of other symbols and timeframes. Run the free demo in the Strategy Tester on your own symbol before you decide.
It draws, marks 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.
Pro also measures how fast it moves, in ATRs (the average bar range): a line that barely moves is grey (flat), and the green and red come in three shades from weak to strong.
The line describes the trend that has already happened. It does not say what price will do next.
What you see on the chart
- Line 1 (Hull 55 by default) in up, down and flat colours, with three shades for weak, steady and strong slopes.
- A band behind line 1: between the line and its own value two bars earlier, in the slope tone. On a dark chart the band switches to quieter tones by itself. In MetaTrader 4 the band is drawn as vertical bars, one per chart bar.
- Line 2 (McGinley 14 on H4 by default) as a dashed step line, and an optional line 3. A line on a higher timeframe changes only when a bar of that timeframe closes.
- Optional: a fill between lines 1 and 2, and candles coloured by line 1. The candles stay in front of the band and fill. With coloured candles on, the chart's own bars take the background colour, and your colours come back when you remove the indicator.
- Dots where line 1 turns, arrows where line 1 crosses line 2.
- The names of the lines at their right end, and dashboard rows at the bottom right: line 1 and its strength, line 2 and whether it agrees, bars since the last turn, the set in use.
- A scanner panel (top right): line 1's average on each symbol and timeframe, as a mark (+ rising, – falling, · flat) and the closed bars since it turned. Fresh turns are drawn stronger. Click a cell to open that chart. The chart's right margin widens so the panel, names and rows never cover the last bar; it goes back when you remove the indicator.
Worked example
EURUSD H1, default inputs, from the test data of this indicator (broker history, server time). On the bar of 2026-10-08 17:00 (close 1.12074) Hull 55 rose by 0.043 ATR (ATR 0.00146), at least the 0.040 flat zone. 12 bars earlier it had fallen by 0.058 ATR; the 11 bars in between moved less than 0.04 ATR, were drawn grey and did not count as a turn. So line 1 turns up on this bar, in the weak shade, 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 | Up to 3, each on the chart's timeframe or a higher one |
| Colour | Up / down / flat (under 0.04 ATR per bar), three strength shades |
| 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 | Each line turns; line 1 crosses line 2; lines 1 and 2 start or stop agreeing (off by default); a scanner cell turns. 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: Hull 55 with the band, McGinley 14 on H4 as the slower anchor.
- Read the rows: line 1 and its strength, whether line 2 agrees, bars since the last turn.
- Change the average, length or timeframe of each line, or switch on line 3, the fill or the candle colours.
- Set the scanner symbols (Market Watch or your own list) and timeframes. Click a cell to open that chart.
- Switch on the alerts you want.
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, a slower line from a higher timeframe beside it, and the same reading on many symbols at once. 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 move is |line - line one bar before| / ATR(14), the ATR being the simple average of the true range. Under the "Flat" input (0.04) the line is flat. Otherwise it is up or down, weak under 0.10, steady under 0.25, strong from 0.25. A turn is the first non-flat bar going the other way than the last non-flat bar, so a pause in the flat zone is not a turn. In my data a smooth line moved under 0.05 ATR on about one bar in five, on every pair and timeframe tested, which set the 0.04 default.
Higher-timeframe lines, crosses and agreement
A line on a higher timeframe is computed on that timeframe's closes. A chart bar shows the value of the last higher-timeframe bar that closed at or before the chart bar opened, so it never changes afterwards. Its direction is up or down (there is no ATR of that timeframe on the chart). A timeframe below the chart's uses the chart's own bars instead. A cross is line 1 going from below line 2 to above it (or the reverse) between two closed bars. Lines 1 and 2 agree when both go the same way and neither is flat.
Scanner
For each symbol and timeframe the scanner reads the last "Closed bars the scan reads" bars (500 by default) and runs line 1's average and slope rule there. A cell shows the direction and the closed bars since the last turn.
Inputs
| Input | Default | What it does |
|---|---|---|
| Line 1: average, length, timeframe | Hull, 55, current | Current = the chart's timeframe. |
| Show line 2; average, length, timeframe | true; McGinley, 14, H4 | The anchor line. |
| Show line 3; average, length, timeframe | false; EMA, 200, current | An optional third line. |
| McGinley k; ALMA offset, sigma; T3 factor | 0.6; 0.85, 6; 0.7 | Settings of those averages. |
| Flat | 0.04 | ATRs per bar under which a line is flat (0 = off). |
| Line 1 in three strength shades | true | Weak, steady, strong. |
| Band behind line 1 / fill lines 1-2 / colour the candles | true / false / false | Drawing switches. |
| Candles in front of the band and fill | true | Your chart setting comes back when you remove the indicator. |
| Turn dots / cross arrows / marks kept | true / true / 40 | 1-200, the newest are kept. |
| Line names / dashboard rows | true / true | Labels and rows. |
| Show the scanner | true | Switch. |
| Which symbols, my list, suffix, most symbols | Market Watch, 5 names, none, 10 | Market Watch or your list (1-60). A broker suffix is found automatically. |
| Timeframes; closed bars per cell | M15,H1,H4; 500 | Comma separated; 300-5000. |
| Corner, distances, font size, click opens, template, colours | top right, 10, 24, 9, true, none, Soft Desk | Panel layout. |
| 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: line 1 / 2 / 3 turns | true / true / false | Switches. |
| Alert: line 1 crosses line 2; lines 1 and 2 agree or stop | true; false | Switches. |
| Alert: a scanner cell 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 / 4 / 7 | Line 1 / 2 / 3 value |
| 1 / 5 / 8 | Line 1 / 2 / 3 direction: 1 up, -1 down, 0 flat |
| 2 | Line 1 strength: 1 weak, 2 steady, 3 strong |
| 3 / 6 / 9 | Line 1 / 2 / 3 turned on this bar: 1 up, -1 down |
| 10 | Line 1 crossed line 2: 1 up, -1 down |
| 11 | Lines 1 and 2 agree: 1 yes, 0 no |
| 12 | Agreement changed on this bar (the new value) |
How it was checked
- Values: compared with an independent Python version of the rules, on broker history. 40 files (BTCUSD, EURUSD, GBPJPY, XAUUSD; H1, H4; 5 input settings, which cover every average and lines on H4 and D1) held 4,088,890 buffer values and 75,168 events. There were 0 differences.
- Repaint: 41 Strategy Tester runs (1 with every tick, 40 with open prices only). 301,872 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, crosses or agreement 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), the scanner cells against the Python rules (they use the same engine), 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).
- A higher-timeframe line needs that timeframe's history. Until it has loaded, the row says loading; the indicator keeps trying for about 8 minutes, and if the history is still missing after that, reload the chart.
- 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.
Why does line 2 look like steps? It is on H4: it moves only when an H4 bar closes, so it never changes afterwards.
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 Scanner, with the same rules.
Try it first
Run the free demo in the Strategy Tester in visual mode on your own symbol and timeframe. Check the lines, the band and the rows against the candles before you buy. The scanner needs live symbols, so it shows less in the tester.
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 Scanner: the same indicator for MetaTrader 5.
- Smooth MA Signals MT4: the free edition (one line on the chart's timeframe, up / down colour, turn dots, no band, higher timeframe or scanner).
- 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.
