Engulfing scanner indicator

7 July 2020, 12:05
Jan Flodin
0
781

The main purpose of this blog is to describe and explain the input parameters of my Engulfing scanner indicator (MT4 version / MT5 version).

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: 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 titleIf 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).
    • Delay in seconds for applying chart templateThis parameter can be set to a higher value in case the trade advice lines are now drawn on the chart.
    • Single chart modeWhen set to True the indicator will scan for patterns only on the chart where it has been installed. It will only draw arrows for future patterns and it will not redraw patterns when changing time frame.
  • SIGNAL SETTINGS
    • Amount of signals to show in the panel: 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.
    • Where to write signals (For EA): Listbox with the following selections:
      • Disabled
      • File in data folderThe 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 "ENS_symbol_timeframe.csv". For instance "ENS_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];[time of signal candle];[Bull or Bear]. For example "ENGULFING(1);EURUSD;M30;6.11.2019 12:30;Bear". The values are always separated by a semi colon
      • 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
    • Amount of signals to save in file: When this value has been reached then older signals will be deleted.
    • Draw trading objects: True or False. When True then buy/sell lines as well as TP/SL lines (based on ATR multiplier) will be drawn on the chart which will be opened when clicking on a signal in the panel. Please see screenshot under the product description.
    • Maximum candles signal is valid for: This setting is used to set the lenght of the buy/sell lines.
    • Offset in points for buy/sell stop: This settings will control the distance of the buy/sell lines measured from the last candle in the formation. When a negative (minus) value will be put here then the ADR percentage (Average daily range based on last 20 days) logic will be used. If you for instance set this value to -5 (%) and the ADR is 1000 points (100 pips) then a 50 points offset will be used. When the value is between 0 and 3 it will use ATR multiplied with the value.
    • Use candle midpoint logic (0=disabled): Default value is 4. The calculation is done by summarizing the candle‘s high and low price and divide that by 2. We can take the example that you have set the midpoint value to 4. The midpoint  will then be checked on each of the 4 candles preceeding the engulfing candle. As long as the midpoint is below (for bullish signal or above (for bearish signal) the previous candle's midpoint the signal is valid.
    • Min. candle body size percentage (0 = any body size): A higher percentage (larger body) will give higher quality signals.
    • Min. candle size in points (0 = any size): Only engulfing/tweezer candles (second candle) larger or equal than this size will give an alert. Default is 0.
    • Max. candle size in points (0 = any size): Only engulfing/tweezer candles (second candle) smaller or equal than this size will give an alert. Default is 0.
  • ENGULFING SETTINGS
    • Enable scanningTrue or False.
    • Patterns to scan for: In this list you can select from 3 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
    • Strict mode for pattern 3: If set to 'false' then close/open candle 1 can be lower/higher.
    • Amount of candles to engulf: This should normally be set to 1 in order to scan for classical engulfing formations. Setting it to a higher value will result in much fewer signals, but of higher quality. The rule is still that all candles to the left of the engulfing candle must be of another color, hence bearish candles if the engulfing candle is a bullish candle and vice versa.
  • TWEEZER SETTINGS
    • Enable tweezer scanning: Set to true to include scanning of tweezer top/bottom formations.
  • RSI SETTINGS
    • Use RSI: Enable RSI. Enabled will get fewer signals but higher quality.
    • RSI overbought and oversold levels: The engulfing candle must form above/below these levels at candle close in order to be valid.
    • RSI Period: Default period is 10.
    • RSI shift: Candle (shift) on which to calculate RSI. 1 = engulfing candle, 2 = candle prior to the engulfing candle. You can also set this to a higher value. Default is 2.
    • RSI apply to price: RSI level is calculated from this setting.
  • ATR SETTINGS
    • ATR Period: Period for the Average True Range indicator. Default is 14. The ATR value is measured on the Master candle.
    • TP 1 ATR multiplier: Used for the first take profit level.
    • TP 2 ATR multiplier: Used for the second take profit level.
    • SL ATR multiplier: Used for the stop loss levels.
    • SL at bar high/low
  • SYMBOLS AND TIME FRAMES
    • Symbols to scanHere 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 insteadWith 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. 
    • Time frames: Set to True for each time frame you would like to monitor.
  • CHART OBJECT PROPERTIES
    • Rectangle color for formation
    • Buy/sell stop color
    • TP line color
    • SL line color
    • Line width
    • Enable ray for TP/SL linesTrue or False. When set to True then the lines will have an infinite duration the right.
    • Panel background color
    • Panel text color
  • ALERTS
    • Alerts: Set to 'true' for each alert type you would like to receive. All alert types are supported.
    • Custom sound alert (if True then no pop-up alert): True or False.
    • Custom 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.
    • 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  'GBPUSD H1 - bearish engulfing formation(1) ([your custom text])'


Share it with friends: