MACD Multi Timeframe Scanner MT4
- Göstergeler
- Sürüm: 1.0
- Etkinleştirmeler: 10
MACD Multi Timeframe Scanner MT4 is a MetaTrader 4 indicator that shows the latest MACD signal-line cross and its age for many symbols and timeframes. Every cell uses closed bars only, so it never changes after its bar has closed. Run the free demo in the Strategy Tester on your own symbol before you decide.
It shows signals, draws divergences and sends alerts. It places no orders.
This is the MetaTrader 4 edition of MACD Multi Timeframe Scanner MT5. It has the same engine, panel, inputs, alerts and buffers. It reads the nine MetaTrader 4 timeframes, M1 to MN1.
In plain words
MACD compares a fast and a slow moving average of the closing price. Its signal line is a smoother average of MACD itself. When MACD crosses above the signal line, momentum is turning up. When it crosses below, momentum is turning down.
Watching one chart for these crosses is easy. Watching 30 symbols on four timeframes is not. The scanner does that work and puts the result in one panel.
Each cell shows the latest cross of one symbol and timeframe. A BUY is MACD crossing up. A SELL is MACD crossing down. The number says how many closed bars ago it happened.
Two small marks add context. A "+" says MACD on the next timeframe is on the same side. A "DIV" says price and MACD disagreed near the cross, which some traders read as a warning.
The panel points you to a chart to look at. It does not say what price will do.
What you see on the chart
A panel with symbols as rows and timeframes as columns. A cell shows one of these:
- BUY 2 or SELL 2: the latest cross was 2 closed bars ago. A BUY is MACD crossing above its signal line. A SELL is MACD crossing below it.
- A brighter, bold cell while the signal is fresh. You set how many bars count as fresh.
- "+" after the text: on the next timeframe to the right, MACD is on the same side of its signal line.
- "DIV" after the text: a divergence of the same direction was confirmed near the signal.
- "loading": the history for this cell has not arrived yet. "-": no signal in the bars loaded. "n/a": not enough bars.
Hover over a cell for a tooltip. It shows MACD, the signal line, the side of zero, the latest signal and the next timeframe's reading. Click a cell to open that chart.
On the chart that carries the scanner, a thin dashed line joins two price pivots wherever a divergence was confirmed. It is green for bullish and red for bearish, with a small tag. Regular divergences point to a turn. Hidden ones point to a trend that continues.
Worked example
The scanner uses the same calculation as the free indicator. Take XAUUSD in the H4 column with default settings, using the bars of the MetaTrader 4 parity test (Strategy Tester history, server time).
The H4 bar that opened on 29 Sep 2026 at 20:00 closed at 4180.11. MACD was -42.56 and the signal line -43.20. The bar before had MACD at -47.18 and the signal line at -43.36. So MACD had crossed above its signal line.
When that bar closed, the cell read BUY 0. After the next H4 bar closed it read BUY 1, and so on. The cell stayed brighter while the age was 3 or less.
Whether the cell showed a "+" depends on the D1 column, so no value is given here.
Key facts
| Type | Indicator on one chart with a panel of symbols x timeframes, for MetaTrader 4. |
| Shows | Per cell: the latest BUY or SELL, its age in closed bars, a mark for the next timeframe and a mark for a divergence. Divergence lines are drawn on the chart that carries the scanner. |
| When a signal is final | When its bar closes. A cell uses closed bars only and never changes after its bar has closed. A divergence appears 3 bars after its pivot, when the pivot is confirmed, and stays. |
| Reload and timeframe change | The panel is built again and every cell reloads its closed bars. The values come out the same, with the same history. No alerts are sent for signals found while loading. |
| Alerts | Pop-up and push are on. Sound and e-mail are off. One message per closed-bar signal and cell. Alerts are silent in the Strategy Tester. |
| Trades | No. It places no orders. |
| Other products needed | None. The calculation is built in. |
| Symbols | Market Watch (up to 30 by default, at most 60) or your own list. A broker suffix is found automatically. |
| Timeframes | Up to 8 columns. Any of the nine MetaTrader 4 timeframes, from M1 to MN1. |
| Tested on | The MACD calculation, the engine, the loader and the live cells in the MetaTrader 4 Strategy Tester (96 files). A test Expert Advisor read the buffers through iCustom. |
Quick start
- Attach it to any one chart. By default the panel lists the symbols in your Market Watch (up to 30) against M15, H1, H4 and D1.
- For your own symbols, set Which symbols to My list and fill My list, comma separated. Type plain names such as EURUSD.
- Change Timeframes the same way, for example H1,H4,D1. The list order sets the columns, left to right.
- A cell reads "loading" until its history arrives. The panel title counts how many cells are loaded.
- Pop-up and push alerts are on. Click a cell to open that symbol and timeframe.
The defaults work without tuning. The zero filter is off until you set it.
Who it is for
For traders who use MACD across many symbols and timeframes. It shows where a cross just happened and whether the next timeframe points the same way.
Not for you if you want one chart with MACD drawn bar by bar, or an automatic trading system. A signal here only says a cross happened.
How it works under the hood
The formula
Each cell runs Gerald Appel's public MACD method on one symbol and timeframe.
- MACD = EMA of the close over 12 bars minus EMA over 26 bars.
- Signal line = EMA of MACD over 9 bars, or an SMA, as in MetaTrader's own MACD.
Each EMA starts from the average of its first closes, as on TradingView.
Signals
- BUY: MACD is above the signal line and was at or below it on the bar before. SELL: the mirror image.
- An optional filter keeps only BUYs below zero and SELLs above zero.
The "+" mark
The "+" compares each cell with the cell to its right in the panel. It shows when MACD on that timeframe is on the signal's side of its signal line. It is not the same bar and not a cross.
Divergences and the "DIV" mark
- Pivot: a low that is lower than the 5 bars on its left and not higher than the 3 bars on its right. Highs work the same way. A pivot is known only 3 bars after it.
- Regular bullish: price makes a lower low while MACD makes a higher low. Hidden bullish: price makes a higher low while MACD makes a lower low. Bearish mirrors this on highs.
- The two pivots are 5 to 60 bars apart. With "Clean lines only", no bar may cross the straight line between the pivots, on price or on MACD.
- "DIV" shows when a divergence of the signal's direction was confirmed at most 10 bars before the signal, or after it.
Closed bars and loading
The forming bar is never used. A cell starts from the newest closed bars of its history (1000 by default), then adds one closed bar at a time. If the history changes under a cell, the cell starts again from the history.
The panel refreshes every second. It starts a limited number of cells per refresh, so a large list fills in over a few seconds. Add or remove a symbol in the Market Watch and the panel is rebuilt within a few seconds.
Reload, restart and timeframe change
The columns come from the Timeframes input, not from the chart. Changing the chart's timeframe rebuilds the panel and reloads every cell from closed bars. The divergence lines on the chart are drawn again from the chart's closed bars. Loading sends no alerts.
Inputs
| Input | Default | What it does |
|---|---|---|
| Which symbols | Market Watch | Market Watch, or your own list. |
| My list, comma separated | EURUSD,GBPUSD,USDJPY,XAUUSD,BTCUSD | Used when Which symbols is My list. |
| Broker suffix to try first | empty | For example .m. Found automatically if empty. |
| Most symbols shown | 30 | From 1 to 60. |
| Timeframes | M15,H1,H4,D1 | Comma separated, up to 8. They become the columns, left to right. |
| Fast EMA, slow EMA, signal line length | 12, 26, 9 | The MACD lengths. |
| Signal line average | EMA | EMA (TradingView) or SMA (MetaTrader's MACD). |
| BUY only below zero, SELL only above zero | off | Keeps only crosses on the far side of zero. |
| Look for divergences | on | The DIV mark and the lines on this chart. |
| Regular / hidden divergences | on / on | Which kinds count. |
| Clean lines only | on | No bar may cross the line between the two pivots. |
| Pivot bars on the left / right | 5 / 3 | The right side is the delay before a pivot is known. |
| Pivots at least / at most this many bars apart | 5 / 60 | Distance between the two pivots. |
| DIV mark distance | 10 | A divergence counts if confirmed at most this many bars before the signal, or after it. |
| Draw the divergences on this chart | on | Over the last 1000 bars of the chart. |
| Mark "+" when the next timeframe agrees | on | Higher-timeframe agreement mark. |
| Alert only when the next timeframe agrees | off | Limits alerts to signals with a "+". |
| Closed bars each cell starts from | 1000 | History per cell, 200 to 5000. |
| Highlight a signal this many bars old or less | 3 | Brighter cell for a fresh signal. |
| Panel corner, distances, font size, colours | top left, 10, 20, 9 | Look and place of the panel and the divergence lines. |
| Clicking a cell opens that symbol and timeframe | on | Opens the chart, or brings it to the front. |
| Template for charts opened by a click | empty | Optional template name. |
| Pop-up alert | on | Alert window in the terminal. |
| Play a sound | off | Plays the sound file below. |
| Sound file | alert.wav | File from the terminal Sounds folder. |
| Push notification | on | Needs your MetaQuotes ID. |
| off | Needs e-mail set up in the terminal options. | |
| Debug log for bug reports | false | See Found a problem? |
Alerts and Expert Advisor use
Alerts. Pop-up, sound, push and e-mail, each switched separately. The message names BUY or SELL, the symbol, the timeframe and the price. Cells that signal together are sent as one message. Nothing is sent while history loads, twice for the same cell and bar, or in the Strategy Tester.
Buffers. Buffer 0 holds the number of fresh BUY cells and buffer 1 the number of fresh SELL cells, on the newest bar. A cell is fresh while its latest signal is no older than the highlight setting.
How often
Per month per symbol with the defaults (EURUSD, GBPUSD, USDJPY, XAUUSD, BTCUSD, closed bars, 2024 to 2026; a code count, not a trading result). Signals (BUY and SELL together): M15 about 152 to 234, H1 about 37 to 55, H4 about 9 to 14, D1 about 1 to 2. Divergences: M15 about 38 to 53, H1 about 10 to 13, H4 about 2 to 4, D1 under 1.
How it was checked
- Calculation: the MACD calculation is the one in the free MACD Multi Timeframe Signal Alerts MT4. In the MetaTrader 4 Strategy Tester it matched an independent Python calculation on every bar (66,512 signals and zero crosses). No signal changed after its bar closed.
- Engine, loader and cells: the scanner's engine, loader and live cells were compared with the same Python calculation in the MetaTrader 4 Strategy Tester. 96 files, 1,037,361 cell states and 20,132 divergences: 0 differences.
- Buffers: a test Expert Advisor read the scanner's buffers through iCustom on every tick (8.6 million ticks in all). It found 0 mismatches with its own cells and 0 errors.
Not tested: alerts on a live chart (the tester is silent for alerts). No profit or accuracy test was made. The scanner reports where crosses and divergences happened and is not a strategy.
Limits
- A BUY is not a bottom call and a SELL is not a top call. MACD crosses back and forth in a sideways market.
- MACD is built from past prices, so it reacts after price has moved.
- A divergence does not mean price will turn. It is shown only to give context.
- It places no orders and gives no stop loss, target or lot size.
- A cell needs history for its symbol and timeframe. It reads "loading" until the terminal has it, and "n/a" when there are too few bars.
- A cell shows the latest signal within the bars it loaded (1000 by default). An older signal reads "-".
- The bars come from your broker. Another broker's history gives slightly different bars and sometimes different signals.
- The panel runs on one chart. Alerts need the terminal running and that chart open.
FAQ
Does it repaint? No. Cells and divergences use closed bars only. A divergence appears 3 bars after its pivot, when the pivot is confirmed, and stays.
What happens if I change the chart timeframe or reload? The panel is built again and every cell reloads its closed bars. You get the same values with the same history, and no alerts for old signals.
Which symbols and timeframes can I scan? Any symbol with history on your server and any timeframe in the Timeframes list, up to 8 columns and 60 rows.
My broker adds a suffix to symbol names. Does it work? Yes. Type EURUSD and the scanner finds names such as EURUSD.m or EURUSDm. You can also put the suffix in Broker suffix to try first.
What does "+" mean? On the next timeframe to the right, MACD is above its signal line (for BUY) or below it (for SELL). It describes agreement, not a promise.
Does it work on gold and crypto? Yes, on any symbol with history.
Can an Expert Advisor read it? Yes. Buffer 0 and buffer 1 hold the number of fresh BUY and SELL cells.
Can I run it on a VPS? Yes, like any indicator. It needs a running terminal with the chart open. It places no orders.
How is it different from the free indicator? The free MACD Multi Timeframe Signal Alerts MT4 draws MACD from one timeframe on one chart. The scanner covers many symbols and timeframes and adds divergences and a higher-timeframe check.
Is there a MetaTrader 5 version? Yes, MACD Multi Timeframe Scanner MT5, with the same engine and inputs.
Try it first
Download the free demo from this page and run it in the Strategy Tester on your own symbol. Check the cells against the bars on the charts.
The free MACD Multi Timeframe Signal Alerts MT4 shows the same MACD and the same signals on one chart. It is a good way to learn how a cross looks before you use the scanner. You do not need it to use the scanner.
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 |
|---|---|---|
| Session Levels MT4 | Add it to the same chart. | It draws session boxes and previous day and week levels as context. It is not a signal. |
| SMC Zones MT4 | Add it to the same chart. | It draws order blocks, fair value gaps and structure breaks as context. It describes past bars. |
| Risk Position Tool MT4 | Pick the trade from the chart, then drag the entry and stop lines. The tool gives the lot for your risk. | It separates where you enter from how much you risk. The tool places no orders. |
Related products
- MACD Multi Timeframe Scanner MT5: the same scanner for MetaTrader 5.
- MACD Multi Timeframe Signal Alerts MT4: the free indicator with the same MACD calculation, on one chart.
- Divergence Scanner MT4: a scanner of the same kind for RSI, MACD and other oscillator divergences.
- UT Bot Scanner Pro MT4: a scanner of the same kind for the UT Bot signal.
- Confluence Dashboard MT4: up to eight checks per symbol and timeframe, voted into one verdict.
- WaveTrend Scanner MT4: a scanner for WaveTrend signals and divergences.
- Vix Fix Scanner MT4: a scanner for Vix Fix spike signals.
- 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. The scanner shows momentum and divergences. It does not predict the market, and past signals are no indication of future results.
