Start the EA
- Double-click MetaPortAPI in the Navigator, or drag it onto any chart. The symbol and timeframe of the chart don’t matter.
- On the Common tab, tick Allow Algo Trading.
- On the Dependencies tab, tick Allow DLL imports. MetaPortAPI uses Windows’ own
ws2_32.dllto open network ports. - Optionally change ports or safety settings on the Inputs tab.
- Click OK.
Make sure the Algo Trading button in the MT5 toolbar is switched on (green) if you want to place orders. For read-only use (prices, history, indicators) it can stay off.
Check that it is running
Section titled “Check that it is running”Open the Experts tab at the bottom of the terminal. You should see:
MetaPortAPI: listening on TCP 81 (localhost only)MetaPortAPI: listening on TCP 77 (localhost only)MetaPortAPI: listening on TCP 78 (localhost only)If you see cannot open TCP port 81 … port already in use, another program (or another terminal running the EA) already uses that port. Pick a different port in the inputs.
Next: Send your first request.