- Getting a general list of terminal and program properties
- Terminal build number
- Program type and license
- Terminal and program operating modes
- Permissions
- Checking network connections
- Computing resources: memory, disk, and CPU
- Screen specifications
- Terminal and program string properties
- Custom properties: Bar limit and interface language
- Binding a program to runtime properties
- Checking keyboard status
- Checking the MQL program status and reason for termination
- Programmatically closing the terminal and setting a return code
- Handling runtime errors
- User-defined errors
- Debug management
- Predefined variables
- Predefined constants of the MQL5 language
Terminal build number
Since the terminal is constantly being improved and new features appear in its new versions, an MQL program may need to analyze the current version in order to apply different algorithm options. In addition, no program is immune to errors, including the terminal itself. Therefore, if problems occur, you should provide a diagnostic output that includes the current version of the terminal. This can help in reproducing and fixing bugs.
You can get the build number of the terminal using the TERMINAL_BUILD property in ENUM_TERMINAL_INFO_INTEGER.
if(TerminalInfoInteger(TERMINAL_BUILD) >= 3000)
|
Recall that the build number of the compiler with which the program is built is available in the source code through the macro definitions __MQLBUILD__ or __MQL5BUILD__ (see Predefined Constants).