Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2010.11.22 09:35
Libraries

ZeroMQ asynchronous communication - library for MetaTrader 4

| English Español Português 日本語 Deutsch

Views:
11188
Rating:
votes: 10
commando.zip (525.39 KB)
zmq.mq4 (1.42 KB)view
zmq.zip (713.74 KB)

ZEROMQ

These are partial bindings to the zeromq library along with a demo of a zeromq tcp socket. If anyone makes more complete bindings please share! I might if i need all of the features. Linux wine version also included.

http://www.zeromq.org/

Quote:

"Ø  The socket library that acts as a concurrency framework.

Ø  Carries messages across inproc, IPC, TCP, and multicast.


Ø  Connect N-to-N via fanout, pubsub, pipeline, request-reply.


Ø  Fast enough for clustered products and supercomputing.


Ø  Asynch I/O for scalable multicore message-passing apps.


Ø  Large and active open source community.


Ø  20+ languages including C, C++, Java, .NET, Python.


Ø  Most OSes including Linux, Windows, OS X.


Ø  LGPL free software with full commercial support."

And its very simple to use. Notice that you cant automatically connect to a raw socket, we're connecting zeromq to zeromq here. Though i think there is support for adding raw sockets into a network using zeromq_poll, though i haven't bound that yet.

VERSION 2: precompiled libs for windows and linux x86 32 bit added (using zeromq version 2.0.10). Added cmake build script for windows. Updated zeromq script so that it uses port 127.0.0.1, instead of 'localhost' which doesnt work. And most importantly fixed a shared memory bug between mql4 and zeromq library - basically we now copy strings sent to our wrapper library and copy new strings when we request data from a message. Note that there is no check if malloc returns null in sample code, maybe that should also be included for rare cases when not enough memory is available? So we dont crash metatrader by trying to pass in a null pointer? I'll test this soon..


VERSION 3: pub/sub, multipart send (no receive), polling on one socket, no more using of raw messages (automatically created/deleted). Added commando and pub/sub example, updated other example. NOTE: i dont know how to safely destroy a poll object, i tried free(ptr) and metatrader crashes. if anyone can help here....

VERSION 3.2: added multi part receive (through z_more), added sending of double arrays and int arrays, refactored commando example (and demonstrate array sending). changed window dlls to release. added linux libzmq.so

VERSION 3.3: updated commando example to include multipart receive. And also majorly changed it to make more efficient. Also included GUI.mqh


UPDATE : modified commando.zip to include an executable (commando.exe) that will install the newest version of libzmq and bindings and sample commando program along with a python interface. This might be a quick fix for problems mentioned below. So just run commando.exe....

Emilio's Trend Line Breakout  Alerter Emilio's Trend Line Breakout Alerter

The Alerter simply works on 1 or 2 trendlines and plays a sound file when the trendline has been broken so the only think you must do is name correctly the trendlines.

STP-Entry Framework Daily V1 STP-Entry Framework Daily V1

Stop-Orders are used to enter a position. Pending orders and postions are handled based on a daily system. Risk and money management are included as well as time and dayfilters. The entry logik (STP-value calculation) can be easily changed.

Doda-Trend Doda-Trend

Shows whether the market is trending or range-bound. Must to note before opening any position.

SimpleMarketInfo SimpleMarketInfo

Shows upcoming news events 1 hour before and 30 minutes after event. Also shows active sessions etc.