Forex eas 4

Forex Expert Advisor.

Forex Experts Advisors (EA’s) are designed to help you automate your forex trading. Expert Advisors monitor Forex markets around the world to identify the best trading opportunities for potential profits and provide signals for you to act on.

Written by Justin Grossbard.

Written by Justin Grossbard Co Founder.

With over 20 years of investing experience and 10 years of trading, Justin co-founded Compare Forex Brokers in 2014. He has worked within the foreign exchange trading industry for several years and for several of the largest banks globally. Justin achieved Honours in Commerce and has a Master's degree from Monash University. He also owns Innovate Online offering digital marketing services with over 20 employees.

Each month we update average spreads data published by the brokers the retail brokers lose %

We double-check broker fee details each month which is made possible through partner paid advertising. Learn more this here.

Our forex comparisons and broker reviews are reader supported and we may receive payment when you click on a link to a partner site.

Table of Contents.

What is an Expert Advisor (EA)? How Does an Expert Advisor Work? How to run an Expert Advisor (EA) on MetaTrader 4 (MT4) Types of Forex Expert Advisors Why you Want to Use an EA? Things to Consider Before Buying an EA Final Thoughts.

The Best Forex Expert Advisor Guide.

Learn everything you need to know about Forex expert advisors (EA’s) and so you can allow a trading robot to scan the market so you can free up time to do other things. Since the Forex market is active 24 hours per day, 5 days per week, trading opportunities are infinite.

Because of the sheer weight of opportunities, even the most experienced traders will never be able to track, analyse and make trading decisions on market developments 24/5. This is where the Forex expert advisor steps in, a piece of software that ensures ultra-fast processing of market data and greater precision than even the most experienced traders.

In this complete beginner’s guide to automated trading, we will cover these essential topics:

How an expert advisor actually operates, How you can run an EA on particular trading software (MetaTrader 4), What advantages EAs offers, What Forex traders should take into account prior to using an expert advisor.

What Is An Expert Advisor (EA)?

A Forex expert advisor (Forex EA) is software that analyses market conditions and utilises algorithms and technical indicators to notify Forex traders of potential trading opportunities.

Forex EAs are algorithms designed to help find the best entry points for a trade, as they can indicate the lowest price level to buy and the highest price level to sell. These indicators utilise a set of yes/no rules and sophisticated mathematical models to help traders implement trading strategies.

Expert advisors are usually built-in MetaQuotes Language (MQL) programming language to be compatible to use with a certain trading platform, nearly always MetaTrader 4 (MT4) or MetaTrader 5 (MT5).

MetaQuote language (MQL4) can be used to develop 4 different types of automated programs:

Trading robot (Expert Advisor) Custom Indicators Scripts Library.

Developers constantly backtest the best strategies, or in other words, they assess their viability by discovering how well those strategies would perform when historical data is used.

An Expert Advisor Is Not Necessarily A Trading Robot.

There is a tendency for expert advisors to be used as synonyms of trading robots. However, there is a key difference between the two.

An expert advisor analyses all the possible variables and notifies traders about the best trades in a given currency pair or other CFDs such as stocks, indices, commodities, and cryptocurrencies. It does only that, alerts traders about a potential trade, but the final decision whether to take advantage of that trade is up to traders themselves.

On the other hand, a trading robot will not only advise about a potential trade but take action. A Forex robot will place trades continuously, based on traders’ preferred trading style and parameters (trading amount, Stop Loss level, Take Profit level), regardless of the outcome.

Many expert advisors can also perform functions that trading robots do, such as automatically execute and close trades by the EA algorithm.

How Does An Expert Advisor Work?

Basically, an expert advisor can be programmed to generate trading signals automatically and alert traders of an opportunity to place a trade. A Forex robot, or another type of automated trading system, uses algorithms to identify market patterns, generate trading signals, and trade automatically on a person’s behalf.

Both expert advisors and trading robots function based on a set of parameters in order to detect trading opportunities and then execute the trades.

An expert advisor combines numerous yes/no rules into a sophisticated mathematical model, which allows it to execute complex trading strategies. A Forex robot, at the same time, will use computational power to make trading decisions and open positions almost immediately.

There are expert advisors designed to take full control of one’s trading account. Such an EA will analyse a trader’s current account balance and then decide what portion of it to put at risk. The golden rule is to risk no more than 1% to 2% of the total account balance on each trade.

VPS Hosting For Forex Expert Advisors.

In order to allow an expert advisor or a trading robot to operate even when the PC is turned off, Forex traders may use a virtual private server (VPS). What the latter does is host an instance of the MetaTrader 4 trading platform on an external server, which operates all the time, allowing the EA to function without any interruption.

How To Run An Expert Advisor (EA) On MetaTrader 4 (MT4)

Traders can either build an expert advisor for the MetaTrader 4 trading platform by using the MQL4 programming language, MetaTrader 5 trading platform by using MQL5 or build less sophisticated EAs with the help of the platform’s inbuilt wizard.

For example, traders can build an EA to detect mean reversion opportunities on a given currency pair (say EUR/GBP) with the use of the 20-day Exponential Moving Average indicator. The expert advisor will constantly monitor that Forex pair and will alert traders in case EUR/GBP breaks out of the 20-day EMA.

Traders can also use a pre-built expert advisor on the MetaTrader 4 software.

Installing And Running A Forex Expert Advisor On The MetaTrader 4 Platform.

Once a trader has found an EA to use on the MetaTrader 4 platform, he/she will have to copy it in the “Experts” folder where the trading platform is installed on his/her PC. That folder should be located on the “C:” drive.

The fastest way to locate the installation folder on your PC is to go directly to your MT4 platform –> File –> Open Data Folder (see figure below).

Each expert advisor (EAs) is comprised of two files:

.ex4 – used to launch the expert advisor in the MetaTrader 4 terminal, .mq4 – used to adjust the code of the expert advisor.

More complex EAs may contain extra files to operate correctly.

All files needed for the working process of the expert advisor can be found in the Data Folder of the MetaTrader 4 terminal. Once the platform is launched, a trader needs to click on “File” in the navigation menu and then select “Open Data Folder”. Inside it, the trader needs to go to the “MQL4” and then the “Experts” folder. After that, he/she needs to copy and paste the two files (.ex4 and .mq4) into that folder.

In case the expert advisor is based on custom indicators, they should be placed in another folder – MQL4 –> “Indicators”. .dll files should be placed in MQL4 –> “Libraries” folder.

Once all the files are copied into the respective folders, the trader needs to open the “Navigator” section of the MT4, right-click on the “Expert Advisors” and then click on “Refresh”. The expert advisor will now be successfully installed in the MetaTrader 4 terminal and can be found in the “Navigator” section.

Allow Automated Trading On MetaTrader 4.

The trader needs to check the settings of the expert advisor before launching it. He/she needs to go to “Tools” –> “Options” and in the active window open the “Expert Advisors” tab. The trader needs to make sure that “Allow automated trading” and “Allow DLL imports” options are enabled (see figure below).

He/she also needs to make sure that the “AutoTrading” setting is enabled on the MetaTrader 4 terminal – it should have a green indication when turned on (see figure below).

The trader can now launch the expert advisor. He/she needs to make sure that the chart of the desired trading instrument with the desired timeframe has been opened so that he/she can use the expert advisor with it. In the “Navigator” section, the trader needs to unroll the “Expert Advisors” menu and choose the expert advisor he/she wishes to launch. The trader may either double-click on the expert advisor or drag-and-drop it onto the active chart.

The expert advisor’s settings window will now open. The trader needs to go to the “Common” tab to make sure that “Allow live trading”, “Enable alerts”, “Allow DLL imports” and “Allow import of external experts” settings are enabled.

Then, he/she needs to go to the “Inputs” tab to make sure that all the expert advisor’s parameters are set according to his/her trading strategy.

Once all the settings have been checked, the trader may click “OK” to launch the EA.

The trader needs to make sure that the expert advisor is running. In case the EA has been installed and launched successfully, a smiley face will appear in the top right corner of the chart next to the EA name.

There are three distinct modes in which your Expert Advisor can appear on your chart signalled by three different emoticons (see table below).

Expert Advisor Emoticon ✘ ☹ ☺ Meaning EA is disabled EA is enabled, but the option “Allow Live Trading” is disabled EA is enabled and is working properly.

Also, the trader needs to check the “Experts” and “Journal” sections of the MT4 terminal – in case no error alerts are presented there, then the EA has been launched and is already running.

Types Of Forex Expert Advisors.

Depending on the algorithm and the trading styles, on which it is based, Forex expert advisors can be grouped into several categories:

Expert advisor for news trading Expert advisor for hedging Expert advisor for breakout trading Expert advisor for scalping Adaptive expert advisor.

Forex News EA.

The news expert advisor will usually keep track of major news announcements and buy and sell currencies based on the market volatility around news events. The EA reacts to events such as central bank policy decisions, GDP, employment growth, inflation and other macroeconomic reports and alerts traders of potential opportunities to open a position.

Forex Hedge Expert Advisor.

The hedge expert advisor is a strategy that places two opposing positions (buy and sell) in the same currency pair, to protect against adverse price movements. In case the original position closes at a loss, the hedge positions (which are in the opposite market direction) will generate profits. In case the original position closes at a profit, the hedge positions may not even be triggered and will instead be cancelled. Since “perfect hedging” does not exist, this expert advisor will simply help traders minimise drawdown.

Forex Breakout EA.

The breakout expert advisor is designed to take advantage of those situations where the price breaks a significant level. The significant level can be an important support and resistance level, a moving average, previous swing high and low, etc. This expert advisor type will conduct constant technical analysis of market conditions to determine when a breakout occurs in a given currency pair.

A breakout often leads to quick and sharp price movement. In this regard, retail traders are better off using an expert advisor which can react more quickly to changes in price trends.

Forex Scalper Expert Advisor.

The scalping expert advisor is an automated trading system that will buy and sell multiple times a day in an attempt to capture a profit from very small price movements. Scalping in the foreign exchange market involves buying and selling currencies based on technical indicators (RSI, MACD, stochastic, moving averages, etc.).

This EA works best when currency pairs’ spreads are narrower and the trading platform’s execution speed is faster. A low-latency true ECN brokerage may be the best choice for Forex traders who employ scalping strategies. A market maker is not suitable.

Forex Adaptive EA.

The adaptive expert advisor is a trading system that as the name suggests adapts to the constant market changes. Adaptive quantitative trading relies on a machine-learning algorithm to come up with the most profitable trades. This type of EA is mostly used by the more sophisticated traders.

Why You Will Want To Use An EA?

The main reasons to use expert advisors and trading robots in Forex trading can be summarised as follows:

Easy to Use Flexibility Save Time Trading robots are emotionless You can know the EA past performance ahead of time.

Easy To Use.

First, a forex expert advisor can easily be accessed and used. It is not necessary for a trader to be really that well versed in MQL coding in order to make changes to an expert advisor’s code. With some automated trading systems, there are convenient ways to access the source code and modify all the trading parameters, including Stop Loss level, slippage rate or the number of trading positions. Meanwhile, people who feel confident that coding is their strength will always be able to create an EA exactly according to their own preferences.


Second, even though a Forex robot is usually meant for use in Forex trading, it offers sufficient flexibility to be applied in trading other CFDs (on Commodities, Stock Indices, Cryptocurrencies and so on). The expert advisor can be programmed to react to price moves, technical indicators, or news announcements across a variety of tradable instruments.

Saves Time.

Third, using an expert advisor can save traders time. The automated trading system will constantly monitor market developments and will do so in a much more precise manner than most human traders would. The EA will run every day without interruption, while traders will be able to focus on other daily activities (work engagements, hobbies, spending time with family etc.) without missing a single trading opportunity.

Trading Robots Are Emotionless.

Fourth, manual trading can always be affected by emotions such as greed or fear. Emotions can prompt a trader to continue holding a losing position for longer than he/she should, simply because he/she does not want to take that loss. Emotions can also urge a trader to enter the Forex market way too quickly, without carefully assessing market conditions.

Perhaps one of the greatest advantages of using an automated trading system is that emotion is completely taken out of one’s decision-making. The EA’s algorithm simply views trading the financial markets in black and white – a series of instructions that must be followed.

You Can Know The EA Past Performance Ahead Of Time.

Last but not least, you can know ahead of time the EA’s past performance. Traders can backtest their expert advisor on the MetaTrader 4 platform before allowing it to operate through a live account. Backtesting is the process through which we can test the potential profitability of a trading system.

Things To Consider Before Buying An EA.

Before using an EA, traders should pay attention to the following considerations:

EA need constant optimisation – Regardless of that emotions are completely taken out of the decision-making process, the lack of human interaction makes an EA incapable of reacting quickly to changing market conditions and incapable of “thinking” in a creative way. Therefore, the performance of an EA needs to be constantly checked, so that a trader can determine whether it is in unison with his/her trading goals. Be aware of the EA scams – The Forex space has been flooded with EAs that are nothing more than a scam. In case a trader comes across an EA product that promises greater returns compared to those of some of the most successful fund managers, at a very affordable price, then perhaps it is an offer too good to be true! Therefore, carefully researching a particular expert advisor or trading robot before buying it is imperative. Be aware of martingale EA systems, which increases the USD value of your position after a loss. Check out how to avoid and identify forex robots trading scams HERE. You need a VPS to run the EA 24/5 – The Forex EA can only be accessed from the device where it has been installed, while the EA can only operate when that device is turned on and when the platform is connected to the Internet. Note that the EA service can experience interruptions due to power outages or Wi-Fi connectivity problems. Therefore, the solution is a virtual private server (VPS), which allows the EA to operate round the clock.

Final Thoughts.

Using an automated trading system certainly offers benefits – it will operate while traders are sleeping, it will never give in to emotions and it can be backtested swiftly. However, we should point out that it would be difficult to determine if an expert advisor or a Forex robot will be able to help a trader achieve consistent profitability.

In case a trader is looking for a free pre-built expert advisor, he/she should do some research to find relevant reviews by other traders and, after finding such an EA, he/she should test it on a demo account first.

About the author: Justin Grossbard.

With over 20 years of investing experience and 10 years of trading, Justin co-founded Compare Forex Brokers in 2014. He has worked within the foreign exchange trading industry for several years and for several of the largest banks globally. Justin achieved Honours in Commerce and has a Master's degree from Monash University. He also owns Innovate Online offering digital marketing services with over 20 employees.