Download MetaTrader 5

Exit from if statement and loop back to int start()

To add comments, please log in or register
chua le
234
chua le  
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.  

Ex Ovo Omnia
3230
Ex Ovo Omnia  
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
15093
whroeder1  
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