How to use

1. Give full rights for EA’s in MT Options.

2. Copy DotNetApi.ex4 from C:\Program Files\MT4 API to the experts folder of your MetaTrader 4. For example C:\Program Files\FXDD - MetaTrader 4\experts.

3. In MetaTrader 4 Attach DotNetApi EA to ANY chart. Port parameter should be equal to input parameter during initialization of MT4 class. Use different port numbers if you need to control several MT4 platforms at the same time. 

4. Make sure that you have "smile" in up right corner of the chart.

5. Make sure that you have 'MT4 API initialized successfuly' message in logs.

6. Add MT4API.dll reference to you project in Visual Studio from C:\Program Files\MT4 API.

7. Initialize MT4 class instance.

using System;

using MT4API;


class Program


   static void Main(string[] args)


      MT4 mt = new MT4(null, 0);


8. Use instance to communicate with MT4.

Subpages (3): Backtesting DDE On quote mode