Discussion of article "Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs"

 

New article Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs is published:

Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs. One of the easiest and safest method is to use standard Named Pipes that work as normal file operations. They allow you to organize interprocessor client-server communication between programs. Take a look at practical examples in C++ and MQL5 that include server, client, data exchange between them and performance benchmark.

Many developers face the same problem - how to get to the trading terminal sandbox without using unsafe DLLs.

One of the easiest and safest method is to use standard Named Pipes that work as normal file operations. They allow you to organize interprocessor client-server communication between programs. Although there is an already published article A DLL-free solution to communicate between MetaTrader 5 terminals using Named Pipes on this topic that demonstrates enabling access to DLLs, we will use standard and safe features of client terminal.

You can find more information about named pipes in MSDN library, but we will get down to practical examples in C++ and MQL5. We will implement server, client, data exchange between them and then benchmark performance.

Author: MetaQuotes

 
Hello I can not find file MQL5
 
vanvolxem:
Hello I can not find file MQL5
What do you mean ? mql5 file is attached below the article.
 
I would test pipeclient.mq5 application, but the link load is not correct,

I said that I am not computer.

I would have wanted to create a database for analysis outside of MT5 because my trading system is based on correlation thank you for your response
Practical Application Of Databases For Markets Analysis
Practical Application Of Databases For Markets Analysis
  • 2010.05.18
  • Alexander
  • www.mql5.com
Working with data has become the main task for modern software - both for standalone and network applications. To solve this problem a specialized software were created. These are Database Management Systems (DBMS), that can structure, systematize and organize data for their computer storage and processing. As for trading, the most of analysts don't use databases in their work. But there are tasks, where such a solution would have to be handy. This article provides an example of indicators, that can save and load data from databases both with client-server and file-server architectures.
 
vanvolxem:
I would test pipeclient.mq5 application, but the link load is not correct,

I said that I am not computer.

I would have wanted to create a database for analysis outside of MT5 because my trading system is based on correlation thank you for your response

Ok, I see. Reported to Service Desk.

You can download this file directly from your MT5 platform. Simply use the search tool with pipeclient keyword.

 
angevoyageur:

Ok, I see. Reported to Service Desk.

You can download this file directly from your MT5 platform. Simply use the search tool with pipeclient keyword.

Thank you, it works 
 
vanvolxem:
I would test pipeclient.mq5 application, but the link load is not correct,

I said that I am not computer.

I would have wanted to create a database for analysis outside of MT5 because my trading system is based on correlation thank you for your response
Try here:  pipeclient.mq5
 

Is any body using this client-sever? For what and how?

I read at the beginning:

"A script from the terminal will connect to this server and will exchange data with it."

May I ask how can I connect two clients running on two different terminals via this server? As far as I understand the server and the tests only one client connects to the server and what can this server do with the messages it has received?

Wouldn't it be necessary to have

1) an independent server waiting for multiple clients,

2) each client to start the connection by sending a unique ID of itself,

3) a server sending to every connected client any message that the server has received - may be except to the client it has got the message from,

4) a server sending each message beginning with the unique ID of the client which has sent the message?

- This way the client can detect its own messages and delete them - if they were send back by the server, by what ever reason.

- This way the client can detect the client(s) it should listen too - must be part of the mq4-code of the client.

 

Solution presented here does not work with Async Named Pipes. Please see https://www.mql5.com/en/forum/94343

 Newgel 

MQL5 Asynchronous named pipes?
MQL5 Asynchronous named pipes?
  • www.mql5.com
I´m trying to integrate MT5 with an external Named Pipe Server application written in C# through named pipes...
 
Can it possible to use in C#?
Reason: