Signal EA

7 November 2019, 15:15
Jan Flodin
0
2 470

The main purpose of this blog is to describe and explain the input parameters of my Signal Expert Advisor.

Even though the EA is fully operational as it comes out-of-the-box, it is mainly provided as a template (base) to be used for further custom development from the side of the buyer, or by the buyer hired developer. It would typically be the usage of an existing and already successful strategy which means adding of confirmation indicators, entry and exit logic etc. to the EA. Please don't expect any consistent profits over the long term without modifying the EA.

I am happy to provide free products but given my limited time, I will not be able to provide with trading advices, optimal settings, signals, .set (preset) files or strategy testing. My apologies. I will only be able to answer questions regarding the meaning of the input parameters.

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
    • Signal source - List box with 2 selections. FILE or GLOBAL. GLOBAL (variables) must be selected if you want the EA to trade based on signals from the Trend or Divergence dashboard.
    • External file with signals - Here you must put the name of the file generated by the scanner you have rented/purchased and for which you would like to use this EA. This file is always located in the \MQL4\Files\ folder. It has the format [scanner type]_[symbol]_[timeframe].csv or .txt. For the Double divergence scanner the file would be DDS_EURUSD_M5.csv if you have installed the scanner on a EURUSD M5 chart. You will be able to download the file descriptions at the end of this blog.
    • ** Internal file - Here you can set the name of the file which stores the status about each signal. If you will use the EA on another chart for another scanner then it is important that this file will have a different name. The file contains 3 (comma separated) values. Order ticket number, if processed or not and the identifier. For instance "123456,1,EURAUD-M30-2019.11.08 16:30". The second value "processed" will show 0 if the signal was not yet processed or 1 if processed (order closed or order opening prevented due to a filter). The indentifier has the format [symbol]-[time frame text]-[time of signal candle]". At this moment the file is not used by the EA. The main purspose of the file is for statistics. The developer can add more information to this file. For instance it the trade was profitable or not and amount of profit/loss pips. This file is always located in the \MQL4\Files\ folder.
    • * Files located in common folder
    • * Single chart mode
  • GLOBAL VARIABLES SETTINGS - for Trend and Divergence dashboards
    • Global variables prefix - set to TD for the Trend dashboard or DD for the Divergence dashboard.
    • Trigger value - this is the value which you want the point ranking in the dashboard to reach before a trade will be opened.
    • Exit valuethis is the value which you want the point ranking in the dashboard to reach before a trade will be closed. This value must be lower than the Trigger value. The value in the 'Take profit method' or 'Exit method' parameter must be set to Global exit value in order for this to work.
    • Time frame - this time frame will be used when for instance calculating the trend indicators. 
  • TREND FILTER SETTINGS
    • Trend filter to use - List box from where you can select RSI, Bollinger bands or Stochastics. The Stochastics filter will use the additional condition that the signal line must have crossed the main line.
    • RSI/Stochastics overbought level
    • RSI/Stochastics oversold level
    • Stochastics K
    • Stochastics D
    • Stochastics Slowing
    • Bollinger shift
    • Bollinger deviation
    • RSI/Bollinger price type
    • Stochastics price type
    • Trend period
    • Trend time frame - if set to 'current' then the chart time frame will be used. Otherwise the selected time frame will be used for calculating the trend indicator values.
  • MOVING AVERAGE (MA) FILTER SETTINGS
    • Use MA filter - Set to True to enable the filter.
    • Slow MA 
    • Fast MA (0 = disabled)
    • Slow/fast MA method - Default is Simple (SMA).
    • Slow/fast MA price type - Default is Close.
    • MA time frame - It is recommended to set this to one time frame higher than the signal time frame.
  • ADDITIONAL FILTERS
    • Use ADX filter - True or False. The ADX value must be below the level you have set.
    • ADX level (main line)
    • ADX period
  • GENERAL TRADING FILTERS
    • Max. allowed slippage in points (0=not used) - Please note that not all brokers/account types support slippage control.
    • Max. allowed open spread in points (0=not used) - Can be set to avoid taking trades with high spread directly after midnight market opening or at news releases. Useful for those with variable spreads.
    • Min. bars between trades - Default is 3 which means that the EA can trade again (if no open orders) on the third bar following the bar where the last trade was closed. Setting it to 0 means that a new trade will be opened directly after the previous has been closed (if there is still a valid signal). Let us take the example that we have this setting set to 1. If we for instance had an order on a H1 chart which was closed at 13:10 then, in case there is a new signal, a new order will not be opened directly at 13:10 but at 14:00. If you had it set to 2 then at 15:00 and so on. The original idea with this setting was when using the EA for scalping (small and quick profits). In this case it will very often come to the scenario that the EA will open and close (with profit) the order on the same bar. We might then like to avoid opening another order again on the same bar.
    • Amount of bars signal is valid for - The Double divergence indicator for example is writing the time of the divergence candle to the .CSV file. When having the value in the 'Divergence candle shift' set to 0 or 1 the candle shift written to the file will always be 1. I have made it so in the EA that the value in the 'Amount of bars signal is valid for' parameter must alwyas be one higher, hence you would have to set it to 2 or higher. If you on the other hand have set 'Divergence candle shift' to 2 you would have to set the value to 3 or higher. ** setting value -1 will disable this logic.
    • Filter for new trade on same symbol -  List box with the following values:
      • No new trades
      • Allow both directions
      • Allow only same direction
      • Allow only opposite direction
  • TIME FILTERS
    • Enable trade time filter (your broker's server time) - Time filter for opening trades.
    • Trade from/to time - Hour and minutes from/to.
    • Minutes to wait after London and NY opening - Default is 30. This makes it possible to pause the EA during this amount of minutes after the London and NY session openings. This option is more useful when trading indices.
    • MONEY MANAGEMENT (levels are in points)
      • Risk in percentage (>0 = auto lot) - If set to 0 the Manual lots value will be used. If set to > 0 then the EA will use money management if combined with a stop loss. The account free margin (in the deposit currency) is used for the risk calculation. The risk calculation might not work properly with metals and indices. Please for that purpose use a manual lot.
      • Point value for risk percentage - Default is 1. Should normally not be changed. Only in some rare cases where the broker has unconventional tick values for CFD:s a setting of 0.1 could be used.
      • Manual lots - Will be used if Risk above is set to 0.
    • TRADE MANAGEMENT (levels are in points)
      • Exit method - List box with the following values:
        • Fixed stop loss
        • ATR stop loss
        • Global exit value - will exit the trade is this value has been reached from above and the trade is in loss.
      • Fixed stop loss
      • Take profit method - List box with the following values:
        • Fixed take profit
        • Trailing stop – starts to trail when profit>=0
        • Risk/Reward (based on SL)
        • ATR trailing stop
        • Global exit value - will exit the trade is this value has been reached from above and the trade is in profit.
        • ATR take profit
      • Fixed take profit
      • Trailing stop - Will trail the stop loss constantly with the distance you have set as soon as the trade is in profit.
      • Trailing step - If the trailing step is set to 0 then the trailing stop will be adjusted each 3rd second. Else the trailing stop will be adjusted every time the price has moved the amount of points you have set here.
      • Risk/Reward ratio - You need to set the “Take profit method” parameter to Risk/Reward in order for this value to have any effect. You need also to set “Type of stop loss/exit” to Fixed and a fixed stop loss value. A stop loss value of 200 points and a R/R ratio of 1.5 would mean that the take profit level would be automatically set to 300 points when an order is opened.
      • Break-even (0 = disabled)
      • Break-even trigger - The price has to reach this level (calculated from the opening price) in order for the break-even to be set.
    • CLOSE HALF SETTINGS
      • Close half position - Combo box with the values below. Please make sure that your account supports part close of orders before you use this option.
        • Disabled - Default value.
        • Pivot points – Select from H4, D1 or W1.
        • ATR - The current ATR level multiplied with the value you have set below in the 'ATR multiplier' parameter.
        • At first TP level - If you select this option you will also have to adjust the value in the 'First TP level' parameter below.
      • Move to break-even after close half - True or False.
      • First TP level for Close half
      • Pivot/ATR time frame for Close half
    • ATR SETTINGS
      • ATR period
      • ATR multiplier for Close half and TP
      • ATR multiplier for stop loss and trailing
    • EA SETTINGS
      • Magic number - If using the EA on multiple charts (typically for different scanners, or different strategies within the same scanner) then it is important that the Magic number parameter has a different value. If not then trades on the same symbol will interfere with eachother.
      • Order comment - Here you can put the name of the scanner from which this EA is reading signals. For instance "DDS" (Double divergence scanner). The rest of the comment will be set automatically. For instance "R M30", where R stands for regular (classical) divergence and M30 for the time frame. In this case the whole comment would be "DDS R M30".


    Files:
    Share it with friends: