What is a Forex Expert Advisor, and How Does it Work?
Reading time: 11 minutes
Forex trading (FX) doesn't always go smoothly, and sometimes it can be frustrating. Some Forex traders can become greedy or fearful, and for this reason, they are often inclined to make bad decisions that can negatively affect their accounts. One way to avoid this issue would be to use an Expert Advisor, or EA.
An EA is an automated trading system, which automatically opens and closes trades based on preset rules.
Though we do not recommend specific EAs due to their unpredictability, some professional traders have found them to be of benefit.
FX trading is a 24/5 market. Being active round the clock isn't possible for humans, however, a machine can trade for several days without ever needing to take a break. In addition, EAs can be used on a number of FX trading platforms. Some of them allow traders to fully customise their trading systems, and then use them on a personal account, such as MetaTrader 4 and MetaTrader 5.
This article will focus on what EAs are and how they work.
What Is an Expert Advisor?
The first question is - what is an Expert Advisor? As mentioned earlier, an EA is an FX automated trading system. In MetaTrader, they are written in MetaQuotes Language 4, and is developed for use under the MT4 and MT5 trading platforms.
EAs can be programmed to automatically generate trading signals and notify you of trading opportunities. Another type of automated trading system is a Forex robot which, like an EA is a program that can identify market patterns and generate trading signals. However, unlike an EA, a Forex robot can automatically trade on a trader's behalf. An EA, on the other hand, will always require a trader to manually authorise a trade.
Every Expert Advisor is based on preset rules, but EAs can differ in the rules they follow in order to trade. As with any automated software, they reduce the chance of making emotional and irrational trading decisions, which commonly affects novices or inexperienced Forex traders. A Forex Expert Advisor follows a very strict and consecutive plan, free from any human intervention.
Expert Advisors can be obtained easily on the internet, usually for a price, and can be quickly installed into your trading platform without any special technical knowledge.
Before describing the functions of Forex Expert Advisors, we would like to outline the four kinds of Expert Advisors you may encounter:
- The News Expert Advisor - as the name implies, the main purpose is to take advantage of various news events and big price moves that can take place during big news releases.
- The Breakout Expert Advisor - it is specially designed to open a trade when a price breaks through preliminarily determined resistance and support levels.
- The Hedge Expert Advisor - under this category falls any Expert Advisor that plays two respective and opposing positions, diminishing the loss on one whilst facilitating profit on another.
- Expert Advisor Scalper - such Expert Advisors pursue the goal to secure small profits once they are available. The EA will open and close an endless amount of trades for any profit, so your Expert Advisor could trade up to 400-500 times a day depending on market conditions.
Which Functions Does a Forex Expert Advisor Have?
The best Forex Expert Advisors can be programmed to work in multiple ways (e.g. by utilising a selection of technical indicators, such as the moving average indicator, or the MACD - moving average convergence/divergence indicator) or by searching for necessary trends and breakouts.
By applying those diverse indicators, the EA can analyse the market, as well as the behaviour of individual financial instruments, and can generate a signal about trading opportunities.
EAs are similar to Forex robots, which are another type of automated trading software. When using strict definitions, the difference between an EA and a Forex robot is that an EA will generate signals while a robot will perform trades without any manual sign-off required. However, the terms are often used interchangeable, which means that many so-called Expert Advisors are capable of far more than just generating signals.
Some Expert Advisors are designed to take full control of your account. The idea here is that it will look at your current account balance, before deciding how much of your balance can be put at risk. The general rule of thumb is to only to risk 1 - 2% of your account balance.
Furthermore, it may review the trades and decide whether there should be a trailing stop, or a simple take-profit, or a stop-loss. As soon as Forex Expert Advisors have the necessary information, they also take into account the dominating market conditions. Consequently, you will be notified when to open a particular position.
What You Should Be Aware of Before Launching Your EA
If you want to create and use your own EA, here some tips on what to do to make it work properly, outside of using a Forex Expert Advisor generator (this is a tool where you enter the parameters of your preferred trades, and the tool generates the EA program for you).
1. The importance of data
The first tip is to be wary of the reliability of backtesting results. You might think that great backtesting results are proof of your system being ready to prosper - unfortunately it's not that simple.
These results are dependent on the quality of the data applied in the backtest, implying that poor data can lead to unreliable outcomes. The default data in MT4 and MT5 can only reach a modelling quality of up to 90%. While this seems good, this can cause considerable differences in backtesting and the live experience, particularly on smaller time frames.
Fortunately, there are sources of freely accessible historical data and instructions on how to prepare the needed data for MetaTrader.
2. Understanding your execution speed
Reliable data is the first step in adjusting an EA to trade a live account. The next step is comprehending your execution speed. MT4 and MT5 demand trading activity for more than 30 seconds, which is known as a trading session.
If you are using a free Forex Expert Advisor during your session, it will time out automatically if there is no trading activity for more than the period mentioned above. This requires the IP address to be automatically re-authenticated with a password and a login. This can take some time, even up to two seconds with some brokers. Even though it may seem insignificant, in times of high volatility, delays of this size can have a substantial impact on your trades' results.
If you have spent any amount of time writing a complex Expert Advisor in MT4, you probably know how difficult it is to debug the code. Since the MetaQuotes policy shows that they cater more to the needs of brokers than traders, you will find that a debugger isn't included in the list of available tools - it does not matter whether your EA is one of the free Forex Expert Advisors or a paid one.
Luckily, there are some things available to make your life easier. One method is to input print functions directly into your code, although that can become very hard to manage, particularly if you have thousands of lines and don't know where the problem is. You can also download the Microsoft DebugView in order to view a methodically formatted log.
4. Test your MetaTrader connection
Our last tip concerning your EA is the following - make sure to test your MetaTrader connection.
Your platform has to be turned on and connected directly to your broker to run your Expert Advisor. There is nothing more disappointing than thinking you have an EA only to find out that it has been disconnected, and is unable to reconnect. While MT4 and MT5 are designed to automatically reconnect to the server without any problem, this does not always work as expected.
If you possess multiple MetaTrader accounts, occasionally the wrong credentials are used during the process of reconnection. The best resolution is to delete your unapplied accounts from the Navigator window in MT4/MT5. Although this may not necessarily be a considerable problem, it can be quite frustrating if you are getting disconnected and your Expert Advisor is not continuously up and running.
How Do MetaTrader Expert Advisors Work?
Knowing that anyone with a subscription can write an Expert Advisor, you can assume that there are a vast range MT4 and MT5 Expert Advisors. Some of them have been developed especially to trade news events, and to then remain out of the market at all other times, while other EAs are meant to stay active 24/7. Experienced Forex traders who have developed their own manual trading FX systems often hire MQL4 programmers to automate their systems, thereby creating a custom EA.
All Expert Advisors have an identical purpose, and that is to fully automate the Forex trading process and produce a profit while doing it. Expert Advisors utilise technical indicators to gauge conditions on the market, and then make trading decisions. Prior to using an Expert Advisor, it must first be attached to a chart on the MT4 platform.
An MT4 or MT5 Expert Advisor can take into account dozens of factors and elements in order to decide what the next actions will be. This capacity to consider such a wide range of price affecting elements, as well as the discipline of an emotionless automated trading system, can often lead to quite a useful and successful combination.
Is it possible to run more than one EA at once?
The answer is yes. You can use multiple instances of an EA on the MetaTrader client terminal. It is worth noting, however, that not all Expert Advisors work together on one terminal. This is mainly due to the fact that they will try to handle each other's open trades. Programmers tend to get around this by applying special numbers in the market entrance part of the Expert Advisor's source code.
There are some platform restrictions, however. For instance, one Expert Advisor in MetaTrader can only communicate with one trading server at any one time. If multiple Expert Advisors display a lot of activity on the same terminal, and more than one tries to communicate with the trading server, you will eventually receive 'trade context busy' errors in the logs. This occurs if you have too many EAs on a single client terminal.
Do Expert Advisors work in 2019?
EAs tend to cause quite a lot of debate on the internet. First of all, let us define the positives:
- An EA does not sleep - it can work 24/7
- It is deprived of any emotion
- Nothing can distract an Expert Advisor from working
- Expert Advisors are available for the MT4 platform
Besides the standard disadvantages, which include the lack of creativity, there is also the fact that it is really hard to verify the accuracy of any EA, unless you have used it yourself. Let's outline two scenarios that could occur as a result of EA use:
- The first one is that the Expert Advisor for MetaTrader 4 or 5 tweaks countless times, and it still cannot show steady profits on a demo account.
- The second one is that the EA actually performs really well on demo accounts, but for some unknown reason, when traders try to apply them on live accounts with their own funds, suddenly the EA does not work as well, and traders lose their money.
By using automated software like an EA, you can benefit from the following advantages: it can trade while you are sleeping, it is not susceptible to emotions, and you can quickly run backtests. However, it is hard to define whether an EA will help you to achieve profits. In creating your own EA, make sure to take into account the tips we have shared to avoid unpleasant situations.
This material does not contain and should not be construed as containing investment advice, investment recommendations, an offer of or solicitation for any transactions in financial instruments. Please note that such trading analysis is not a reliable indicator for any current or future performance, as circumstances may change over time. Before making any investment decisions, you should seek advice from independent financial advisors to ensure you understand the risks.