Problem in "if" condition

 

The if condition is true, but it don t execute the code ,  The code is working, it works without the "if" condition, but when I put it in the "if" condition it work one or 2 times than It don t work anymore

int order =NBOrders();
  
   if(order==0)
   {
   Code1;
   }else if(gagneS == ask)
   {
   Code;
   }

 
  1. SabDark: The if condition is true, but it don t execute the code

    Prove it.

    Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?

  2. else if(gagneS == ask)

    Doubles are rarely equal. Understand the links in:
              The == operand. - MQL4 programming forum #2 2013.06.07