Expert Advisors / MetaQuotes Language
MetaQuotes Language 4 (MQL 4) is a new built-in language for programming trading strategies. This language allows the creation of your own Expert Advisors that render the trade process management automatic and are perfectly suitable for implementing your own trade strategies. You can create your own Custom Indicators, Scripts and Libraries of functions with the help of MQL 4, as well.
A large number of functions necessary for the analysis of the current and last quotations, the basic arithmetic and logic operations are included in MQL4 structure. There are also basic indicators built in and commands of order placement and the control over them.
The MetaEditor 4 IDE (Integrated Development Environment) that highlights different constructions of MQL 4 is used for writing the program code. It helps users to orient in the expert system text quite easily. As an information book for MQL 4 we use MetaQuotes Language Dictionary. A brief guide contains functions divided into categories, operations, reserved words and other language constructions and allows finding the description of every element we use.
Programs written in MetaQuotes Language 4 have different features and purposes:
- Expert Advisors is a mechanical trade system (MTS) linked up to a certain plot. The Advisor can not only inform you about a possibility to strike bargains, but also can make deals on the trade account automatically and direct them right to the trade server. Like most trade systems, the MetaTrader 4 terminal supports testing strategies on historical data with displaying on the chart the spots where trades come in and out.
- Custom Indicators is an analogue of a technical indicator. In other words, Custom Indicators allow creating technical indicators in addition to those already integrated into MetaTrader 4 terminal. Like built-in indicators, they cannot make deals automatically and are aimed only for implementing analytical functions.
- Scripts are programs destined for single execution of some actions. Unlike Expert Advisors, Scripts aren't run tickwise and have no access to indicator functions.
- Libraries are user functions libraries where frequently used blocks of user programs are stored.