Send Signals to MT4 from External Source

 

Hello

We develop signals on a proprietary system built on php/SQL. We use this to send signals to Collective2.com via their API.

I'm interested in sending our signals but they do not have an API and only accept signals via MT4.

I'm a big fan of MT4, but dont want to have to replicate all the work we have done on our stand alone server in the MT4 environment.

Does anybody know if it is possible to send externally generated signals to an MT4 account which would then broadcast those signals?

Tks

Ben Heaton

 

Use the QuickChannel library from MT4i. It's the best and most reliable solution for MT4 inter-process communication currently available (imho). On their website they only promote signals between two or more MT4 instances but you can send/receive messages from any Win32 application.

If your PHP is running on Windows you might experiment directly with the PHP win32 extension, thus calling the API directly from PHP. If your signals are generated on Linux you would run a simple PHP webserver on the Windows machine your MT4 is running. Then you send messages from Linux to Windows via HTTP, and the receiving webserver "translates" those messages to Win32 api calls to QuickChannel. This way has the advantage of logging facilities already working out of the box.

The best about QuickChannel is the fact that  you are not dependend on incoming ticks on MT4 side, communication is almost "real time". Most other solutions only poll messages at incoming ticks (the slow way).

Regards

ps: while technically possible i don't promote inter-process communication via (shared) file systems.

 
paulepanke:

Use the QuickChannel library from MT4i. It's the best and most reliable solution for MT4 inter-process communication currently available (imho). On their website they only promote signals between two or more MT4 instances but you can send/receive messages from any Win32 application.

If your PHP is running under Windows you might experiment directly with the PHP win32 extension, thus sending commands directly from PHP. If your signals are generated on Linux you would run a simple PHP webserver on the Windows machine your MT4 is running. Then you ccan send messages from Linux to Windows via HTTP, and the receiving webserver translates those messages to Win32 api calls to QuickChannel. It's fast and logging facilities are already working out of the box.

The best about QuickChannel is the fact that on MT4 side you are not depended on incoming ticks, everything runs almost real time. Most other solutions only poll messages at incoming ticks (the slow way).

Regards

This is what paulepanke mean http://www.mt4i.com/index.aspx
 
phi.nuts:
This is what paulepanke mean http://www.mt4i.com/index.aspx


thanks :-) to be exact: http://www.mt4i.com/appstore/app.aspx?id=9

If I "had to" go the file route I would - instead of calling the API - write messages to a file queue and "poll" this file queue from MQL. I would implement a simple locking mechanism to avoid load or higher then usual message traffic problems. Communication between servers still as described above, via HTTP.

 
paulepanke:

thanks :-) to be exact: http://www.mt4i.com/appstore/app.aspx?id=9

If I "had to" go the file route I would - instead of calling the API - write messages to a file queue and "poll" this file queue from MQL. I would implement a simple locking mechanism to avoid load or higher then usual message traffic problems. Communication between servers still as described above, via HTTP.

Wow! MT4i is a goldmine of a site with some great apps on it! And I just discovered it thanks to you!
 

I have some experience to share.

I wondered if the QuickChannel was as fast as they promised, so I made a simple test comparison to a handshake using files. I tested it on a notebook, 4 years old.

First results were not so impressive at all. The file handshake won being 5 times faster (14 ms x 2.5 ms on average).

I did some more investigation and I implemented a loop at the receiver part instead of relying on internal messaging.

The performance times improved substantially and the QuickChannel became a close winner ahead of the file transfer (2ms x 2.5ms on average).

The delay times were mostly uniform, but occasionally both methods showed surprisingly high delay, up to 50ms, which I have no explanation for. Perhaps the MT4 suspends threads for a while for some reason.

 

QuickChannel is very easy to use, but it shows annoying popup every time it is launched. So I cannot use it for this reason.

Has anyone compared the QuickChannel to the named pipes

 
Does any one have a example code of using quichchannel that send and receives a simple message please?
 

https://www.fxblue.com/appstore/u9/quickchannel/user-guide#toc5

There is no such limitation as Ovo describes it. He must have confused it with something else. There is also no way a file transfer can be faster or even as fast as a Windows message exchange (essentially this is what QuickChannel uses). Said that comparing QuickChannel with named pipes makes not much sense as under the hood very similar things happen (copying of data from one memory segment to another instead of going the long way via the file system). The biggest difference between both (except from the involved APIs) is that QuickChannel is much more easy to setup and maintain than a named pipe solution.

 
alphatrading:

https://www.fxblue.com/appstore/u9/quickchannel/user-guide#toc5

There is no such limitation as Ovo describes it. He must have confused it with something else. There is also no way a file transfer can be faster or even as fast as a Windows message exchange (essentially this is what QuickChannel uses). Said that comparing QuickChannel with named pipes makes not much sense as under the hood very similar things happen (copying of data from one memory segment to another instead of going the long way via the file system). The biggest difference between both (except from the involved APIs) is that QuickChannel is much more easy to setup and maintain than a named pipe solution.


Whatever. Just mind you are refering a 4Y old post, and you brough no measurement to support your statement, that writing and reading the file buffer is slower than reading and writing other block of memory. Why do you think so? 4 years ago, the bottleneck was MT4 messaging. Perhaps it is different today. Would be nice if someone can measure it like I did formerly.

 
Nonsense. The proof and measurement is included in every QuickChannel installation. Scripts and the timed results.
 
alphatrading:
Nonsense. The proof and measurement is included in every QuickChannel installation. Scripts and the timed results.

So.. would you be so kind and publish the results?
Reason: