Script is a program written in MetaQuotes Language 4 (MQL4) and intended for a single performing of any actions. A script can fulfill both analytical and trading functions. Unlike experts, scripts are executed on request, not by ticks. In other words, where an expert works almost continuously, a script, having completed the function once, stops functioning by itself.
Working with scripts means:
- Creation of a Script
The built-in "MetaEditor" is used to create and compile a script. It is a constituent of the client terminal and represents a convenient development environment of MQL4 programs.
- Script Setup
One has to set up scripts first before using them. Working parameters common for all scripts are defined in the client terminal setup window. Every script has its own settings, as well.
- Launching of a Script
To launch a script, one has to attach it to the chart. The script algorithm will be launched immediately after that.
- Deletion of a Script
The script completes its work after it has been deleted from the chart.