MQL5 ReferenceConstants, Enumerations and Structures
- Chart Constants
- Objects Constants
- Indicator Constants
- Environment State
- Trade Constants
- Named Constants
- Data Structures
- Codes of Errors and Warnings
- Input/Output Constants
Constants, Enumerations and Structures
To simplify the program writing and to make program texts more convenient for perception, the MQL5 language provides predefined standard constants and enumerations. Besides that, service structures are used for storing information.
Standard constants are similar to macros and are of int type.
The constants are grouped by their purposes:
- Chart constants are used when working with price charts: opening, navigation, setting parameters;
- Objects constants are intended for processing graphical objects that can be created and displayed in charts;
- Indicators constants are used for working with standard and custom indicators;
- Environment state constants describe properties of a MQL5-program, show information about a client terminal, financial instrument and current account;
- Trade constants allow to specify a variety of information in the course of trading;
- Named constants are constants of the MQL5 language;
- Data structures describe data storage formats used;
- Codes of errors and warnings describe compiler messages and trading server answers to trade requests;
- In/out constants are designed for working with file functions and displaying messages on the screen by the MessageBox() function.