What is an Expert Advisor ?
A Forex Expert Advisor (a.k.a. Forex Trading Robot, EA, MT-4 EA, Automated Forex Trading Software) is a mechanical trading system written in the MQL-4 programming language and designed to automate trading activities on the MetaTrader 4 platform. Expert Advisors can be programmed to alert you of a trading opportunity and can also trade your account automatically managing all aspects of trading operations from sending orders directly to your broker’s server to automatically adjusting stop loss, trailing stops and take profit levels.
Expert Advisors for MetaTrader 4 are all unique and different in the rules they follow to enter and exit the market. Expert Advisors eliminate emotional trading decisions that cripple novice trading accounts. Forex Expert Advisors allow investors to exercise a very strict trading system without falling outside pre-programmed parameters and it is this rock solid consistency one of the features that make these programs so attractive to serious investors. Am Expert Advisors can also eliminate the emotional trading decisions that usually cripple novice Forex trading accounts. Forex Expert Advisors exercise unmatched discipline when trading and can be designed to evaluate more parameters at the same time than any human could keep an eye on at once.
All of the technical indicators that are available in the MT-4 platform can be brought to bear in the logic used by an Expert Advisor in almost any way that one can think of thanks to the MQL-4 programming language. All types of moving averages (simple, exponential, etc.), RSI, CCI, etc. You can also create your own custom indicator and call upon it from an Expert Advisor.
There are many different types of MT-4 Expert Advisors depending on their intended application. Some are designed specifically to trade news events and remain out of the market all other times while other MT-4 Expert Advisors are meant to remain active 24x7. Experienced traders who have their own fine tuned manual trading systems sometimes hire MQL-4 programmers to automate their systems thereby creating custom MT-4 Expert Advisors. All expert advisors have the same goal and that is to automate trading operations and generate a profit while doing so.
Expert Advisors make use of technical indicators in order to assess market conditions and make trading decisions. In order for the Expert Advisor to work, it must be attached to an individual chart on the MetaTrader 4 Forex trading platform. An MT-4 Expert Advisor can take into consideration dozens of different factors in an instant in order to decide what to do next. This ability to consider such a broad range of price influencing factors coupled with the discipline of a mechanical trading system devoid of emotion leads to a very successful trading combination.
Throughout the pages of this web site you will find more detailed information about Forex Expert Advisors. If you have a question about Forex Expert Advisors for the MetaTrader 4 platform and you don’t see it here please send us an email and we will try our best to respond as soon as possible.
How does a Forex Expert Advisor work ?
The program works by calculating the different indicators that it was designed to use and take actions when the market conditions meet the correct criteria as described in the source code of the Expert Advisor.
Fore Example. A simple expert advisor may say something like this:
"If the 9 and 20 day moving averages cross with the 9 day MA above the 20 MA and the RSI is higher than 50 then open a long position (buy)"
That is just an example. You can assign countless conditions for entering and exiting the market as well as managing trades for trailing stops and multiple take profit levels.
An MT-4 Expert Advisor is usually divided into three parts: A startup or ‘init’ function, a main function and a ‘deinit’ or cleanup function. The Expert Advisor will run through its startup function once upon startup and will run through its ‘deinit’ or clean-up function once at the end. In the mean time, the MT-4 Expert Advisor program runs through a cycle of its main function over and over with every incoming tick while it is attached to a chart and active. Once running, the Expert Advisor will not start another cycle for a new tick if it is still in the middle of processing the previous one.
Here is a simple outline of what a simple expert advisor could be programmed to do.
(This would be the 'main' part of the EA and takes place every time a tick comes in.)
1- Check my account. Is there enough equity to open a trade? if so, continue. If not, end.
2- Are there any open trades right now?
2a- If there are, do they need to be closed or do they need their trailing stop adjusted? (do so if needed and exit.)
2b- If there are no open trades, are the market conditions right to open one? (do so if needed and exit. )
3- End.
How to use an Expert Advisor
In order to make use of an Expert Advisor you have to install it on MetaTrader and then attach it to the appropriate chart on MetaTrader 4. This is fairly simple as will be described below. If there are any instructions included with your Expert Advisor you should read them in their entirety.
#1- First, you have to put the Expert Advisor in a place where MetaTrader 4 will be able to use it. In most installations of MetaTrader 4 that place is C:\Program Files\MetaTrader 4\experts The actual Expert Advisor is a file without an icon that ends with .EX4
#2- Now that the Expert Advisor is in the correct location within your computer, re-start MetaTrader 4.
#3- When MetaTrader 4 starts up again you will now see the new Expert Advisor on the left navigation menu.
Learn to Make your own Expert Advisors
In order to make your own expert advisor you have to learn the MQL-4 programming language. If you already know C programming then MQL-4 will be very easy as they are quite similar. If you do not know either language, it would be prudent to take a course in C programming. Then, once you understand the structure of C language, MQL-4 will be a snap. If you are not a programmer, do not let this stop you from learning to make your own Expert Advisors.
The following web site has all the official documentation on the MQL-4 programming language.
The Different Types of Expert Advisors
There are various different types of Expert Advisors for the MetaTrader 4 platform. Here we will discuss some of the more common types. This is by no means a comprehensive list. There can be other types of Expert Advisors based on the creativity of the programmers who make them.
News Expert Advisor - This is a type of hedging EA. The News EA is designed to take advantage of news events and the large price shifts that can occur during financial news releases.
Breakout Expert Advisor - Designed to open a trade when the price breaks through predefined support and resistance levels.
Hedge Expert Advisor - This is any EA that plays two separate and opposing positions and minimizes the loss on one while facilitating maximum profit on the good trade.
Scalper Expert Advisor - This is the type of EA that will get your account canceled or at least heavily restricted by a broker. It aims to secure small profits as soon as they are available.
What is MQL-4 ?
MQL-4 is short for Meta Quotes Language version 4. This is the programming language created by MetaQuotes Software Corp. (http://www.metaquotes.net) that automates the MetaTrader client terminal.
The following web site has all the official documentation on the MQL-4 programming language.
*What is MetaTrader 4 ?
MetaTrader 4 is a free trading platform developed by MetaQuotes Software Corp. (http://www.metaquotes.net) and supported by many different Forex brokers all over the world. MetaTrader 4 easy to learn and very user friendly.
One of the unique qualities of MetaTrader 4 is the ability to automate trading activities through the use of an Expert Advisor.
Can I run more than one Expert Advisor on the same account/client terminal ?
Yes. You can run multiple instances of an Expert Advisor on the same MetaTrader 4 client terminal. As long as all of the Expert Advisors that you are running in the same client terminal have been designed to get along with each other on the same terminal. (not all Expert Advisors can get along on the same terminal) Mainly because they will try to manage each other’s open trades. Programmers get around this by using magic numbers in the market entrance part of the source code of the Expert Advisor.
There are also platform limitations. Only one Expert Advisor can communicate with the trading server at any one time. If multiple Expert Advisors are active on the same terminal and more than one try to communicate with the trading server you will get "Trade context busy" errors in the logs when this happens if you have too many Expert Advisors on one client terminal.
0 comments:
Post a Comment