Home » Expert Advisor » Moving Average EA 2.0

Moving Average EA

Get the Moving Average EA!

  • 3.8/5
  • 63 ratings
63 ratingsX
Very bad! Bad Hmmm Oke Good!
1.6% 7.9% 31.7% 23.8% 34.9%

About the Moving Average

The Moving Average is the most used indicator and is by default included in Metatrader 4 and 5. A Simple Moving Average is calculated on the Average of the desired closed price of each candle. The Moving Average indicator has 4 different methods of calculation. Simple, Exponential, Smoothed and LinearWeighted. The default period setting is 14.

Trade logic of this forex robot

The Moving Average EA is a forex robot and uses one Moving Average to trade. If a candle crosses the Moving Average from below, the EA will enter a long position. Vice Versa for the short position.

MA Trend Filter

The Moving Average EA has the normal MA Trend Filter function included in all 3 versions and has 3 additional settings. Activate this filter to get better entry signals.

Advanced MA Trend Filter Settings:

  • Price: Trades only if the current price is above/below the MA Trend Filter.
  • Signal MA: Trades only if the Signal Moving Average is above/below the MA Trend Filter.
  • Slope: Trades only if the slope of the MA Trend Filter is in a upwards/downwards direction.

Reverse On Opposite Signal

Since version 2.00, the PRO version has an Reverse On Opposite Signal function. If this function is active, the EA has a long position open and there is a short signal, the EA will close the long position and enter a short position.

Parameters for the Moving Average EA

Timeframe = The timeframe on which the EA should work regardless what timeframe your chart is set to.
Averaging period = Averaging period of the Moving Average (default is 80)
Shift = The indicator shift relative to the chart (default is 0)
Averaging method = The methods of the price series
Applied price = The price values , on which calculations will be performed

Additional MA Trend Filter

This EA has some additional parameters for the Moving Average Trend filter

Use Price
If set to true, the EA will only open long trades if the close price is above the MA Trend Filter. Vice versa for short.

Use Signal MA
If set to true, the EA will only open long trades if Trade MA is above MA Trend Filter. Vice versa for short.

Use Slope
If set to true, the EA will only open long if the MA Trend Filter is sloping upwards. Vice versa for short.

Versions overview

Functions Basic Advanced Pro
Money Management
Trade on new Bar
Inverse Strategy
MA Trend Filter
Additional MA Trend Filter Settings
Trailing Stop
Break Even
Spread Filter
Candle Trail
ATR Trail
Day/Time Filter
Reverse on Opposite Signal
Trade Direction

More about this Expert Advisor

  • You can install this Metatrader Expert Advisor on limitless demo and live accounts.
  • Note that this Expert Advisor does not draw any indicator on the chart.
  • You do not understand all the functions? Take a look at our function glossary.
  • The license of every Expert Advisor you download is time limited, but you can re-download newer versions any time in your purchase history.
  • MT4 Basic v2.00
  • MT4 Advanced v2.00
  • MT4 Pro v2.00
  • Aug 25, 2016

  • Tweak: Re-written the strategy for more stability
  • Update: The MA Filter is now available in all version
  • Added: “Reverse On Opposite Signal” (only pro version)
  • Added: New “Additional MA Trend Filter settings” in all versions
  • Removed: The “high/low” strategy in all versions
  • Removed: “Trade max. once per bar” (for security reasons with this EA)
  • Jan 13, 2016

  • Minor updates and fixes in all MT4 versions
  • Sep 24, 2015

  • Initial release MT4 Pro
  • Apr 11, 2015

  • Some improvements in all MT4 versions
  • Added “Max once per Bar” function to all MT4 Advanced and Pro versions
  • Feb 09, 2015

  • Bug fixed when opening an order
  • open/close and high/low option added
  • Feb 07, 2015

  • Initial release MT4 Basic and MT4 Advanced

50 thoughts on “Moving Average EA 2.0

  1. Hadjar Abderrahmane says:

    Hello Yannick I am a customer from and use your EA and indicator more often have a bed to you you may be moving into this Moving Average Advance EA Partial TakeProfit function programming and update I will pay you the work

    1. Yannick says:

      Unfortunately, I do not intend to add this function.

  2. Roman says:

    Hello i am interested in this EA. But i need it with a speciall function. When the price cross the EMA, the enter to the market will activated if only the price will break the low/high+(X) pips of the candle which cross the EMA.

    is it possible, on this EA?
    Sorry about my english.

    1. Yannick says:

      No, at the moment this is not possible.

  3. Jurgen says:


    In the Pro version, could you: Trade Direction
    1. enter as price crossed the MA, and
    2. enter in only one direction, and
    3. exit on a re-cross (but not enter in the opposite direction using the ReverseOnOppositeSignal function)
    4. I don’t wan o use a take profit or stop loss

    (would a combination of TradeOnNewBar = false”;”Trade Direction=buy only”; “ReverseOnOppositeSignal=true” achieve this?


    1. Yannick says:

      It’s a bit hacky but yes, it works. I have just tested it.

  4. david says:

    hello ,
    i want to if this expert enter trade if the price touch the moving average?, i mean if the price under moving average and touch the moving it will enter sell..

    1. Yannick says:

      You can do this by setting the “TradeOnNewBar” to false.

  5. Adeniyi Babalola says:

    Can anyone help with the best set up for the MA expert trader.
    I have bought the professional pack.


    1. Matthew says:

      Hello Yannick

      I believe you will respond to all my questions, finally how can i delay trade execution for by 5 to 10 pips whenever the candle crosses the M.A?
      I need this input too…


      1. Yannick says:

        Unfortunately, this is not possible in the current version.

  6. Matthew says:

    Hello Yannick,

    You said you plan to improve this E.A, is there an updated version now and what are the new modifications?


    1. Yannick says:

      I have made a big update on Aug 25, 2016. Please click on the changelog tab on the right side to see all changes.

      1. Adeniyi Babalola says:

        Hello Yannick,

        I have purchased the MA E.A pro but it is not executing trades at all.
        I have used the basic version of this E.A and I seem to like it because I was able to set it well but I just need the reverse strategy so I got the pro version to appreciate your work more.

        Please i need your support to set it up well.


        1. Adeniyi Babalola says:


          I have been able get it right, thanks

          1. Yannick says:

            Glad you solved it 🙂

  7. Heiko says:

    Hi Yannick, I get the expiration notice with the request to download the new version, but your web site does not show that there is a new version… I have the MT4 Pro v2.00 installed.

    1. Yannick says:

      The version code is still the same, but when you download the EA again, the license will be extended.

  8. ash says:

    Does it works with Renko Charts?

    1. Yannick says:

      Some of my customer use my EAs on Renko Charts. Please use the forum to find out if it also works with the Renko Chart you use.

  9. Rodrigo Moreira says:


    This indicator have trailing stop?
    Thank you.

    1. Rodrigo Moreira says:

      I’ve already seen that the PRO version has trailing stop. If I buy EA I get the file in MQ4 format?
      Thank you.

      1. Yannick says:

        No, only the compiled .ex4 version.

        1. Rodrigo Moreira says:

          The EA is ECN Broker compatible?

          1. Yannick says:

            Yes, all my EAs are.

    2. Yannick says:

      Yes, in the Advanced and Pro version.

  10. nigel stroude says:

    can this be used to automatically close out trades when price goes below or above moving average by 10 or 15 pips or is that something that would need to modify?

    1. Yannick says:

      This would need a modification.

  11. Max Rene says:

    Hi, Yannick.
    This EA, can open a position when the candle opens below and closes above the MA and opposite

    1. Yannick says:

      Yes, this is exactly how the EA trades.

  12. Danny says:


    I have a question here.

    For the moving average 2.0 EA,
    Is that possible to run a logic like below:
    -Enter long ONLY if the candle close above MA.
    -Ignore if the candle close below the MA.


    1. Yannick says:

      The Pro version has a function called “Trade Direction”. This will allow you to trade only long signals.

  13. ARA says:

    hi dear Yannick
    i downloaded basic version of this nice ea to test it and after that buy pro version. i want to use it for this method :

    1. Look at the MA X and prepare to trade once the price HIT / CROSSED the MA X.
    2. Enter LONG when next candle closed price is ABOVE the MA.
    3. Enter SHORT when next candle close price BELOW the MA.
    4. close current position with profit or loss , and open new position when new signal start. and continue…

    can i use this expert ? if yes how can i set it for this rule?
    please help

    1. Yannick says:

      Yes, this is possible with the pro version and its ReverseOnOppositeSignal function.

  14. Marone Giovanni says:

    Non riesco a scaricarlo, mi appare la scritta:
    An internal error has occurred, please try again or contact support.

    1. Yannick says:

      Please use this contact form and I will send you the downloads per mail.

  15. marco says:

    really impressed! are there instruction docs with the purchase of the ea’s?

    1. Yannick says:

      No, but you will find all information here.

  16. Lizelle Strydom says:

    Hi, Can you please indicate when the crossover of MA’s will be done.
    I also trade on the crossover.

    1. Yannick says:

      There is already an MA Cross EA available.

  17. prasana says:

    Hi what mean slope of the MA Trend Filter? the upwards/downwards direction will automatic show or we need set value? if value, what is the value.

    1. Yannick says:

      If you activate this filter, the EA only open a long if the Moving Average Filter is going upwards.

  18. Marc Tyerman says:

    Hi Yannick, is it possible with the moving average ea to set it up so that, say the market is in a downward trend and I want it to entry a sell position when the moving average is touched?

    1. Yannick says:

      Yes, use the MaTrendFilter and the TradeOnNewBar = false.

  19. ket abid says:

    When i install the free version, nothing appear on the chart, is it normal?

    1. Yannick says:

      Yes, this Expert Advisor does not draw MAs to the chart. You have to attach the indicators manually.

  20. Leticia says:

    Hi Yannick, does the Basic Version exit trades the same way it does in the original version (before you added some features? Also what does ‘Trade Mode’ do? The Glossary doesn’t say anything about that feature. Lastly, I’m wondering if license expiration will somehow affect open trades?

    Thanks for your great work and for your freebies! 😉 I’ll be purchasing something later.

    1. Yannick says:

      The basic version does not have an exit strategy and will therefore only exit on SL or TP. TradeMode: Choose whether you want to enter a trade if the HighLow crosses the MA or if the CloseOpen crosses the MA. No, the EA will only check the license on initialization, means when MT starts, when you attach the EA to the chart or if you change timeframe.

  21. marcin says:

    Is there any way to close position with cross? I mean, open on cross (like is doing now) and close on another cross?

    1. Yannick says:

      Not yet. But I plan to improve this EA.

Leave a Reply

Your email address will not be published. Required fields are marked *

Error: Please enter a valid email address

Error: Invalid email

Error: Please enter your first name

Error: Please enter your last name

Error: Please enter a username

Error: Please enter a password

Error: Please confirm your password

Error: Password and password confirmation do not match