• Información general
  • Comentarios (5)
  • Discusión (16)
  • Novedades

Double divergence scanner

This multi oscillator, multi timeframe and multi symbol indicator identifies when a divergence occurs between price and one or two oscillators. It identifies both regular/classical (trend reversal) and hidden (trend continuation) divergences. It has a RSI filter option which makes it possible to filter out only the strongest setups.

It can be used in 3 ways:

  1. Set both Main and Second oscillator and leave the default value 'current' as Second timeframe. By doing this you will get alerts only when there is a double divergence on each timeframe which you have selected.
  2. Set both a Main and Second oscillator and set Second timeframe to for instance H4, or set 'One time frame higher' to True. By doing this you will only get alerts when there is a Second divergence also on the H4 time frame or on one time frame higher than the main divergence.
  3. Set only Main oscillator. By doing this you will get alerts when there is a divergence on the selected oscillator.


  • Can detect divergences for the following oscillators: MACD, Stochastics, OsMA, RSI and CCI.
  • Can monitor all symbols visible in your Market Watch window at the same time. Apply the indicator to just one chart and instantly monitor the entire market.
  • Monitors every timeframe, from M1 to MN, and sends you a real-time alert when a divergence has been identified.
  • The indicator includes an interactive panel. Please see separate screenshot for explanation.

It is enough to place the indicator on one chart and you will receive an alert from any symbol and any timeframe of your choice.

I recommend you to put the indicator on a EURUSD M5 chart, preferable a clean chart without any other indicators or Expert Advisors on it.

Please note that due to the multifunctionality neither buy and sell advice nor lines and arrows will be drawn on the chart.


Parameters marked with an asterisk (*) in the beginning are explained more in detail in the following blog: https://www.mql5.com/en/blogs/post/717881

  • Main oscillator: Default is STOCHASTICS.
  • Second oscillator (double divergence): Default is RSI.
  • Divergence candle shift (must be >0): Default is 2. By setting it to 1 you will get alerts for pending (unconfirmed) divergences. You will be able to catch the possible movement earlier. On the other hand, the signal is less reliable.
  • Second divergence max. candle shift: Default is 3.
  • Second divergence time frame: The default value is 'current'.
  • One time frame higher: By setting it to True you will get alerts only when there is a second divergence on one time frame higher than the main divergence.
  • Bars to check (divergence depth): Default is 28.
  • * Amount of signals to show in the panel: Default is 15. But you can set it to more if it will fit on your chart. The signals will be shown in descending order, i.e. the latest signal first.
  • Panel width: Default is 200. For instance, if you are using a non-standard font size in windows, you could set this to a larger value in order for the whole text to be visible.
  • * Template name: The template you put here will be applied to the chart which will be opened when you click on a signal in the panel. The name must include the file extension (.tpl).
  • Scan for bullish divergences: True or False.
  • Scan for bearish divergences: True or False.
  • Scan for hidden divergences: True or False.
  • Scan for regular divergences: True or False
  • MACD settings:
    • Fast EMA: Default is 12.
    • Slow EMA: Default is 26.
    • Signal SMA: Default is 9.
  • Stochastic settings:
    • K: Default is 12.
    • D: Default is 3.
    • Slowing: Default is 3.
  • RSI and CCI period: Default is 10.
  • Enable RSI filter for regular and/or hidden divergences: Select whether to use the filter on the first, second or both extremum candles.
  • RSI overbought and oversold levels for regular and for hidden divergences: The divergence candle must form above/below these levels in order to be valid.
  • RSI Period: Default period is 10.
  • RSI apply to price: RSI level is calculated from this setting.
  • Symbols to scan: Here you will put all symbols you would like to monitor. Every symbol must be put in the exact way as it is visible in the Market Watch window and separated with a comma and without spaces.
  • Time frames: Set to true for each timeframe you would like to monitor.
  • Alerts: Set to true for each alert type you would like to receive.

peterfei 2018.11.19 14:55 

Great indicator, I love it too...

Pip Collector
Pip Collector 2018.09.28 18:05 

Great indicator, I love it.

Jan Flodin is a nice guy who listen to his customer.

saeidnesta 2018.07.23 20:49 

It's a good indicator, it's a little bit out of the question. Usually gives little signals, but fairly accurate. And of course, it should be upgraded, support is also good and explains. I vote for the signals. And must be upgraded.

4xharmonincs 2018.05.14 03:05 

been using for few days now on 5M 15M works awesome.... very nice not having to wait around looking for divergence trades... Great work Jan

Aravind 2018.05.08 04:10 

Thank you Jan Flodin for this indicator. I love trading divergence and to me double divergence is the perfect opportunity to confirm.

Versión 1.6 2018.10.31
- corrected an issue with the custom sound file alert
Versión 1.5 2018.10.12
- added possibility to select if to use the RSI filter on first, last or both extremums
Versión 1.4 2018.09.24
- added separate periods for RSI and CCI
Versión 1.3 2018.07.27
- it is now possible to set the candle shift for the divergence extremum candle
- added option to alert of the second divergence is one time frame higher than the main divergence
Versión 1.2 2018.05.15
- corrected issue with the indicator not drawing hidden divergence bullish lines in the strategy tester
- corrected issue with absence of alerts on D1 timeframe
Versión 1.1 2018.05.11
- added OsMA oscillator (oscillator of moving average)
- added possibility to set the width of the panel