room25 Posted April 1, 2010 Report Share Posted April 1, 2010 (edited) Hello, i need help for Programming an Expert ! I hope you can help me ! I have two codes, the first code is for check if the MT4 is connected or disconnected: ---------------------------------------------------------------------------------------- void start() { if(IsConnected()) Print("Connected!"); if(!IsConnected()) Print("Alarm!!! Connection is lost!"); } ------------------------------------------------------------------------------------------ the second code is to start a Program: ------------------------------------------------------------------------------------------ //CHANGE BELOW!!!!!!!!!!!!!! extern string What_To_Open="C:\editor.exe"; //CHANGE ABOVE!!!!!!!!!!!!!! #define SW_HIDE 0 #define SW_SHOWNORMAL 1 #define SW_NORMAL 1 #define SW_SHOWMINIMIZED 2 #define SW_SHOWMAXIMIZED 3 #define SW_MAXIMIZE 3 #define SW_SHOWNOACTIVATE 4 #define SW_SHOW 5 #define SW_MINIMIZE 6 #define SW_SHOWMINNOACTIVE 7 #define SW_SHOWNA 8 #define SW_RESTORE 9 #define SW_SHOWDEFAULT 10 #define SW_FORCEMINIMIZE 11 #define SW_MAX 11 #import "shell32.dll" int ShellExecuteA(int hWnd,int lpVerb,string lpFile,int lpParameters,int lpDirectory,int nCmdShow); #import //+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { //---- ShellExecuteA(0,0,What_To_Open,0,0,SW_SHOW); Comment("Copyright © 2008, www.marketprogramming.com"); //---- return(0); } //+------------------------------------------------------------------+ ----------------------------------------------------------------------------------------------------- I will make it so , that the ea load the Program when the MT4 is disconnected !!! I hope you can help... Thanks for that and Best Regards... Edited April 1, 2010 by room25 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.