Jump to content

Need help, i will two codes make it to one code !


room25

Recommended Posts

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 by room25
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...