how an if and else doesn't work??

 

in one place of my code i have and if and else related to it but not of them worked how it can happen??

cTgh is just a counter

 if(Close[cTgh+2]<Close[cTgh+1])
     {

      BE=1;

     }

   else
     {
     
BE=0;
     }
 
Seyedmasoud Hashemi: in one place of my code i have and if and else related to it but not of them worked how it can happen??
  1. "Doesn't work" is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Your problem is elsewhere, and we can't see your broken code.

    You didn't call that code, or the array was exceeded.

  2. Your code, simplified:
    BE= Close[cTgh+2]<Close[cTgh+1]);
    
              Increase Order after stoploss - MQL4 programming forum #1.3 2017.05.29