Metatrader 4 Expert Advisors What They Are and How to Use Them

Metatrader 4: Expert Advisors, What They Are and How to Use Them?

What are Expert Advisors?

When it comes to trading on the MetaTrader 4 (MT4) trading platform, an EA is a computer program that watches and trades the financial markets using mathematical algorithms. They search for possibilities based on the parameters you choose, and then either alert you or establish a post on your behalf automatically. An EA can also add closing conditions like as stops, trailing stops, and limitations to your position once it has been established.

If you want to watch a few significant markets, you might utilise an EA to do so, for example. It would notify you if it discovers a possible profit-making opportunity for you. Alternatively, you might turn it to go on the markets totally, opening many positions each day with little or no human intervention required.

EAs are largely employed in forex trading, according to the majority of traders. MT4 trading platforms, on the other hand, may be used to trade any market that is available.

How do Expert Advisors work?

metatrader expert advisor

EAs make trading decisions based on a set of yes/no criteria, allowing you to define parameters for identifying opportunities and opening and closing positions. You have the option of either creating your own EA or importing one that has already been created.

EAs are able to execute sophisticated trading strategies by combining a huge number of yes/no criteria into a complex mathematical model that makes judgements – and acts on them – very instantly.

Expert Advisor example.

A basic EA may monitor one or two markets, alerting you to prospective trades when certain criteria are met, and then shut down the computer.

Consider the following scenario: you wanted an EA to identify any potential mean reversion chances on the GBP/USD currency pair using the 20-day simple moving average (SMA) indicator. You may either import one that has already been developed, or you could create one yourself using a programming language known as MQL4 (Multi-Queue Language).

You’d configure your EA to continually watch the GBP/USD pair and alert you whenever the pair breaks out of its 20-day simple moving average. You may even programme your EA to take action on the opportunity rather than simply alerting you to it, for example, by establishing a position size of 2 percent of your entire available balance for the position. It is entirely up to you as to how complicated your EA becomes from there.

gbpusd 20 sma

Why are Expert Advisors popular?


A well-built EA can monitor hundreds of markets, which means you won’t have to keep an eye on price fluctuations around the clock in order to identify fresh trading chances. Having an EA in place allows you to choose how much time you want to spend on the markets – you could use it for trading alerts but open and close positions yourself, or you could allow it to open positions on your behalf while you simply keep an eye on your running profit or loss – the possibilities are endless.

Emotionless trading.

Emotions may have a negative impact on your bottom line. It may tempt you to hold on to a losing trade for longer than you should because you don’t want to accept the loss, or it may tempt you to go into a risky trade too soon after a huge victory while still on a high after a big win. Because an algorithm only sees the markets in black and white, automating your trading can help you make better decisions by removing emotion from your decision-making.

expert advisor advantages


If you have access to the MetaTrader 4 platform, your EA may trade any market, taking into account anything from price movements to economic news to technical indicators. EAs are a fantastic tool to assist you in your trading because of their capacity to create extremely complicated algorithms that track a wide range of markets.


Building a plan is only the beginning, since putting your confidence in it to look after your assets is a significant step to take. That is why the majority of traders will backtest their EA before releasing it on live markets. Backtesting your technique involves comparing its outcomes to genuine historical data. This enables you to spot possible issues prior to their having a detrimental effect on your performance.

It is crucial to remember, however, that backtesting is not fully error-free. Slippage will have no influence on your trades when backtesting, but will when you begin utilizing your EA on live markets.


Despite the fact that they are all unquestionably significant advantages, the four factors listed above are applicable to any automatic trading system – not only EAs. While developing a trading algorithm from the ground up might be time-consuming, importing an EA is as simple as selecting a programme and customising it to your specific requirements. Probably the most important factor contributing to their widespread use as an automated trading instrument is their ease of accessibility.

Nevertheless, while a well-coded, completely backtested, and carefully monitored EA may be quite advantageous to your trade, there are several significant risks to avoid.

What is the best way to get started with Expert Advisors?

You have the option of creating your own EA or downloading one that has already been created. Whatever method you select to begin utilising an EA, it will need to be backtested to confirm that it performs as expected before being allowed to trade with real money.

Build an Expert Advisor.

expert advisor builder

The MetaQuotes Language, sometimes known as MQL, is used to create EAs for the MetaTrader 4 trading platform. Getting up to speed with the ins and outs of MQL takes a substantial amount of time and effort, just like learning any other programming language. On the MQL website, you may discover guidelines to help you.

Additionally, you may create simple EAs using MT4’s built-in wizard, or you can use an external strategy-building tool. These allow you to view the code that is being created under the surface, allowing you to put together tactics without having to master the programming language in question.

Use a pre-built Expert Advisor.

expert advisors list

If you have identified a pre-built EA that you would want to use on MetaTrader 4, you will need to copy it into the ‘experts’ folder on your computer, which is where MetaTrader 4 is installed. When using a computer, this is often found on the ‘c:’ drive.

As soon as you’ve finished, start MetaTrader 4 and expand the ‘Expert Advisors’ area on the left hand side of the screen. Your EA should be able to assist you there. To get started, just drag it into a chart, and you’ll be prompted to evaluate its parameters before sending it into production.

Backtest your Expert Advisor.

MT4’s strategy tester, which can be accessed by selecting ‘view’ from the top navigation bar, allows you to backtest an EA you have created. You may use the tester to choose the EA you wish to use, along with the market and duration on which you want to test it out. It is critical to backtest an EA in order to guarantee that it is still operational today.

In addition, EAs may be tested on a sample account within MT4. Simply install the EA in the same manner as you would on a live account and configure it to operate on the markets of your choice. A demo account with Interactive Brokers MT4 will allow you to trade on over 80 markets with £10,000 in virtual funds, as well as try out some of the free indicators and add-ons that are available on our real trading platform.

backtest sample


Risk Warning: 74-89% of retail investor accounts lose money when trading CFDs . You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money