构建从本地 MetaTrader 4 终端获取数据的 Electron MEAN 堆栈应用程序

Building Electron MEAN stack APP which gets data from local MetaTrader 4 Terminal

我正在构建桌面 MEAN ( MongoDB Express Angular NodeJS ) 堆栈应用程序,但我需要访问实时(检测到的变化更新)货币汇率。在 Excel 中,我可以通过单元格内的 1 行代码轻松地从 MT4 获得汇率,if MT4.exe is runing.

我想要的是以某种方式使用 javascript 访问数据,例如 EUR/USD 速率。

是否可能或是否需要任何第 3 方库?

看看:

来自文档:"This demonstrates how you can communicate between a Node.js server and a MT4 client application quickly. There are no delays and the connection/calculations are done on the same tick."

如果允许 运行 MT4.exe 进程:

前瞻性的解决方案可能会使用 ZeroMQ 消息传递框架(NodeJS 和 MQL4 ports/wrappers 都存在)。

1) Using a http-wrapped JSON is way "too"-expensive in real-time FX-events processing.
2) Using a ZeroMQ-framework allows one to integrate against a remote (M+N)-shaded fault-resilient group of processors ( performance scaling / load-balancing + a fail-safe distributed system )


如果 运行 MT4.exe 进程根本不允许:

这个场景测试了MetaQuotes知识分子法律保护的灰色地带属性。从技术上讲,人们可以打开并阅读 telnet <MT4server>:443 并尝试接收 QUOTE 消息流,但请注意这可能导致 MetaQuotes 采取一些法律对策,历史已经证明了其中的一些。所以,你已经被警告了。