Cycle while and condition false for loop - page 2

 
bool A= false;

while
(A==false) 
{ // Do something that may/will change the value of A to true }   

also you need an escape in case nothing will change it to true.

 

I made this change to change the status of A fale to true:

int A  = false;
int N1 = 1+i;

A=  Close[N1] < Sell;          
         
           
      //Indicator Buffer 1 Sell     
        if (a1)
        
        while
        ( A==false )
        { N1--;}

 // Again I can not exit the loop, then I added this option but the editor gives me error that expression has no effect:

     { N1--; N1 <= 10;} //expression has no effect
 
        while
        ( A==false )
        { N1--;}

I'm sorry to be blunt, but it seems that it is impossible to help you.

We can't keep repeating the same thing over and over, you are just wasting the time of people that are trying to help you.

 
fly7680:

I made this change to change the status of A fale to true:

Before you can code in MQL4, you should first learn how to code in general. A "while" loop is one of those basic things that you should learn how to use properly.

Here is a link on Wikipedia on the subject with a graphical flow diagram that might help you understand. It also shows how the "while" loop is used in many, many languages. Have a look at the one for C & C++ as that is the form used by MQL4 too.

Also, here are a few links for sites that offer tutorials and learning for "C" that will also help:

 
Thanks again for your patience and all the advice that you gave me, I will study carefully from these links you posted me.