
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
Hi guys,
I have been having difficulty getting named pipes to work. I have been hoping to implement a simple idea really and I wish to use named pipes as I don't feel I need to go as advanced as Sockets and I failed miserably with synchronising shared memory. The idea is to monitor a number of MT4 instances and then when I see a trading signal in the prices then I can try and give my trade a slight edge by picking the best priced broker at that time. I want to use named pipes to pump prices into a central C++ application and then the C++ can pick the highest or lowest price broker.
I started with the MSDN examples of named pipes multithreaded server and client and I tried with the help of this thread to replicate the very basics of the client application. I can't get it to work though and I get garbled text through at the server end. However, depending on some slight changes to code often I get the first character coming through correctly. The MSDN examples are below and below them is a snippet of my code which will hopefully be enough info. Please feel free to ask any further questions if not!
I believe if I could replicate the MSDN client in MQL4 then I would be fine to go on from there but I am struggling to even begin debugging this issue at the moment?
MSDN Multithreaded Server
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
MSDN Client
http://msdn.microsoft.com/en-us/libr...(v=VS.85).aspx
My .mqh:
My associated .mq4:
The code for my multithreaded server as I have said is as in the MSDN link above.
Thanks for any help you can provide!
Mark