Home » Expert Advisor » Moving Average EA 2.0

Moving Average EA

Get the Moving Average EA!

3.6/5195 ratings

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. If you enter a Padding in Pips, the EA will only open a buy position if the price is X pips above the Moving Average Line.

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

Starter Bundle

The Moving Average EA is included in the EA Starter Bundle.

More about the Moving Average EA

  • You can install the Moving Average EA on limitless demo and live accounts.
  • Note that this Metatrader Expert Advisor does not draw any indicator on the chart.
  • You do not understand all the functions? Take a look at our function glossary.
  • This EA is not pre-optimized. Please read the article about optimization first.
  • 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.02
  • MT4 Advanced v2.02
  • MT4 Pro v2.03
  • Dez 13, 2017

  • Fixed: Problem with trading sessions of some brokers
  • Aug 28, 2017

  • Fixed: Martingale function in Pro version
  • May 31, 2017

  • Added: Padding in Pips
  • 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

Need a good Forex Broker for your trading tools?

52 thoughts on “Moving Average EA 2.0”

  1. dany says:

    do you have a demo for the pro version?

    1. Yannick says:

      No, only the basic version is available.

  2. Kazeem says:

    Is it compulsory to optimize before use or you can place yourperceived values and try your luck?

    1. Yannick says:

      This EA is not optimized. You have to optimize it first.

  3. Abdurahgmaan says:

    Hi can you please tell me what is the difference between the basic, advanced and pro version of the EA for MT4

    1. Yannick says:

      The advanced and pro version have more features. You will see all the features in the overview table on the same page.

  4. P says:

    If a trade is stopped out due to the trailing spot or break even settings, Is there a way to re-enter the same trade in the same direction ( If the conditions are still the same )?

    1. Yannick says:

      No, this is not possible. Unless you open a trade manually with a custom script that adds the same magic number to the trade as the EA has.

  5. blade813 says:

    Hey Yannick .. something i noticed on the EA .. I have the moving average set to 30 SMA on a 30 min chart .(i’ve also tested on other time frames) .. price is above the MA and currently in a buy .. Reverse on Opposite is set to True .. when i change timeframe on the chart, say look at 4 hour view, the EA closes the trade and opens a SELL, even though price is still above the MA on 30 min. That seems to be an issue as I dont want to change type of position just because i look at different time frames.

    1. Yannick says:

      Have you set the timeframe of the Moving Average and the MA Trend Filter to M30?

  6. gotiko says:

    Hi, in the PRO version does the Martingale have the Multiplier? Can you choose 0.01, 0.02, 0.03, 0.04, 0.05 etc.?
    Thank you

    1. Yannick says:

      Yes, set UseMultiplier to false and the value to 0.01

  7. solmvkr says:

    Hi, I bought the CCI EA pro, great work. I want to buy this as well but I’m looking for a specific function before I do. Is there an option to close the trade and reverse IMMEDIATELY the moving average crosses, not when the candle closes?

    I know Trade On New Bar set to false will open the trade immediately on the signal, but not sure about the close.

    1. Yannick says:

      This was possible in an older version. I have removed it because of security reasons. Imagine the price crosses the line several times per minute. You will lose multiple trades after another.

  8. Steve Rapolai says:

    Hi @Yannick

    I have the Moving Average EA Pro. I want to know if you can add the option to send notification in the EA on your next update? Notification with the trade parameters… i.e Entry Price, SL, TP… If you can do this it would be greatly appreciated

    1. Yannick says:

      I do not plan to make an update on this EA in the new months. But if I make a MT5 version, this will be included.

  9. Rui Carneiro says:

    When we select Trend Filter = true, how does the Reverse on Opposite Signal work?
    Thank you.

    1. Yannick says:

      Yes. It will reverse the trade as soon as there is a new signal based on the entry strategy and the trend filter.

  10. Randolph Euin says:

    Why can’t I download a Moving Average Indicator with Parameter attached MT4 Moving Average does not have Parameterwindow… There is only “About”, “Common”, “Input”, “colors”, “Levels” and “Visualization” but no “Parameter”

    1. Yannick says:

      You will find all the parameter in the input tab.

  11. david kendall says:

    this basic ma only open bullish trades?would compliment well my strategy if goes both ways.

    1. Yannick says:

      No, the basic EA makes bullish and bearing trades.

  12. Rodrigo Moreira says:


    Is it possible to place a negative trailing stop?
    Thank you

    1. Yannick says:

      No, this is not possible.

  13. garchaiqbal says:

    i want to buy this Moving Average EA 2.0 pro version. But i don’t need minimum balance, minimal margin level % and consecutive loss trade in limitation function of optimization. could u plz remove these functions from my EA, then Plz reply me

    1. Yannick says:

      There is no such function build in.

  14. garchaiqbal says:

    i am interested to Buy this EA. Is it life time licensed? Plz ans me.

    1. Yannick says:

      No, at the moment you have a lifetime license. But you will have to download a new version once a year with updates (for free).

  15. iqbal says:

    This is life time license

    1. Yannick says:

      Yes, at the moment the licenses are for a life time.

  16. MatthewT says:

    Hi Yannick,
    I want to backtest the pro edition, but I cant close (or open – re-enter) manualy trades at backtesting with Strategy tester.
    Any suggestion ?? or some scripts ??

    1. Yannick says:

      I believe it is not possible to open and close trades in the strategy tester.
      You can close and open trades on the live chart. But if you open trades manually they will not be managed by the EA. Use this script to open a trade with a MagicNumber so that the EA can manage the trades.

    2. Sergio Manoel Junior says:

      You can put another EA that has these functions to work together.

      1. Yannick says:

        I believe this is not possible with the MT4 strategy tester.

  17. 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.

  18. 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.

  19. 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.

  20. 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.

  21. 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.

  22. 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 🙂

  23. Rodrigo Moreira says:

    The EA is ECN Broker compatible?

    1. Yannick says:

      Yes, all my EAs are.

Leave a Reply to Yannick Cancel reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.