# Common Functions General-purpose functions not included into any specialized group are listed here. | Function | Action | | --- | --- | | Alert | Displays a message in a separate window | | CheckPointer | Returns the type of the object pointer | | Comment | Outputs a comment in the left top corner of the chart | | CryptEncode | Transforms the data from array with the specified method | | CryptDecode | Performs the inverse transformation of the data from array | | DebugBreak | Program breakpoint in debugging | | ExpertRemove | Stops Expert Advisor and unloads it from the chart | | GetPointer | Returns the object pointer | | GetTickCount | Returns the number of milliseconds that have elapsed since the system was started | | GetTickCount64 | Returns the number of milliseconds that have elapsed since the system was started | | GetMicrosecondCount | Returns the number of microseconds that have elapsed since the start of MQL5 program | | MessageBox | Creates, displays a message box and manages it | | PeriodSeconds | Returns the number of seconds in the period | | PlaySound | Plays a sound file | | Print | Displays a message in the log | | PrintFormat | Formats and prints the sets of symbols and values in a log file in accordance with a preset format | | ResetLastError | Sets the value of a predetermined variable _LastError to zero | | ResourceCreate | Creates an image resource based on a data set | | ResourceFree | Deletes dynamically created resource (freeing the memory allocated for it) | | ResourceReadImage | Reads data from the graphical resource created by ResourceCreate() function or saved in EX5 file during compilation | | ResourceSave | Saves a resource into the specified file | | SetUserError | Sets the predefined variable _LastError into the value equal to ERR_USER_ERROR_FIRST + user_error | | SetReturnError | Sets the code that returns the terminal process when completing the operation. | | Sleep | Suspends execution of the current Expert Advisor or script within a specified interval | | TerminalClose | Commands the terminal to complete operation | | TesterHideIndicators | Sets the mode of displaying/hiding indicators used in an EA | | TesterStatistics | It returns the value of a specified statistic calculated based on testing results | | TesterStop | Gives program operation completion command when testing | | TesterDeposit | Emulates depositing funds during a test. It can be used in some money management systems | | TesterWithdrawal | Emulates the operation of money withdrawal in the process of testing | | TranslateKey | Returns a Unicode character by a virtual key code | | ZeroMemory | Resets a variable passed to it by reference. The variable can be of any type, except for classes and structures that have constructors. |