Triple Moving Average EA

27 January 2018, 17:49
Jan Flodin
6
479

Here you will always find the most current preset (.set) files and the strategy tester report files. Please see the change log in the end of this blog. For the testing in the strategy tester I am using a 3rd part software for tick data, 'Birt's Tick Data Suite' and I use it with tick data from Dukascopy and with GMT+2 (winter time). My signal can be studied here: https://www.fxblue.com/users/triplema and here: https://www.mql5.com/en/signals/484848. Please note that the signal is using more preset files then the ones which can be downloaded in the end of this blog. All of the signal files have averaging enabled. I intend to start yet another signal where only the preset files below will be used.

Below you will also find a list of know bugs and other shortcomings as well as a list of planned changes.

Due to the limitation of 3600 characters for the product description I have also put a part of the parameter description in this blog.

  • Trade 2 MA crossovers - If set to True then the triple average strategy till not be used. Instead the EA will trade regular crossovers of 2 moving averages. Please not that only the 'MA1/MA2 cross' and 'Fixed stop-loss' Exit methods will work in this scenario
  • Open new trade at crossover (if True above) - If set to True, and also 'Trade 2 MA crossovers' is set to True, then the current trade will be closed at an opposite crossover (if TP has not been hit before that) and a new trade will be opened in the direction of the crossover.
  • Maximum allowed slippage in points - Please note that not all brokers/account types support slippage control.
  • Maximum allowed 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.
  • 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. If Averaging is enabled the risk will not be calculated correctly. Therefore it is important for you to do your own risk calculation depending on the Lot multiplier and Amount of averaging orders settings.
  • 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.
It is important to understand the logic and functionality of the 3 following parameters. If something is not clear then please contact me by sending me a private message (PM).
  • Max allowed balance drawdown % (100=disabled) - This function will prevent opening of new trades on other charts where the EA is running if your accumulated loss is less than xx%. If the 'Close orders' parameter (explained below) has been set to False then already opened orders on all charts will continue to run (including averaging orders. The averaging mechanism will also continue to open new order if necessary).
  • Orders with this Magic number (0=all) - Default value is 67. Please note that in my set files the Magic number is set to 67XXXX. With the default value the EA will only check open order where the Magic number starts with 67. So if you have other EAs running with open orders then they will not be taken into consideration.
  • Close orders - If set to True then all orders, where the magic number starts with the value you have set above, will be closed immediately when the Max allowed % has been reached.
  • Type of stop-loss/exit - Combo box with the following selections:
    • MA1/MA2 cross (default) - The position will be closed automatically when the first MA has crossed the second at candle close.
    • Fixed
    • MA1/MA2 distance < min. distance - Will speed up the closing (stop loss) of the order. Will not wait for the first MA to cross the second. Instead it will close the order when the distance between them is less than the minimum distance. Has been proven to be effective on some pairs.
    • MA1/MA2 distance < than MA2/MA3 distance
    • Which of the above occurs first
    • Close at trend MA - Will use the 'Trend MA period' parameter value for closing the position when the price has reached this MA value. The 'Use trend moving average' parameter does not have to be set to True for this to work.
  • Take profit method - Combo box with the following values:
    • Fixed.
    • Trailing stop – starts to trail when profit>=0
    • Risk/Reward (based on SL).
  • Break-even trigger - The price has to reach this level (calculated from the opening price) in order for the break-even to be set.
  • Trailing stop and Trailing step - Will trail the stop loss constantly with the distance you have set as soon as the trade is in profit. 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 in the Trailing step parameter.
  • Calculate trailing stop using ADR divider (0=disabled): Default is 4.
  • 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” 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.
  • AVERAGING SETTINGS
    • Enable averaging - 'true' or 'false'.
    • Averaging method - Select from TIMEFRAME or DISTANCE
    • Time frame (if set to Time frame above) - There must be a new candle for the selected time frame and min. distance reached in order for an averaging order to be opened.
    • Use ADR (Average Daily Range) - 'true' or 'false'. ADR is calculated based on the sum of each days move (high-low) divided with the amount of days.
    • ADR divider - Default is 4. If ADR for the last 60 days is 100 pips then the distance must be at least 100 / 4 = 25 pips before an averaging order will be opened.
    • Min. distance in points for next order - This value will not be used if ADR is set to True.
    • Lot increase method - Select from MULTIPLIER or INCREMENT.
    • Lot multiplier/increment - if Multiplier is selected above and this value is set to for instance 1.4 then an initial 0.1 lot order will generate a first 0.14 lot averaging order. If Increment is set above and this value is 0.02 then the first averaging order will be opened with 0.12 lots. Second 0.14 and so on.
    • Take profit method - Select from POINTS or MONEY.
    • Profit in Points or Money (0 = break even) - If value is set to for instance 10 then if Points is selectedabove the averaging order basket will be closed when in 10 points profit. If money then when 10 in profit in the account currency.
    • Hide TP (always used with Money and must be True for FIFO) -  'true' or 'false'. If set to True a green line will appear at the TP level. If False then all orders will have a broker TP.
    • Maximum amount of averaging orders - Amount of averaging orders to open.
    • Close all orders at max - All orders will be closed when the last order has been opened and the price has moved yet a distance unit.
  • Min. distance in points between signal MA:s - For the H4 timeframe all values between 10 and 150 points can be used (according to my backtesting).
  • Order comment - Default is "Triple MA". To this comment will be added the time frame. For instance "Triple MA M240".
  • Magic number - If using the EA on the same symbol on multiple charts (typically with different time frames) 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.


Known bugs

  • Nothing reported or known at the moment. 


Planned changes

  • Panel with averaging info (if averaging enabled).
  • News filter.

Set files change log

  • 3.2.2018 - added set file for AUDUSD H4. Using MA 5-10-15 instead of 10-20-30.
  • 13.2.2018 - added set files for USDCAD H4/D1, EURJPY H4 and EURCHF H1 (reverse). Change in AUDJPY H4. Removed GOLD.
  • 6.3.2018 - bug fix in the USDCAD_D1 and EURCHF_H1 files. Removed the USDJPY_H1 and AUDJPY_H4 files.
  • 18.9.2018 - version 1.4 was published. I will work with new preset files for this version. The preset files for version 1.2 will still work.
  • 26.9.2018 - I have now attached the new preset files. From now on I will only provide with preset files for the major currency pairs.
  • 22.10.2018 - version 1.5 was published. The set files for version 1.4 will work with version 1.5. There will be no need to release any 1.5 files.
  • 23.10.2018 - version 1.6 was published. Contains only a bug fix. No need for new set files.
  • 31.10.2018 - new set files for version 1.6 published. USDCAD H4 averaging removed and EURUSD H4 fine tuned. Now also backtested from 2010.01.01 instead of previously 2013.01.01. Please keep in mind that this is a long term strategy. There could be bad weeks or even bad months. You can clearly see it in the report files.
  • 12.11.2018 - version 1.7 was published. Ne need for new set files.


Share it with friends: