Triple Moving Average EA

27 January 2018, 17:49
Jan Flodin

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:

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.

  • 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.
  • 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.
*** Please not that having averaging enabled does not comply with NFA FIFO regulation ***
    • 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.
    • ADR period (days) - Default is 60.
    • 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 averagins 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) -  '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.
  • 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

  • Adding FIFO support.
  • Panel with averaging info (if averaging enabled).
  • Possibility to enable Averaging lock order (hedge order). This settings will activate a Lock feature in the EA: if the maximal number of grid levels is opened and the price moves another distance points against the basket, the EA will open the locking (hedge) order that makes the whole position neutral and removes all take-profits, hence the loss amount of the time when the lock order was opened will stay the same since the lot sise of the locking order will be the same as the sum of the lots for the already opened orders. After that, the EA does nothing and th trader will have to manually deal with the trades.

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.

Share it with friends: