Divergence Scanner MT5
- 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.1
- Atualizado: 3 novembro 2026
- Ativações: 5
Divergence Scanner MT5 is a scanner indicator for MetaTrader 5. One panel shows the latest RSI, MACD, Stochastic, CCI and OBV divergence on many symbols and timeframes. It shows how long ago each was confirmed and how many oscillators agree, and it sends an alert when a new one appears.
It runs the same divergence engine as the free Divergence Signal Alerts indicator, for a whole list of charts at once. It adds three more oscillators and a count of how many agree.
It places no orders. Cells use closed bars only, so a cell does not change after its bar has closed.
Quick start
- Attach the indicator to one chart. The panel lists your Market Watch symbols (up to 30) by M15, H1, H4 and D1.
- In the inputs, choose Market Watch or your own list of symbols, the timeframes and the oscillators (all five are on by default).
- Set how many oscillators must agree. A divergence is shown from 1 (default) and an alert is sent from 2 (default).
- Pop-up and push alerts are on by default. Add sound or e-mail if you want them. Click a cell to open that chart.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
What you see on the chart
- A panel with symbols as rows and timeframes as columns.
- In each cell: BULL or BEAR (h = hidden), the closed bars since it was confirmed, and x1, x2, x3 ... for the oscillators that agree, for example "BULL 3 x3".
- A brighter cell when the divergence is recent (you set how many bars count as fresh).
- A tooltip with the oscillators' names and the time. Click a cell to open that symbol and timeframe.
How a divergence is found
- Pivots on price: a swing low has 5 higher lows before it and 3 bars after it that are not lower. Both numbers are adjustable. Swing highs mirror it.
- Regular: price makes a lower low (or higher high) while the oscillator does the opposite. Hidden (optional): price makes a higher low (or lower high) while the oscillator makes a lower low (or higher high).
- The two pivots must be 5 to 60 bars apart. With clean lines on, no bar between them may cross the line on price or on the oscillator.
- Each of the five oscillators is checked at the same two pivots. The cell shows how many diverged.
- The forming bar is never used, so a cell does not change after its bar has closed.
Who it is for
It is for traders who use divergence on several symbols or timeframes. If you watch one chart with RSI and MACD, the free indicator is enough.
Inputs
| Input | Default |
|---|---|
| Which symbols | Market Watch - Market Watch or your own list (broker suffixes are found automatically) |
| Most symbols shown | 30; timeframes - M15,H1,H4,D1 |
| Oscillators | RSI 14, MACD 12/26/9, Stochastic 14/3, CCI 20, OBV - each can be switched off |
| Regular / hidden | on / off; pivot bars left / right - 5 / 3; pivots 5 to 60 bars apart; clean lines - on |
| Show a divergence when at least | 1 oscillator; alert when at least - 2 |
| Closed bars each cell starts from | 1000; fresh cell - 3 bars or less |
| Panel corner, font size, colours; clicking a cell opens the chart (optional template) | - |
| Alerts: pop-up and push notification (on), sound, e-mail | - |
| Debug log for bug reports | false |
Starting settings
The table shows how often a cell gets a new divergence, per symbol per month, on EURUSD, GBPUSD, USDJPY and XAUUSD, October 2023 to October 2026. It uses closed bars and the defaults. It is a code count, not a trading result.
| Timeframe | Any oscillator | 2 or more agree | 3 or more agree |
|---|---|---|---|
| M15 | about 61 to 67 | about 25 to 28 | about 9 to 12 |
| H1 | about 14 to 16 | about 6 to 7 | about 2 to 3 |
| H4 | about 3 to 4 | about 1.4 to 1.8 | about 0.4 to 0.7 |
| D1 | about 0.4 to 0.6 | up to 0.4 | fewer than 0.2 |
Alerts default to 2 or more oscillators. Raise it for fewer signals. Agreement is not a promise of a turn.
How it was checked
- The divergence engine is the one in the free indicator. It matched an independent Python calculation on every bar. It also passed a tick-by-tick repaint test in the Strategy Tester (XAUUSD H1, 91 million ticks, 0 changed signals).
- Stochastic, CCI, OBV and the scanner's loader (starting a cell from history, then one bar at a time) were compared with the same Python calculation.
- The frequency table comes from that calculation on broker history. No trading results are claimed.
Alerts and Expert Advisors
Alerts: pop-up (on), sound, push notification and e-mail, each switched separately. Cells that confirm a divergence in the same second are sent as one message. Nothing is sent while history loads. Nothing is sent twice for the same cell and bar, or in the Strategy Tester.
Buffer 0 holds the number of fresh bullish cells, buffer 1 the number of fresh bearish cells, on the newest bar.
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 |
|---|---|---|
| Divergence Signal Alerts | Use the scanner for the watchlist. Put the indicator on the chart you open. Use the same inputs on both. | Both run the same calculation, so the readings match. |
| Session Levels | Add it to the same chart. | It draws the Asia, London and New York sessions and killzones, the previous day and week levels and a time panel as context. It is not a signal. |
| Risk Position Tool | 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
- Divergence Scanner MT4: the same scanner for MetaTrader 4.
- Divergence Signal Alerts - the free indicator. It draws RSI and MACD divergences on one chart, using the same engine.
- Candlestick Scanner MT5 - another scanner panel with symbols by timeframes, closed bars only and click-to-open, for candlestick patterns.
- MACD Multi Timeframe Scanner MT5 - another scanner panel for many symbols and timeframes, for MACD crosses.
- All my products on MQL5
Questions
- Does it repaint? No. Cells use closed bars only.
- Why does a cell say "BULL 3"? The divergence was confirmed 3 closed bars ago. The pivot itself formed 3 bars before that (the right-side pivot bars).
- Does it work on gold and crypto? Yes, on any symbol with history. OBV uses tick volume.
- Alerts on my phone? Yes, with push set up in the terminal. The terminal must be running.
- How is it different from the free indicator? It uses the same engine. The free indicator draws RSI and MACD divergences on one chart. The scanner covers many symbols and timeframes, with five oscillators and a count of how many agree.
Custom work
Want an EA that trades this indicator, a custom version of it, 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 a technical pattern; it does not predict the market, and past signals may not repeat.
