MT4 monitor (MetaTrader 4 DDE client in Visual Basic 6)


Hi folks,

One of MetaTrader numerous features is the built-in DDE server. The MetaTrader DDE server enables you to communicate with the terminal from your Visual basic or Excel application (or whatever the tool you use to write your applications) and get a real time data.

What's the DDE?

DDE stands for Dynamic Data Exchange. DDE enables two running applications to share the same data. The program who we capture the data from called "DDE server" . And the program who captures the data from server called "DDE client". For example, in our program today we will capture the data from MetaTrader and show it in Visual basic, whenever the MetaTrader data changes, the Visual basic data changes accordingly.

Our DDE client:

There's a DDE simple has shipped with MetaTrader wrote in Excel (DDE-Sample.xls).
I have converted it to Visual Basic with some improvements (Ex: a full pairs list) and I'll improve it upon your request.

How to run the program:

1- From the MetaTrader Tools menu choose Options and in the Server tab check Enable DDE server option (Figure 1).

mm1
Figure 1 - Enable DDE server

2- Run mt4monitor.exe (Figure 2).

mm2
Figure 2 - Run MetaTrader Monitor

3- Choose the currency pair you want to monitor .
4- Enjoy!
5- Send me your comments.