Command Syntax Notation

These rules describe how syntax is presented in this reference.

  • In the syntax definition of the command, words in lowercase are keywords. Examples are: add, print, help. When typed into MQL, they can consist of mixed lower and uppercase.
  • Items in UPPER CASE refer to categories. Examples are NAME, VALUE. When typed into MQL, appropriate substitutions of actual names or values must be used. Names and values are case sensitive.
  • Items in square brackets, [], are optional.
  • Items in braces, {}, can appear zero or more times.
  • Items between vertical lines are options of which one must be chosen. That is: | item_1 | item_2 | item_3 | means choose one of the items.
  • MQL commands are entered as a free form list of words separated by one or more blanks, tabs, or newlines.
  • Command lines should end with a semicolon(;). However, a command is also assumed ended when two consecutive newlines are entered.
  • Text appearing after a pound sign (#), up to and including the next newline, is ignored as a comment.
  • NAMES, VALUES, and so on must be quoted (single or double) when they have embedded blanks, tabs, newlines, commas, semicolons, or pound signs.
  • Any keyword that accepts a list of VALUES (for example, keyword [VALUE {,VALUE}]) can also be specified separately for each value. For example:
    attribute first,second,third

    or

    attribute first 
    attribute second
    attribute third
  • Most keywords can be abbreviated to three characters (or the least number that will make them unique).