An expert must be developed for MT4 and MT5 disregard of any dependencies and libraries. All source of all files and dependencies (dll, mqh , …) and libraries must be delivered to us. These files must be in MQ4 and MQ5.
This solution must work on all Windows OS (32 and 64 bits) – from XP to 10
The websocket must be developed with the expert inside the MetaTrader. It must be connected to the Websocket URL address like “wss://domain.tld/something”.
When this websocket establishes then the server and the client (MT4 & MT5 Expert) can send and receive the messages continuously. The messages must be non-blocking IO.
The developed code and libraries must include functions that can be called in the events; On-Open, On-Close, On-Message and On-Error.
Client must be able to call functions in these events (for more info, these events are available in the HTML sample). The system must have a class, so that we can create and object with the new URL as the new input (object WS = new WebSocket(url) or just like the HTML sample). Then the websocket can connect to this URL (class constructor call websocket opening function), so that the class can generate a WS object to call the functions as follows;
and constructor as ws.open(url)
Send function must be able to send a String message inside the websocket to the server.
On-open will be called when the client opens socket, On-close will be called when the client closes socket or when server closes the socket. On-Message will be called if the server sends a message toward the client. On-Error will be called if an error occurs due to any problem.
Regarding all above mentioned information, the project is:
The developed websocket client for MT4 & MT5 must be connected to our websocket server to send and receive the data. After the connection is established, then by the On-Open event it can print socket open in expert log tab.
Then it sends the “WATCH:GOOG,60” toward our server. Every messages from our server to the client must be printed. After 10 minutes, socket must be closed and by the On-Close event it must print the on close in expert log tab.
Also all On-Error events must be applied.