1

Is there a way to import live data quotes from MetaTrader Terminal MT4 to an external C++ program?

Or any possibility to read Excel cells in C++ via a DDE communication?

Thanks in advance

user3666197
  • 1
  • 6
  • 50
  • 92
Tinto
  • 33
  • 5

1 Answers1

1

Yes, there are.

While DDE is mentioned ( and was heavily used by REUTERS Financial Markets applications for Excel in late 90-s ), I would dare invest a dime into development relying on this technology ( just remember how many projects bled out under surprises that so many DDE-calls, working fine since 90-s suddenly started to return void // Not-Implemented in early 64-bit releases of wV et al ... never more ... ).


How to?

MT4 platform has other options to survive. Live FX Quote-stream could be smart managed by a superior, DLL-based, ZeroMQ messaging system, available both on the MetaTrader Terminal side and on C, C++, python, ... you name 'em all... many other language bindings.

This approach gives you all the control over the architecture and one can setup a truly distributed processing as needed.

If are happy with an FX-side using a MetaTrader Terminal, you would not miss aTimeDOMAIN resolution under a 1 ms treshold inside an MQL4 ecosystem ( but if interested, ZeroMQ-code can work down under to some 25 ns ).

halfer
  • 19,824
  • 17
  • 99
  • 186
user3666197
  • 1
  • 6
  • 50
  • 92
  • thank you for the information. I also made a research and found client that works without dll, it calls "Named Pipes Client" i guess it works all is required to replicate MSDN client in MQL4 and communicate with central C++ app. Dunno how far i will go but it works fine for some people. @user3666197 – Tinto Dec 10 '15 at 15:30
  • Yes, pipes were recently "built in" into **`New-MQL4.56789`**, however one shall recognise, theirs modus-operandi is O/S dependable ( and thus vulnerability not feasible for our long-term code-base ). While it is also fair to say that `New-MQL4.56789` did changed it's `DLL` interfacing ( one can imagine a nightmare for code-base maintenance once a `string` ceased to be a `string` as it silently started to be a ***hidden*** `struct` ... and we had to redesign all DLL-calls working with `string` params...) **still we consider DLL-mode to be out of MetaQuotes, Inc., control and thus more stable** – user3666197 Dec 10 '15 at 15:58
  • anyway, the `DLL` -based `ZeroMQ` framework can bring you more fruit ... **`python`** + it's smart and ready to use **Excel-reader module** + **`ZeroMQ`** as a process-integration plane towards an open, distributed client/server processing framework with **`C++`**. Isn't that smart enough? Enjoy the powers of `ZeroMQ`. **Worth a time spent on a learning curve.** – user3666197 Dec 10 '15 at 16:02
  • 1
    I already have a ready fruit, all i need is to write a code to import data from mt4 or excel DDE and send it back to the meta server, i assume ZeroMQ is perfect for HFT to send orders less than 1ms, but for me right now 300ms also fine. Thank you @user3666197 for the great responses , much appreciated – Tinto Dec 10 '15 at 16:12
  • i wish i could, need to earn 15 reputation to do that..Sry – Tinto Dec 11 '15 at 06:46
  • Thank you for your effort, i ranked as promised..:)@user3666197 – Tinto Dec 13 '15 at 00:17