Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

作者你好,我这边没使用成功 #1

Open
hucs2542 opened this issue Aug 30, 2018 · 22 comments
Open

作者你好,我这边没使用成功 #1

hucs2542 opened this issue Aug 30, 2018 · 22 comments

Comments

@hucs2542
Copy link

按你文档的说法做了,安装了相对应版本的python都一直卡在
prices = trade.get_data(symbol=symbol, timeframe='H1', start_bar=start, end_bar=end)
这行上。。。

@ns2250225
Copy link
Owner

@hucs2542 这里的symbol默认是EURUSD,你要修改成图表上面的才行,要保持一致

@hucs2542
Copy link
Author

@ns2250225你好,symbol是一致的,这点我是确认过的

@ns2250225
Copy link
Owner

@hucs2542 你可以看下MT4里面的EA日志,看有没有问题

@hucs2542
Copy link
Author

2018.08.31 22:57:09.153 ZeroMQ_MT4_EA_Template_Edited EURUSD,H1: global initialization failed
2018.08.31 22:57:09.152 ZeroMQ_MT4_EA_Template_Edited EURUSD,H1: unresolved import function call
2018.08.31 22:57:09.152 Cannot call 'libzmq.dll::zmq_ctx_new', 'libzmq.dll' is not loaded
2018.08.31 22:57:09.152 Cannot load 'C:\Users\Administrator\AppData\Roaming\MetaQuotes\Terminal\3294B546D50FEEDA6BF3CFC7CF858DB7\MQL4\Libraries\libzmq.dll' [126]
2018.08.31 22:57:00.280 ZeroMQ_MT4_EA_Template_Edited EURUSD,H1 inputs: PROJECT_NAME=DWX_ZeroMQ_Example; ZEROMQ_PROTOCOL=tcp; HOSTNAME=*; REP_PORT=5555; PUSH_PORT=5556; MILLISECOND_TIMER=100; t0=--- Trading Parameters ---; MagicNumber=123456; MaximumOrders=1; MaximumLotSize=0.01; Slippage=3;
2018.08.31 22:57:00.279 Expert ZeroMQ_MT4_EA_Template_Edited EURUSD,H1: loaded successfully
@ns2250225

@ns2250225
Copy link
Owner

@hucs2542 日志里说:'libzmq.dll' is not loaded,你设置一下EA允许加载外部dll和允许自动交易试试

@hucs2542
Copy link
Author

hucs2542 commented Sep 1, 2018

@ns2250225 我允许实时自动交易,允许导入动态连接库,允许导入外部EA交易都勾了

@ns2250225
Copy link
Owner

@hucs2542 可能是杀毒软件把 libzmq.dll 和 libsodium.dll 删除了,你检查一下目录下有没有这个文件

@hucs2542
Copy link
Author

hucs2542 commented Sep 1, 2018

@ns2250225 我没有删毒软件,那两个文件也还在目录下面

@hucs2542
Copy link
Author

hucs2542 commented Sep 1, 2018

就连360也没装

@ns2250225
Copy link
Owner

@hucs2542 另外,如果是windows运行的话,需要C++的运行环境,The DLLs require that you have the latest Visual C++ runtime (2015)

@wxchung
Copy link

wxchung commented Oct 29, 2018

我也是不能使用一直都是如下
2018.10.30 00:43:22.292 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 0) DATA
2018.10.30 00:43:22.292 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: Parsing: DATA|HSI|PERIOD_M1|0|2401
2018.10.30 00:43:22.183 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: ZMQ: Interpreting Message..
2018.10.30 00:43:22.183 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 4) 2401
2018.10.30 00:43:22.183 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 3) 0
2018.10.30 00:43:22.183 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 2) PERIOD_M1
2018.10.30 00:43:22.183 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 1) HSI
2018.10.30 00:43:21.627 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 3) 0
2018.10.30 00:43:21.627 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 2) PERIOD_M1
2018.10.30 00:43:21.627 ZeroMQ_MT4_EA_Template_Edited HSI.fs,M5: 1) HSI

@igithub2019
Copy link

同样的问题,有人解决了吗

@ns2250225
Copy link
Owner

@igithub2019 Library文件夹下面的libsodium.dll和libzmq.dll是32位的,你的系统可能是64位的,要找相应64位的dll

@igithub2019
Copy link

这两个DLL库是直接网上下载64位的就可以用吗,还是如网上所说要自己编译生成

@igithub2019
Copy link

image

@igithub2019
Copy link

下载了64位libzmq.dll提示不是32位的,所以我依然使用了压缩包提供的,但提示zmq_socket不允许调用,这个是权限的问题吗

@ns2250225
Copy link
Owner

@igithub2019 MT4里面的设置里面要勾选允许外部DLL调用

@igithub2019
Copy link

image
image
不知道为啥上面的一直是个哭脸,还有啥没搞对呢
image

@ns2250225
Copy link
Owner

@igithub2019 这个应该是你没按【自动交易】这个按钮

@igithub2019
Copy link

是的是的,跑起来了,修改参数后已经有单入场,谢谢作者

@igithub2019
Copy link

请问你这个可以读取MACD\DEM\布林轨信号吗

@herogui
Copy link

herogui commented Apr 11, 2019

timeframe='H1' 那么图表的时间周期应该是小时

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants