Download MetaTrader 5
To add comments, please log in or register
What are the latest MQL5.community news? The Wall section will tell you!
chua le
234
chua le 2015.07.31 09:52 
1: int start()
2: { 
3:
4: if( code 1)
5:   {
6:
7:    if (code 2) 
8:     {
9:      code 3;
10:     code 4;
11:     return(0);
12:    }
13:     
14:   if (code 5) 
15:    {
16:    code 6;
17:    code 7;
18:    return (0);
19:    }
     
return(0)
     }

Hello,

  

How can I loop back to int start() after line 12  if the condition is right without executing the subsequent lines? Does the return(0) in line 11 loop back to int start()? Thank you.  

Ovo Cz
2986
Ovo Cz 2015.07.31 11:05  
Not sure at all if you do understand what you are doing, but typing
start();
on the line 13 would jump to the line 1.
whroeder1
13941
whroeder1 2015.07.31 11:48  
chuale: Does the return(0) in line 11 loop back to int start()?

Returning from start goes to the terminal. Then when a new tick arrives, start is called again.

You do not want to recursively call start.

/
To add comments, please log in or register