Download MetaTrader 5

I need to help Operator For Loop

To add comments, please log in or register
Enable MQL5 Storage to store your source codes. It is free!
m.sevimli
8
m.sevimli 2015.04.13 02:20 

Hi, I have to a code with Operator For 

for(i=0;i<5000;i++)

{

Print("Example"); 

//....1 

Print("Example 2"); 

//....2

so i don't want to wait until  i<5000 but i need //....1  and //....2 how can i run both of at same time ? Does know anybody that problems' solution ?

I think its shouldn't impossible...

Thanks for your care

Best Regards... 

Biantoro Kunarto
14899
Biantoro Kunarto 2015.04.13 08:54  

Hi, I am not sure about your question, but maybe this is the solution for you

      for(i=0;i<5000;i++)
      {
         if ( i == 1 ) Print("Example 1"); 
         if ( i == 2 ) 
            {
               Print("Example 2"); 
               break;
            }
      } 
Irwan Adnan
886
Irwan Adnan 2015.04.14 05:59  

Perhaps the following too :

 

Print("Example 2"); 
//....2

for(i=0;i<5000;i++)
{
   Print("Example"); 
   //....1 
} 

  

for(i=0;i<5000;i++)
{
   Print("Example"); 
   //....1 

   Print("Example 2"); 
   //....2

} 
To add comments, please log in or register