Discussion of article "Communicating With MetaTrader 5 Using Named Pipes Without Using DLLs" - page 4
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
When transmitting strings, 4 bytes of its size go first.
Fixed the function of receiving data with specifying the explicit buffer size.
Understood the reason why the reverse transfer didn't work - I didn't specify the length of the transferred data.
Thank you very much. Everything worked.
Pipes are powerful. Respect to the author of the article.
It was done in the last build of MetaTrader 4.
Pipes in 4 work similarly to 5, also through file operations.
We will release an article for MT4.
Pipes in 4 work similarly to 5, also through file operations.
We will release an article for MT4.
hello, can I have a simple example for MT4? I don't count on an article, of course.
I am specifically interested in how to read three parameters from my self-written programme into an Expert Advisor in the terminal.
It was made in the last build of MetaTrader 4.
Everything seems to work fine on MT5.
The only point:
Otherwise, we hang in the WaitForRead method indefinitely, although the server side has been closed for a long time. All this was checked under Win7-64.
I added timeout and some other tricks to the WaitForRead method on the server side and got a working system with automatic reconnects on both sides of the channel,
but it's all a bit "crutchy".
Everything seems to be working fine on MT5.
The only point:
Otherwise, we hang in the WaitForRead method indefinitely, although the server side has been closed for a long time. All this was checked under Win7-64.
I added timeout and some other tricks to the WaitForRead method on the server side and got a working system with automatic reconnects on both sides of the channel,
but it's all a bit "crutchy".
From our side it was a demonstration of the possibility.
Please post your variant of the class. We will finalise the standard class.
The client part itself looks roughly like this:
The point is that the FileSize method, which is used while waiting for data to arrive, doesn't detect a connection violation ( apparently it doesn't check).
Timeout helps, but IMHO not in all possible situations. It would be good to check all these errors in the FileSize method.
Strange...
Pictures from the buffer don't get into comments and exactly if you use alt+PrntScr and paste it into the editor, the picture is inserted but the message doesn't get into the branch.
Okay, the problem is that the test example from the article doesn't go through
But in the terminal, the script doesn't log anything until I delete it from the chart.
and then I see in the log
Win7x64 build 787 dated 21 March 2013
Just checked, everything works.
In MQ5 you only need to replace the line
Just checked, everything works.
In MQ5 you only need to replace the line
I don't have ...
I replaced the line or it wouldn't compile.