Stochastics crossover scanner indicator

16 September 2020, 10:11
Jan Flodin
0
367

The main purpose of this blog is to describe and explain the input parameters of my Stochastics crossover 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
    • ** Scanning interval in secondsDefault is 1. Can be set to a higher value in order to prevent possible performance issues on slower computers.
    • Candle shift to check for cross: Default is 1. Setting it to 0 will give signals even if the candle has not closed yet (intracandle). To be regarded as a pending crossover. Please note that having it set to 0 will come with a performance cost. This is due to the scanning base on each tick instead of candle close.
    • * Scanning interval in secondsDefault is 1. Can be set to a higher value in order to prevent possible performance issues on slower computers.
    • 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 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. Typically you would then use your own template which for instance could contain a support/resistance indicator.
    • Delay in seconds for applying chart template: This parameter can be set to a higher value in case the Stochastics indicator in the MT5 version and the arrows will now be drawn on the chart which opens up when you click on a signal in the panel.
  • 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. When clicking on a row a new chart will be opened with the symbol and time frame in question. The chart template which you have defined in the indicator settings will be applied to the opened 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 \MQL5\Files folder and the name of the file is "STO_symbol_timeframe.csv". For instance "STO_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 " STOCROSS;EURUSD;M30;6.11.2019 12:30;Bear". 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: The name of the global variable is divided into 5 parts. The first part (STS) 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.
  • STOCHASTICS SETTINGS
    • * Strategy: List box with the following selections:
      • Scanning disabled
      • Main/Signal line cross: Enables scanning for signal line (D) crossing main line (K).
      • Main and Signal line leaving OS/OB
      • Signal line leaving OS/OB
    • ** Scan signal line (D) crossing main line (K)
    • ** Scan main line (K) level cross
    • ** Scan signal line (D) level cross
    • K period: Period for the main line.
    • D period: Period for the signal line.
    • Slowing period
    • MA method: Default is 'Simple' (SMA).
    • Price field
    • Enable overbought/oversold filter (for D/K cross): 'true' or 'false'.
    • * Stochastics buy level (signal from this level and below): Default is 20.
    • * Stochastics sell level (signal from this level and above): Default is 80.
    • ** Stochastics buy signal level
    • ** Stochastics sell signal level
  • BOLLINGER BANDS SETTINGS
    • ** Enable scanningTrue or False.
    • Strategy: List box with the following selections:
      • * Scanning disabled.
      • high1 low1/close1: For a bearish signal the high price must have been above the upper bands and then closed below (on the same candle) and vice versa for a bullish signal.
      • close1/close2: For a bearish signal close on the last candle must be below the upper bands and close on the previous candle above the upper bands. Vice versa for a bullish signal.
      • close above/below: For a bearish signal it is enough that the the last candle closed above the uppper bands and vice versa for a bullish signal.
    • Period
    • Shift
    • Deviations
    • Price type
  • RSI SETTINGS
    • Enable scanning: True or False. The rules for an alert is that the price must have been above/below the OB/OS level for the amount of candles set in the Amount of bars in OB/OS' parameter below and on the last candle crossed this level.
    • Overbought (OB) level
    • Oversold (OS) level
    • Amount of bars in OB/OS
    • Period
    • Price type
    • TREND MOVING AVERAGE FILTER SETTINGS
      • Enable MA filter
      • Period
      • Candle shift
      • Method
      • Price type
      • Time frame (current = signal time frame)
      • 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.
        • ** Additional symbols to scan
        • 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.
        • Time frames: Set to True for each time frame you would like to monitor.
      • OBJECT SETTINGS
        • Panel background color
        • Panel text color
        • ** List item height
        • ** List item font size
          • 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 - bullish stochastics crossover ([your custom text])'



          Share it with friends: