Download MetaTrader 5

what is the command to "exit" a procedure ?

To add comments, please log in or register
Use MQL5 Cloud Network. It is secure!
zemo
81
zemo 2016.11.17 20:03 

 Hi,

I don't know what is the command that "exits" the function/procedure/event without execute the rest

for example my code below...

tks 

 void OnTick(){

  bool RoboON = false;

   if (checkTimeLimits(StartHour1,StartMinute1,EndHour1,EndMinute1,TimeCurrent()))

   RoboON = true;

   if (checkTimeLimits(StartHour2,StartMinute2,EndHour2,EndMinute2,TimeCurrent()))

   RoboON = true;

   if (RoboON) 

   Exit;  <=====  what is "exit" function that abort the rest of procedure ?

   ..more code ....

   ..etc 

  } 

Alain Verleyen
Moderator
30744
Alain Verleyen 2016.11.17 20:13  
return;
zemo
81
zemo 2016.11.19 02:40  
thanks
Carl Schreiber
6606
Carl Schreiber 2016.11.19 14:24  
Alain Verleyen:
return;

You forgot

void  ExpertRemove();
;)
Alain Verleyen
Moderator
30744
Alain Verleyen 2016.11.19 14:43  
Carl Schreiber:

You forgot

void  ExpertRemove();
;)

No, that's not an answer to the question : "how to exit a procedure".

ExperRemove() doesn't exit the procedure.

To add comments, please log in or register