Multi oscillator divergence scanner indicator

13 April 2018, 19:48
Jan Flodin
4
1 679

The main purpose of this blog is to describe and explain the input parameters of my Multi oscillator divergence scanner.

Please also check out my other divergence products for MT4 (all of them also have a MT5 version):
Divergence indicatorDouble divergence scannerDivergence dashboardDivergence Expert Advisor (free)

This is an out-of-the-box product which will normally not be modified based on request from a single customer. Please therefore first read this blog to the end and/or test the indicator in the strategy tester in order to understand what it can and cannot do.

Input parameters

  • GENERAL SETTINGS
    • Panel width: Default is 200. If you for instance 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). The purpose of this parameter is to make it easier for quick desicion if to take the trade or not. Or if to wait for real reversal confirmation. Typically you would then use your own template which for instance could contain a support/resistance indicator and my free divergence indicator for drawing the lines and arrows:  https://www.mql5.com/en/market/product/68510. You will be able to download the instructions how to create a chart template in the end of this blog.
  • SIGNAL SETTINGS
    • Amount of signals to show in the panelThe panel can be moved around on the chart by dragging it with the top list. It can also be minimized. If closing it with the x button the indicator will be unloaded from the chart as well. You can set the last (XX) signals in the indicator settings. Default is 15 but you can change it to for instance 20. The panel height will then increase and in some cases it might not fit on your chart. To disable to panel you must set the value to 0.   
      The text on each row contains information about time (server time) when the signal was generated, divergence type (R = regular, H = hidden), symbol, time frame and if bear or bull. For instance "3.5 18:00-R-USDJPY-H4-BULL". The times are written like M.D hh:MM. When clicking on a row a new chart will be opened with the selected symbol and time frame. The opened chart will be opened with the chart template which you have defined in the indicator settings.
    • Write signals to file: Set to True to save signals to a .CSV file. The file is located in the \MQL4\Files folder and the name of the file is "MODS_symbol_timeframe.csv". For instance "MODS_EURUSD_M5.csv". This file could be used by an Expert Advisor for automatical trading. The format in the file is: [alert type];[symbol name];[time frame (text)];[date of signal candle];[Bull or Bear]. For example "R;EURUSD;M30;6.11.2019 12:30:00;Bear". Always separated by a semi colon. "R" in this case means regular divergence. The other used value is "H" (hidden divergence)". Due to the multi symbol functionality it is not possible to use indicators buffers.
    • Amount of signals to save in file: When this value has been reached then older signals will be deleted.
  • DIVERGENCE SETTINGS
    • Use old logic (before version 2.7): True or False. Set to true to detect divergences the way it was before version 2.7. The new logic will detect more divergences. The new logic will allow divergences even if there are additional indicator extremums (top/bottoms) between the 2 already existing extremum points.
    • Oscillator/indicator to use
    • 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
    • Divergence candle shift: Set to 2 (default value ) or higher for a stronger confirmation of the possible reversal/trend continuation (confirmed divergence). By having it set to 1 you will catch the possible movement earlier (unconfirmed/pending divergence). This means that the indicator scan intra candle (each tick) and signal as soon as the slope on the indicator has changed direction. This can happen many times during a candle's lifetime. On the other hand, the signal is less reliable. You can also set it to 0 for catching "early" divergences. This means that the alert will come directly upon candle open instead of waiting for the slope in the indicator to change direction (candle shift 1 or 2), which means that the price must show at least some sign of reversal. Please be aware though that this will lead to more false signals.
    • Bars to check (divergence depth): Bars back in time to check for divergence.
    • Use divergence price strict mode: Please see explanation on the first screenshot under the product description.
    • Min/max close percent away from high/low (0=disabled): Please see explanation on the second screenshot under the product description.
  • MACD, OsMA AND AWESOME SETTINGS
    • Fast MA: Default is 12 (use 5 for Awesome).
    • Slow MA: Default is 26 (use 34 for Awesome).
    • Signal MA (not used with Awesome): Default is 9.
  • STOCHASTICS SETTINGS
    • K: Default is 5.
    • D: Default is 3.
    • Slowing: Default is 3.
    • Stochastics Price type
    • Enable stochastics OB/OS filter (both regular and hidden)
    • Overbought level
    • Oversold level
  • CCI, RSI, RVI, ATR, MFI, MOMENTUM SETTINGS
    • Period: Default period is 10.
  • ADX SETTINGS
  • COMPOSITE INDEX SETTINGS
    • RSI slow period
    • RSI fast period
    • Momentum period
    • Average period 1
    • Average period 2
    • Average period 3
    • Price type
  • CANDLE FILTER SETTINGS
    • Enable pin bar filter: True or False.
    • Minimum candle size in points: Makes it possible to filter out the smallest pin bars. If you, for instance, trade M1 and M5, you could set it to 20 points. Please be aware though that this setting is valid for all time frames. For this reason this setting will not be very useful if you are trading on all time frames.
    • Minimum candle body size % (0 = any body size): The scanner will filter out dojis by default. Default is 0.
    • Minimum percent for tail: Default is 50. If you would like a larger tail, you can set it to for instance 60. It will give fewer signals but higher quality.
    • Only strict pin bars: True or False. A strict pin bar means that the pin bar must have another color than the previous bar and that the pin bar's high must be higher then the previous bar's high and finally that the pin bar's body must be within the range of the previous bar.
    • Enable engulfing filter: True or False.
    • Min. engulfing candle body size % (0 = any body size): A higher percentage (larger body) will give higher quality signals.
    • Min. engulfing candle size in points (0 = any size): Only Engulfing candles (second candle) larger or equal than this size will give an alert.
    • Max. engulfing candle size in points (0 = any size): Only Engulfing candles (second candle) smaller or equal than this size will give an alert.
  • TREND FILTER SETTINGS
    • Trend filter to use: List box with 2 selections. RSI or Bollinger bands
    • RSI filter method: Select whether to use the filter on the first, second or both extremum candles
    • Enable RSI for regular divergences: True or False.
    • Enable RSI for hidden divergences: True or False.
    • RSI regular overbought level: The divergence candle must form above/below these levels in order to be valid.
    • RSI regular oversold level
    • RSI hidden overbought level
    • RSI hidden oversold level
    • Bollinger shift
    • Bollinger deviation
    • Enable ADX for regular divergences
    • Enable ADX for hidden divergences
    • ADX level (main line)
    • Trend and ADX period: Default period is 10.
    • Trend and ADX price type: RSI/Bollinger/ADX levels are calculated from this setting.
    • Trend and ADX time frame: If set to 'current' then the scanned time frame will be used. Otherwise the selected time frame will be used for calculating the RSI indicator values.
    • Enable trend filter also on all lower time frames: if set to True and 'current' has been selected and the signal time frame is M30, then the trend filter level must also be valid on M1, M5 and M15.
  • MOVING AVERAGE (MA) FILTER SETTINGS (more useful for hidden divergences)
    • Enable MA filter for regular divergencesTrue or False
    • Enable MA filter for hidden divergencesTrue or False
    • Slow MA period
    • Fast MA period (0 = disabled)
    • Bar shift: MA will be calculated on this bar.
    • Slow MA price type
    • Fast MA price type
    • Slow MA method
    • Fast MA method
    • MA time frame: If set to 'current' then the scanned time frame will be used. Here you can set a specific time frame which will be used for signals from all scanned time frames.
  • SYMBOLS AND TIME FRAMES
    • Symbols to scan:  Here you will put all symbols you would like to monitor. Every symbol must be entered in the exact way as it is visible in the Market Watch window and separated with a comma, without spaces. By design in Metatrader 4 the amount of character in a text (string) parameter is limited to 255. You can put more characters in the Symbols parameter but when reading the value, Metatrader cuts at 255. 255 characters will allow for 36 symbols and 35 commas (,) if the symbol length is 6 characters. If you need more symbols you can always drag the indicator with the remaining symbols to another chart. To come around this limitation you can set the value in the 'Use symbols from Market Watch window instead' parameter below to  true. By doing this the indicator will use the symbols visible in your Market Watch window instead.
    • Use symbols from Market Watch window instead: With this option set to true all visible symbols in your Market Watch window will be scanned instead of the symbols above. Due to performace reasons It is not recommended to use more than 40 symbols.
    • Time frames: Set to true for each time frame you would like to monitor.
  • Alerts: Set to true for each alert type you would like to receive. All alert types are supported.


Share it with friends: