MQL4 Common Functions

General-purpose functions for MQL4 programs.

Functions

  • **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 data from an array with a specified method.
  • **CryptDecode**: Performs the inverse transformation of data from an array.
  • **DebugBreak**: Sets a program breakpoint in debugging.
  • **ExpertRemove**: Stops an Expert Advisor and unloads it from the chart.
  • **GetPointer**: Returns an object pointer.
  • **GetTickCount**: Returns milliseconds elapsed since system start.
  • **GetMicrosecondCount**: Returns microseconds elapsed since MQL4 program start.
  • **MessageBox**: Creates and displays a message box.
  • **PeriodSeconds**: Returns the number of seconds in a period.
  • **PlaySound**: Plays a sound file.
  • **Print**: Displays a message in the log.
  • **PrintFormat**: Formats and prints data in a log file.
  • **ResetLastError**: Sets [_LastError](/predefined/_lasterror) to zero.
  • **ResourceCreate**: Creates an image resource from data.
  • **ResourceFree**: Deletes dynamically created resources.
  • **ResourceReadImage**: Reads data from a graphical resource.
  • **ResourceSave**: Saves a resource to a file.
  • **SendFTP**: Sends a file via FTP.
  • **SendMail**: Sends an email.
  • **SendNotification**: Sends push notifications to mobile terminals.
  • **Sleep**: Suspends execution for a specified interval.
  • **TerminalClose**: Commands the terminal to close.
  • **TesterStatistics**: Returns specified statistics from testing results.
  • **TranslateKey**: Returns a Unicode character by virtual key code.
  • **WebRequest**: Sends an HTTP request to a server.
  • **ZeroMemory**: Resets a variable passed by reference to zero.
  • Notes

  • In MQL5, SendFTP, SendMail, and SendNotification are moved to the Network functions section. MQL5 EAs can establish secure TCP/IP connections without third-party DLLs.