Guía de ayuda de MetaTrader 4
Guía de ayuda de MetaTrader 4Auto TradingExpert Advisors

Expert Advisors

Expert Advisors (experts) are programs in the terminal that have been developed in MetaQuotes Language 4 (MQL4) and used for automation of analytical and trading processes. They allow to perform prompt technical analysis of price data and manage trading activities on basis of signals received. The entire routine work of technical analysis and trading can be given to experts. An expert can perform analytical and trading operations for any symbols or periods independent on whether the corresponding chart was opened or not.

Working with experts means:

  • Creation of an Expert
    To create and compile an expert, one has to use the built-in "MetaEditor". It is a constituent of the client terminal and represents a convenient development environment of MQL4 programs.
  • Expert Setup
    Before using of experts, one has to set up them first. Working parameters common for all experts are set in the client terminal settings. Besides, each expert can have its own settings.
  • Launch of an Expert
    To launch an expert, one has to impose it into the chart. As soon as a new tick incomes, the expert will start executing.
  • Expert Shutdown
    An expert advisor is shut down after it has been removed from the chart.

 

New features of trading robots development

The new MQL5 language syntax is similar to that of MQL4 but MQL5 programs work up to 20 times faster. This is possible because all MQL5 language functions are implemented as efficiently as possible, while the compiler aggressively optimizes the obtained executable EX5 code to achieve the high speed of MQL5 applications.

The second reason is the implementation of asynchronous operations executed in a fraction of a millisecond. These operations open opportunities previously unavailable for many professional traders. With the fifth generation platform, you do not need third-party connections to exchange protocols. Besides, you do not need to place your terminals as close to a broker as possible. Just get a VPS next to the trading server and send your fast MQL5 robot to trade there directly from the terminal. Low network costs, high Depth of Market refresh rates and asynchronous order sending accelerate trade operations dozens of times allowing you to develop trading robots for the new class of strategies.

MQL5 implements event handling making it simpler and easier to build complex trading algorithms. At each trading operation, the Trade and TradeTransaction events are sent to the terminal to be processed by the appropriate handlers. Orders, positions and deals are considered separate entities in the new platform, since now you can trade not only usual Forex symbols, but also exchange instruments. The Standard Library offers the ready-made Trading Classes to work with trading functions. The classes simplify the development of trading operations. You only need to declare the CTrade type variable to get the entire functionality necessary to work with all order types.

To quickly check your trading idea, assemble a robot using MQL5 Wizard modules without writing a single line of code. The ready-made trading signal, open position tracking (trailing stop) and money management (setting volumes in trading operations) modules allow creating an unlimited number of trading strategy versions and combining several types of signals in a single EA. Thus, the new terminal makes it possible to develop complex strategies even with no programming skills.

Another advantage of MQL5 language is the ability to work with the Depth of Market and access the tick history. Analyze Time & Sales and develop strategies based on price change and deal volume directly in an EA. In the new platform, the trade server stores a tick history of each symbol and sends it to the terminal on request when testing on real ticks. The MetaEditor developer environment allows debugging and profiling EAs directly in the strategy tester enabling a quick check of trading algorithms in different market situations. In the tester, such a test will take a few minutes and hours, while the conventional test of robots online will take days and weeks.

Explore MQL5 language features and start developing strategies in the new generation platform.