vdemydiuk / mtapi

MetaTrader API (terminal bridge)
http://mtapi4.net/
MIT License
511 stars 276 forks source link

Call .Exe when attach EA. Question #256

Closed willfant closed 3 years ago

willfant commented 3 years ago

Is there a way to open the .exe file (the TestMTApi for exemple) when we attach the EA in the chart? For MT4.

Thank you!

willfant commented 3 years ago

I just found it. Using:

import "shell32.dll"

int ShellExecuteW(int hWnd,int lpVerb,string lpFile,string lpParameters,string lpDirectory,int nCmdShow);

import

ShellExecuteW(NULL,"open","path\test.exe",NULL,NULL,1);