make connection between mql5 and real server using socket IO

 

Hello 

I need make connection between mql5 and real server by using Socket IO Client live connection 

I tried WebSocket and normal Socket and WebRequest the mt5 cannot make this connection because it send get request .I do not need http connection i need Tcp connection
I also tried c# dll file in the dll mt5 return cant found SocketIO library 

I was read the documentation and I dont found any solution ... if any one can help me 

this is example .Net dll 

using System;

using SocketIOClient;


namespace FSocket
{
    public static class Socket
    {

        public static async void ConnectToServer()
        {
            var client = new SocketIO("ws://127.0.0.1:8080/");

            client.OnConnected += (sender, e) =>
            {
                Console.WriteLine("aa");
            };
            await client.ConnectAsync();
        }
        
    }
}

Thanks

Websockets for MetaTrader 5
Websockets for MetaTrader 5
  • www.mql5.com
Before the introduction of the network functionality provided with the updated MQL5 API, MetaTrader programs have been limited in their ability to connect and interface with websocket based services. But of course this has all changed, in this article we will explore the implementation of a websocket library in pure MQL5. A brief description of the websocket protocol will be given along with a step by step guide on how to use the resulting library.
 

    If you want useful answers to your queries, please describe your issues clearly and in detail.

    Also provide sample code of your coding attempts. Use the CODE button (Alt-S) when inserting code.

     

    MQL5 does not natively support Websockets, only Sockets and a simple HTTP client, namely WebRequest.You would have to code your own Websockets code using the Sockets functionality.

    However, all the natively supported network functionality is client-only and the URLs need to be allowed in the terminal's options.

    Documentation on MQL5: Network Functions
    Documentation on MQL5: Network Functions
    • www.mql5.com
    Network Functions - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
     
    wesam kheer:

    Hello 

    I need make connection between mql5 and real server by using Socket IO Client live connection 

    I tried WebSocket and normal Socket and WebRequest the mt5 cannot make this connection because it send get request .I do not need http connection i need Tcp connection
    I also tried c# dll file in the dll mt5 return cant found SocketIO library 

    I was read the documentation and I dont found any solution ... if any one can help me 

    this is example .Net dll 

    Thanks

    try this library :

    Socket library for MT4 and MT5 - Other - 6 September 2017 - Traders' Blogs (mql5.com)

    Socket library for MT4 and MT5
    Socket library for MT4 and MT5
    • 2017.09.06
    • www.mql5.com
    [Published as a blog entry because submission to the Codebase stalled on the fact that this socket library works with both MT4 and MT5, whereas the Codebase is divided into separate sections for MT4
     
    Fernando Carreiro #:

    MQL5 does not natively support Websockets, only Sockets and a simple HTTP client, namely WebRequest.You would have to code your own Websockets code using the Sockets functionality.

    However, all the natively supported network functionality is client-only and the URLs need to be allowed in the terminal's options.

    I tried all this and I cant make connection I tried to make a new library also it is not start
     

    wesam kheer:

    I need make connection between mql5 and real server by using Socket IO Client live connection 

    I tried WebSocket and normal Socket and WebRequest the mt5 cannot make this connection because it send get request .I do not need http connection i need Tcp connection
    I also tried c# dll file in the dll mt5 return cant found SocketIO library 

    I was read the documentation and I dont found any solution ... if any one can help me 

    this is example .Net dll 

    Your example code is for C#, not MQL5, so we cannot test and evaluate it.

    Show a proper MQL5 attempt with either native sockets or Webrequest and show the debugging log output for the attempt.

    Also remember to enable the URLs in the terminal options.

    We cannot help you if you don't provide proper technical details and a functional example to test and evaluate.

     

    There are also many example Articles ...

     
    Fernando Carreiro #:

    There are also many example Articles ...

    Thank you very much for your help
    Reason: