0

I'm building desktop MEAN ( MongoDB Express Angular NodeJS ) stack app, but I need to have an access to real time ( update on detected change ) currency exchange rates. In Excel, I can get a rate from MT4 easily with just 1 line code inside a cell, if MT4.exe is runing.

What I want is to somehow access the data with javascript, for example the EUR/USD rate.

Is it possible or does it need any 3rd party libraries?

user3666197
  • 1
  • 6
  • 50
  • 92
Georgi Antonov
  • 1,581
  • 21
  • 40

2 Answers2

1

Take a look at:

From the docs: "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."

rsp
  • 107,747
  • 29
  • 201
  • 177
1

In case a running MT4.exe process is allowed:

The forward-looking solution may use ZeroMQ messaging framework ( both NodeJS and MQL4 ports/wrappers exist ).

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 )


In case a running MT4.exe process in NOT allowed at all:

This scenario tests gray zone of legal protection of the MetaQuotes' intellectual property. Technically one can open and read a telnet <MT4server>:443 and experiment with a stream of QUOTE messages incoming, but beware this may cause some legal countermeasures from MetaQuotes, and the history has shown a few of 'em. So, you have been warned.

user3666197
  • 1
  • 6
  • 50
  • 92
  • I just need 8 currency exchange rates nothing more and the app is for personal use, not for selling or anything else. – Georgi Antonov Nov 22 '16 at 09:15
  • **"just" 8?** Well, this makes your scenario more vulnerable to method 1) which uses synchronous / blocking mode of operations. Distributed concurrent processing is a must even for a single currency AI/ML models, where RTT-s between MT4 and ML-predictors are well under 80 ms, but FX-market cadence of events is anywhere between 1..15 ms, so **a non-blocking pipeline of concurrent processes is a must just for the first currency, if a serious processing of FX-market events is expected.** – user3666197 Nov 29 '16 at 10:35