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.
Download (Executable and source code):
MM.zip (8.67 KB)
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).
2- Run MM.exe (Figure 2).
3- Choose the currency pair you want to monitor (Figure 3).