Asynchronous web requests for MetaTrader [closed]

陌路散爱 提交于 2019-11-29 00:05:19

Yes, there are

MT4 can directly use ready-made bindings for great platform-to-platform & process-to-process messaging library, be it ZeroMQ or nanomsg.

Having used the former for several years, MQL4 processes can form a non-synchronised ( i.e. independently of a aMarketEVENT arrival a.k.a. quote, or less exact called also a "tick" ) ExpertAdvisor->script or script->script inter-process communication solutions, that allow to build a powerful augmented GUI services for professional trading and many other features for soft real-time systems & low intensity HFT clustering.

On the other hand, one may equip MT4 EA with a few indispensable services with this same messaging technology platform:

  1. add an interactive remote-keyboard for a CLI alike interface to the running EA
  2. add a remote ( non-blocking (!!) ) file-IO for the HFT services
  3. add a remote / centralised syslog service for the ( non-blocking ) logging
  4. add a remote / clusterised GPU-based AI/ML real-time models for advanced trading

Nota bene

From the design/architecture point of view, an MT4 indicator thread has certain limitations one shall be aware of.

An otherwise common POST-based publication to a php-process on a remote WebServer will definitely take much more than a few tens of milliseconds, that are causing an un-avoidable issue for the above asked formal achitecture.

One shall rather minimise all MT4.CustomIndicator-embedded part of the processing, so as to avoid the processing to slip behind the next aMarketEVENT arrival, thus to prevent a skew in synchronicity of calculated values.

This can be achieved by dispatching all the non-core functionalities "outside" of the scope of the MT4.CustomIndicator code ( using ZeroMQ process-to-process communication framework ) and solve all the rest of the logic in a different thread, outside of the MT4. The postprocessing is the least of the issue, the handshaking and values' update & retransmit logic are the focal point of the off-loading from the very fragile thread-synchronicity of the MT4 ( one may have observed this issue to become more and more dangerous in recent Builds. Many robust augmented GUI solutions start to suffer from choppy responsiveness in Builds post 7xx and required slight adaptation of their core real-time control loops to regain their UI-robustness and their smooth UI-responsivness under heavy loads )

Do not hesitate to ask for more details on this MQL4 or HFT or other subjects.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!