Sunday, March 26, 2017

Automatic Trading with MetaTrader

Metatrader is a trading platform of MetaQuotes. It is the most used trading platform in the world, especially the version Metatrader 4. There are many reasons why Metatrader is the most used since it is very powerful and intuitive, includes a lot of information useful to the trader as graphs of all types , Indicators of technical analysis, Probably the main reason for the success of this platform is the ability to execute automatic trading without human intervention. We can also backtest historical data of our scripts so that we can optimize and debug them.

To use Metatrader's automatic systems, Expert Advisors (EAS) are used, which are small computer programs (scripts) in which the set of trading rules are defined. These files are written in a language of Metatrader which is the MQL4 (for Metatrader 4) which is a C-based language, so to program an Expert Advisor (EA) in principle we need to have some basic knowledge of programming in C and Then adapt to the peculiarities of the MQL4.

Expert Advisor (EA) created by us or other traders consists of two files: One is the file with extension MQ4 which is the source code and another file with EX4 extension which is the executable program. At least this is because if the Expert Advisor uses an older indicator (which is quite common) it will take another two files (MQ4 and EX4) corresponding to the indicator. The MQL4 language is also used to program different functions for Metatrader in addition to Expert Advisors.

To install our EA we must, on the one hand, copy the two files (MQ4 and EX4) to the Metatrader installation folder (for example C: \ MQM \ MQL4 \ Experts folder and the other indicators files (MQ4 and EX4) Note that if the EA contains any more script, we must copy it to C: \ Metastrader \ MQL4 \ Scripts folder.

In what case we restart Metatrader we will be able to see our EA in the panel Navigator (explorer). If it is gray it is because only the executable file is loaded and we can not modify the code just execute it. If it is in color we can modify the source code and execute it.

To execute it we must only drag it on the graph and in the corner will appear a smiling face if our broker accepts Expert Advisors or a sad face if it does not accept it. Once accepted our EA we can configure the input parameters that are typically Stop Loss, Take Profit or Trailing Stop to adapt to our needs.

To run an EA we need our Broker online terbaik to use the Metatrader Platform and support Expert Advisors so if we do not have it we must open an account with one that supports it.

No comments:

Post a Comment