MQL scripts structure

Here is the structure of MQL scripts:

package packageName;

(import importName;)*

metatype metaTypeName;

(visibility script scriptName(parameters) : returnType {
(body statements)*
})*

MQL comments are defined the same way as in Java and C/C++:

Related concepts
Script