Double top bottom scanner with RSI filter

29 March 2018, 17:04
Jan Flodin
0
1 426

Links to the indicator: MT4 version / MT5 version

Please first check out this product (MT4 / MT5 before you decide to buy the Double top/bottom scanner.

Input parameters

Parameters marked with an asterisk (*) in the beginning are only available in the MT5 version and parameters marked with two asterisks (**) in the beginning are only available in the MT4 version.
  • GENERAL SETTINGS
    • Panel width: 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.
    • Custom panel title: If you put some text here this text will be shown instead of the default panel title.
    • 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. The scanner must never be included on this template chart.
    • Single chart mode: When set to True the indicator will scan only patterns on for the chart where it has been installed. It will only draw future patterns and it will not redraw patterns when changing time frame.
    • Delay in seconds for applying chart template: This parameter can be set to a higher value in case the trade advice lines are now drawn on the chart.
    • Wait for candle close for alert (neckline only): If set to 'false' then the alert will come as soon as the conditions are fulfilled, without waiting for the candle to close. When set to False then this setting is only used for neckline breakouts.
    • Scanning interval in seconds: Default is 1. Can be set to a higher value in order to prevent possible performance issues on slower computers.
  • SIGNAL SETTINGS
    • Amount of signals to show in the panel:  The signals will be shown in descending order, i.e. the latest signal first. The 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 25. 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, symbol, time frame, type of alert and bar time for the first top/bottom and bar time for the neckline candle. For instance "18:00-USDJPY-H1-double top-2018.3.4 17:00-2018.3.5 14:00". 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 your chart template which you have defined in the indicator settings. A line between the extremums as well as the neckline will be drawn on the new chart.
    • Where to write signals (For EA): Listbox with the following selections:
      • Disabled
      • File in data folder: The signals will be saved to a .csv (text) file for further usage. The file is located in the \MQL4\Files folder (MQL5 in Metatrader 5) and the name of the file is "TBS_symbol_timeframe.txt". For instance "TBS_EURUSD_M5.txt". This file could be used by an Expert Advisor for automatical trading. The format in the file is: [symbol],[timeframe],[price of first top],[price of neckline],[buy or sell (0=buy, 1=sell)],[time of first extremum],[time of neckline],[time of second extremum] + 3 additonal parameters which will be used only by this EA. The values are always separated by a comma.
      • File in common folder: The file is stored in the common folder instead which is a folder shared by all Metatrader instances installed on the machine.
      • Global variables: The name of the global variable is divided into 5 parts. The first part (CHPS) is the short name of this indicator. The second part is the symbol name, the third part the time frame, the fourth part the trade direction (Bull or Bear) and the last part is the name of the formation/pattern. The value of the global variable is the time of the alert/signal in MQL format.
    • Amount of signals to save in file: When this value has been reached then older signals will be deleted.
  • TOP/BOTTOM (EXTREMUM) SETTINGS
    • Scan for tops and/or bottoms: Drop down menu where you can select if to scan for only tops or bottoms.
    • Scan for double or triple top/bottom: Drop down menu where you can select if to scan for double or triple tops/bottoms.
    • Strict mode for double search (ZigZag): When enabled the ZigZag (indicator) will be used for detecting tops/bottoms. This mode is not supported with triple search.
    • Max bars to search for first extremum: Default is 200. Will search for extremum xx bars back in time. The higher the value the more system resources will be needed.
    • Min. amount of bars between extremums: Default is 30. The higher the value the stronger the setup.
    • Amount of higher/lower candles (0=disabled): Here you will set how many candles must be lower/higher prior to the first extremum candle (first top/bottom)
    • Neckline candle max offset %: You can set how many percentage the neckline cande can deviate from the exact middle point of the 2 top/bottom candles (extremums). If there are for instance 20 candles between the 2 extremums then setting a value to 50 (percent) will mean that the neckline candle (candle number 10) cannot be more than 5 candles to the left or right of the middle which is 10. Using this option will make it a more clear U/V formation for those who desires that for their trading strategy.
    • Offset from first extremum (<=10 = ATR, >10 = points): If set to a value lower than 11 then the ATR (period 14) will be used and multiplied with the value given here.
    • Use offset only when above/below first extremum: 'true' or 'false'. If set to 'true' then the second extremum's candle high/low price must exceed the first extremum.
    • Candle shift for last extremum (must be >0): Default is 1. You can set it to a higher value in order to wait for a confirmation of the possible reversal. Intracandle alerts (on the current candle) are not supported.
    • Alert only at neckline breakouttrue' or 'false'. If set to 'true' then you will be alerted at a possible neckline breakout (confirmed top/bottom). For this to work you will have to set the value in the 'Where to write signals' input parameter to 'File in data folder'.
    • Max. bars to wait for neckline breakout: Default is 20. Only used if the parameter above has been set to 'true'. After this value has been reached the signal will be invalidated.
  • ZIGZAG SETTINGS (only used with strict mode)
    • Depth
    • Deviation (points)
    • Min. bars between neckline and second peak (backstep)
  • DIVERGENCE SETTINGS
    • Divergence indicator/oscillator: List with the type of divergences you can select from.
    • Include hidden divergence: 'true' or 'false'.
    • Bars to check (divergence depth): Recommended max. value is 40.
    • * Min. bars to check (0=disabled): Minimum amount of bars between 2 extremum candles.
    • MACD/OSMA fast/slow/signal MA: 3 values separated by a comma (,).
    • Stochastic K/D/Slowing:  3 values separated by a comma (,).
    • * CCI, RSI, RVI, ATR, MFI and Momentum period
    • Divergence time frame: Default is 'current' but could be changed to for instance 4 hours to get alerts only if the divergence occurs on the H4 time frame.
  • RSI FILTER SETTINGS
    • RSI filter method: Drop down menu where you can select if to apply the RSI filter on first, second or both peaks. When used then peak candle(s) must close over/under the RSI levels below. If used in Triple mode then First will check RSI on the 2 first extremums and Both will check all three extremums.
    • RSI overbought/oversold levels: Default is 70/30.
    • RSI period: Default is 10.
    • RSI apply to price: RSI level is calculated from this setting.
  • MOVING AVERAGE (MA) TREND FILTER SETTINGS
    • Enable MA: 'true' or 'false'. When enabled the close price of the second top/bottom must be below/above the MA in order for a signal to be valid.
    • MA period
    • MA shift
    • MA method
    • MA price type
    • MA time frame (current=scanned time frame): Will use this time frame regardless of which time frame is currently scanned.
    • * ADX FILTER SETTINGS
      • Enable ADX: 'true' or 'false'.
      • Maximum value: The ADX main line value at the second extremum candle must not be higher than this value.
      • Period: ADX period.
    • CANDLE PATTERNS SETTINGS
      • Enable pin bar filter: If set to 'true' the signal candle (second extremum) must be a pin bar.
      • Enable engulfing filter: If set to 'true' the candle following the signal candle (second extremum) must engulf the signal candle.
      • Enable tweezer filter: If set to 'true' the candle following the signal candle (second extremum) must be a tweezer candle.
      • Enable morning/evening star filter: If set to 'true' the candle following the signal candle (second extremum) must be the last of 3 in the star formation.
      • Minimum candle body size % (0 = any body size): Default is 5. If you would like a larger body, you can set a higher value. The scanner will filter out Dojis by default.
      • Minimum percent for tail: If you would like a larger tail you can set it to for instance 75. 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 then the previous bar and that the Pin bar's High must be higher than the previous bar's High and finally that the pin bar's body must be within the range of the previous bar. With this setting set to 'false' any Pin bar will give a signal.
      • Engulfing pattern to scan for: In this list you can select from 4 different engulfing patterns (only 1 can be selected):
        • RAnge candle B engulfs range candle A.
        • Body candle B engulfs range candle A.
        • Body candle B engulf body candle A.
        • Range candle B engulfs body candle A
      • Min. percent for engulfing body (0 = any body size): A higher percentage (larger body) will give higher quality signals.
      • Min. points for engulfing/tweezer candle (0 = any size): Only candles (second candle) larger or equal than this size will give an alert. Default is 0.
      • Max. points for engulfing/tweezer candle (0 = any size): Only candles (second candle) smaller or equal than this size will give an alert. Default is 0.
    • SYMBOLS AND TIME FRAMES
      • 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. If you put a symbol not visible in the Market Watch window, that symbol will not be scanned. By design in Metatrader 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.
      • Additional symbols to scan
      • 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 if you have a slower computer or VPS.
      • Time frames: Set to 'true' for each time frame you would like to monitor.
    • OBJECT SETTINGS
      • Here you can set the colors for different chart objects. It is also possible to set if the neckline should be shown as ray (continues to the right on the chart).
      • ALERTS
        • Alerts: Set to 'true' for each alert type you would like to receive.
        • Sound file: If you would like to use another sound file than the default it must exist in the Sounds folder. For example: c:\program files (x86)\metatrader 4\sounds.
        • Short alert: A shorter version of the alert. The format is: '[Symbol] - [Formation] - [Time frame]'
        • Custom alert text: Blank by default. The text you put here will be inserted after the time frame in the pop-up (on screen) alert. For example 'EURCAD H1 - double bot. First bottom at 1.46459, 2021.9.30 18:00. Neckline at 1.47595, 2021.10.1 10:00 ([your custom text])'.


      Share it with friends: