MQL5 リファレンスNetwork Functions 

Network functions

MQL5 programs can exchange data with remote servers, as well as send push notifications, emails and data via FTP.

For end-user security, the list of allowed IP addresses is implemented on the client terminal side. The list contains IP addresses the MQL5 program is allowed to connect to via the Socket* and WebRequest functions. For example, if the program needs to connect to https://www.someserver.com, this address should be explicitly indicated by a terminal user in the list. An address cannot be added programmatically.

Adding the address to the list

Add an explicit message to the MQL5 program to notify a user of the need for additional configuration. You can do that via #property description, Alert or Print.

Function

Action

SocketCreate

Create a socket with specified flags and return its handle

SocketClose

Close a socket

SocketConnect

Connect to the server with timeout control

SocketIsReadable

Get a number of bytes that can be read from a socket

SocketIsWritable

Check whether data can be written to a socket at the current time

SocketTimeouts

Set timeouts for receiving and sending data for a socket system object

SocketRead

Read data from a socket

SocketSend

Write data to a socket

SocketTlsHandshake

Initiate secure TLS (SSL) connection to a specified host via TLS Handshake protocol

SocketTlsCertificate

Get data on the certificate used to secure network connection

SocketTlsRead

Read data from secure TLS connection

SocketTlsReadAvailable

Read all available data from secure TLS connection

SocketTlsSend

Send data via secure TLS connection

WebRequest

指定されたサーバにHTTP要求を送信します。

SendFTP

「FTP」タブの設定ウィンドウで指定されたアドレスにファイルを送信します。

SendMail

「メール」タブの設定ウィンドウで指定されたアドレスに電子メールを送信します。

SendNotification

MetaQuotes ID が「通知」タブで指定されているモバイル端末にプッシュ通知を送信します。