opentrading / otmql4zmq Goto Github PK
View Code? Open in Web Editor NEWOpen Trading Metatrader 4 ZeroMQ Bridge
License: MIT License
Open Trading Metatrader 4 ZeroMQ Bridge
License: MIT License
Not quite sure why it works or what i exactly did but increasing the iRequestPtr size from 1 to 32 (line 80 ZmqSendReceive.mq4) seems to fix the access violation and therefore to enable receiving messages via zmq_recv.
If anybody knows why this is working or has an explaination for me i'd love to know what i'm doing here, hehe.
I've built the mql4zmq.dll against together with the latest version of zmq+libsodium with the trivial changes needed to make it run with zmq>2.
cheers
see:
https://github.com/OpenTrading/OTMql4Zmq/blob/master/MQL4/Experts/OTMql4/OTZmqCmdEA.mq4#L20
This file should have a non-legacy counterpart in ./MQL4/include/OTMql4 directory
It requires a bunch of unavailable .mqh files. Is this expected?
Hi!
I created a simple client in mql4 to communicate with my java program on port 5555.
0MQ_client.txt
Unfortunately zmq_send() & zmq_recv() return "-1" and zmq_errno() for both of them returns 14, which corresponds to "Bad address" error message.
Could you tell me what might be the problem?
Essential informations:
Thank you in advance!
Sorry for putting this question here: Didn't find any other place to contact the developers.
I would like to know if this will work with Metatrader 5. And if not, is there any plans to port it to Metatrader 5.
Where can I get this function?
Some links like the one in Readme.creole:
Metatrader using OTMql4Py (https://github.com/OpenTrading/OTMql4Py).
Leave the closing ) as part of the url. Then the url
https://github.com/OpenTrading/OTMql4Py)
Is 404,
Could we switch to an alternate creole url syntax or leave a space after url end to mitigate the broken url issue?
When I attach OTZmqCmdEA to a chart.
I get lots of these messages, about 10 per second:
2015.08.18 18:26:24.621 OTZmqCmdEA EURUSD,H4: s_recv: Warning! Message has zero length.
Oninit: Using zeromq version 2.2.0
MT4 Build 854
I wonder if it could be related to: #1
The first 16 bytes of a message published from OTMql4Zmg are sometimes (not always)
garbled, including nulls. The rest of the message is fine. The workaround it to pad the
message with 16 bytes.
I checked with wireshark and it is garbled in the transmission.
I checked in Mt4 and it is going to the dll OK - StringToCharArray is not the culprit.
Pity I can't run metatrader under a debugger...
it tell can not find files...
it many files. Please Check
Metatrader says it cannot open mql4Zmq.ex4 file. First I fixed the import on the OTMql4Zmq.mq4 expert advisor so it includes OTMql4Zmq.mqh. But then when I compile both .mqh and .mp4 I get errors. "uAnsi2Unicode - function not defined on OTMql4Zmq.mqh"
I used dependency walker to check the mql4zmq.dll and it says: "Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module."
I tried everything from putting all the required .dll's in the same folder or different versions and nothing works
I am working on Linux, running Metatrader 64 bit, build 1010 with wine. I am using the pre-compiled libs from git.
Hi,
i'm pretty new to python so i'm not sure if i'm doing anything wrong but running OTPyTestZmqEA.ex4 fails with the following message:
2015.11.26 10:28:21.576 2015.06.01 00:00 OTPyTestZmqEA EURUSD,M1: PANIC: PANIC: import zmq failed:<type 'exceptions.WindowsError'> : [Error 126] Das angegebene Modul wurde nicht gefunden
which basically means the module wasn't found in english.
reading the logfile it seems that there is a problem when including the file libsodium.pyd:
vPyInit - Thread Dummy-3 number 13360
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python27\lib\site-packages\zmq\__init__.py", line 45, in <module>
_libsodium = ctypes.cdll.LoadLibrary(bundled_sodium[0])
File "C:\Python27\lib\ctypes\__init__.py", line 431, in LoadLibrary
return self._dlltype(name)
File "C:\Python27\lib\ctypes\__init__.py", line 353, in __init__
self._handle = _dlopen(self._name, mode)
WindowsError: [Error 126] Das angegebene Modul wurde nicht gefunden
INFO : vPyDeInit Closing outfile
i did some digging but can't come up with the reason why it can't find the module as it is where bundled_sodium[0] is pointing. Furthermore importing zmq via import zmq in the python cli does work without any problems, which makes me wonder if there is some kind of difference in how the python process is handled when created by OTMql4Py.
I'd appreciate some help.
Thanks
Essential information for reporting Issues:
Works fine sending etc. but whenever my program exits I am always getting a lot of strings leaked. Literally just using the example EA to send mkt data updates on each new tick. Any insight would be great.
I installed from source (latest version). After copying all the files I saw that the libraries mq4 are compiled to ex4 successfully. However, when I try to compile the EA, I'll got these errors:
'OTMql4/OTLibLog.ex4' - #import was not closed OTLibLog.mqh 9 9
'OTMql4/OTLibStrings.ex4' - #import was not closed OTLibStrings.mqh 13 9
'OTMql4/OTLibSimpleFormatCmd.ex4' - #import was not closed OTLibSimpleFormatCmd.mqh 9 9
'OTMql4/OTLibJsonFormat.ex4' - #import was not closed OTLibJsonFormat.mqh 6 9
'OTMql4/OTZmqProcessCmd.ex4' - #import was not closed OTZmqProcessCmd.mqh 6 9
'OTMql4/ZmqSendReceive.ex4' - #import was not closed ZmqSendReceive.mqh 12 9
Anyone has the same issue like me?
I think their is a left over comment:
https://github.com/OpenTrading/OTMql4Zmq/blob/master/MQL4/Experts/OTMql4/OTZmqCmdEA.mq4#L4
Hi there,
I'm facing a issue with OTMql4Zmq and I'm not sure if that's because of Win10 or the problem is between the screen and the back of a chair.
I copied all files (+OTMql4Lib) and I can load the OTMql4ZmqTest script.
Result:
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: TestErrorMessages 8 failed
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 115 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 111 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 99 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 98 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 100 'Address in use' != 'Address in use'
2016.05.12 14:39:51.158 OTMql4ZmqTest USDCHF,H1: WARN: 105 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.157 OTMql4ZmqTest USDCHF,H1: WARN: 93 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.157 OTMql4ZmqTest USDCHF,H1: WARN: 95 'Unknown error' != 'Unknown error'
2016.05.12 14:39:51.156 OTMql4ZmqTest USDCHF,H1: initialized
So basically every test fails and I have no idea why.
My idea is to connect MT4 to a java server (this works already) and listen to it.
Essential information for reporting Issues:
Thank you in advance,
scarya
EDIT: just found out, that the CmdEA is working...
I installed everything including OTMql4Zmq, OTMql4Py and OTMql4Lib. There are some #import keywords missing for some header files in OTMql4 so that the compilation in MT4 failed. I fixed that locally. I suggest you to update and change them. Another problem I encountered is
Cannot call 'OTMql4/mql4zmq.dll::mql4zmq_strerror', 'OTMql4/mql4zmq.dll' is not loaded
When I am trying to drag script OTMql4ZmpTest to one graph.
Cannot call 'OTMql4/mql4zmq.dll::mql4zmq_init', 'OTMql4/mql4zmq.dll' is not loaded
When I am trying to use EA called OTZmqCmdEA. Do you know why this happened? I tried to find some hints from wikis of your git repo but cannot. Please help me!
My windows is 64 bit windows 8. Metatrader 4.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.