MQL4参考 普通函数

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

GetMicrosecondCount

Returns the number of microseconds that have elapsed since the start of MQL4-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 EX4 file during compilation

ResourceSave

Saves a resource into the specified file

SendFTP

Sends a file at the address specified in the settings window of the "FTP" tab

SendMail

Sends an email at the address specified in the settings window of the "Email" tab

SendNotification

Sends push notifications to mobile terminals, whose MetaQuotes ID are specified in the "Notifications" tab

Sleep

Suspends execution of the current Expert Advisor or script within a specified interval

TerminalClose

Commands the terminal to complete operation

TesterStatistics

It returns the value of a specified statistic calculated based on testing results

TranslateKey

Returns a Unicode character by a virtual key code

WebRequest

Sends HTTP request to the specified server

ZeroMemory

Resets a variable passed to it by reference. The variable can be of any type, except for classes and structures that have constructors.

 

What's new in MQL5

In MQL5, the SendFTP, SendMail and SendNotification functions are moved to the new extended Network functions section. Now programs can exchange data with remote servers included in the list of allowed IP addresses. This means that MQL5 EAs are able to establish secure connections between processes using the TCP/IP protocol without using third-party DLLs.