Skip to content

Common Functions

Common Functions

General-purpose functions not included into any specialized group are listed here.

FunctionAction
AlertDisplays a message in a separate window
CheckPointerReturns the type of the object pointer
CommentOutputs a comment in the left top corner of the chart
CryptEncodeTransforms the data from array with the specified method
CryptDecodePerforms the inverse transformation of the data from array
DebugBreakProgram breakpoint in debugging
ExpertRemoveStops Expert Advisor and unloads it from the chart
GetPointerReturns the object pointer
GetTickCountReturns the number of milliseconds that have elapsed since the system was started
GetMicrosecondCountReturns the number of microseconds that have elapsed since the start of MQL5 program
MessageBoxCreates, displays a message box and manages it
PeriodSecondsReturns the number of seconds in the period
PlaySoundPlays a sound file
PrintDisplays a message in the log
PrintFormatFormats and prints the sets of symbols and values in a log file in accordance with a preset format
ResetLastErrorSets the value of a predetermined variable _LastError to zero
ResourceCreateCreates an image resource based on a data set
ResourceFreeDeletes dynamically created resource (freeing the memory allocated for it)
ResourceReadImageReads data from the graphical resource created by ResourceCreate() function or saved in EX5 file during compilation
ResourceSaveSaves a resource into the specified file
SetUserErrorSets the predefined variable _LastError into the value equal to ERR_USER_ERROR_FIRST + user_error
SetReturnErrorSets the code that returns the terminal process when completing the operation.
SleepSuspends execution of the current Expert Advisor or script within a specified interval
TerminalCloseCommands the terminal to complete operation
TesterHideIndicatorsSets the mode of displaying/hiding indicators used in an EA
TesterStatisticsIt returns the value of a specified statistic calculated based on testing results
TesterStopGives program operation completion command when testing
TesterWithdrawalEmulates the operation of money withdrawal in the process of testing
TranslateKeyReturns a Unicode character by a virtual key code
ZeroMemoryResets a variable passed to it by reference. The variable can be of any type, except for classes and structures that have constructors.
Last updated on