MQL 4 is a language for programming in MetaTrader. This language allows the creation of scripts that automate trading. You can create expert advisors, indicators, scripts and libraries of functions.
A lot of functions for the analysis of the current and last prices, the arithmetic and logic operations are provided by MQL. There are also basic indicators built in and commands of order handling.
There are four different classes of scripts in MetaQuotes Language 4 that have different features and purposes:
Expert Advisor is a mechanical trade system linked with a chart. The Advisor can not only inform you about a possibility to make trades, but also can make deals on the trade account automatically and direct them right to the broker. Like most trade systems, the MetaTrader 4 terminal supports testing strategies coded in Expert Advisor on historical data with displaying trades on the chart and reporting.
Custom Indicators is a technical indicator. Custom Indicators allow creating extra technical indicators in addition to those already integrated into MetaTrader 4 terminal. Like built-in indicators, they cannot make deals automatically and are used only for providing technical analysis functions.
Scripts are programs for single execution of their code. Scripts do not work when a new tick come and have no access to some features.
Libraries are packs of functions where frequently used blocks of scripts are kept.