Help with iAlligator function

 

In my mql code, I want to make the bequal variable true when the jaws and teeth of the iAlligator indicator are equal. So I wrote the following code. Unfortunately, it never makes the variable true, even when the jaws and teech are equal. I am not sure why the problem is. Could anyone help please?

   double curr_jaw= iAlligator( NULL,0,J_Period,J_Shift,T_Period,T_Shift,L_Period,L_Shift,MODE_SMMA,PRICE_CLOSE,MODE_GATORJAW,1);

   double curr_teeth= iAlligator( NULL,0,J_Period,J_Shift,T_Period,T_Shift,L_Period,L_Shift,MODE_SMMA,PRICE_CLOSE,MODE_GATORTEETH,1);

   if (curr_jaw==curr_teeth)

   {

      bequal=true;

      SendMail("Jaws and Teeth are equal",Symbol()); 

   }

In the beginning of my code, I already declared bequal after my extern variables

bool bequal=false;


I am not not why this code is not working. Any help is greatly appreciated.

 

Doubles are very rarely equal.

   if (MathAbs(curr_jaw-curr_teeth)<Point*10)

   {

      bequal=true;

      SendMail("Jaws and Teeth are equal",Symbol()); 

   } 
   
   else
   
      bequal=false;