Problem with while

 

Hello everyone. I have a problem that is really driving me crazy. I don't understand why the if of the while is not activated. I already checked (with the prints) that the values are valid enough to enter, but it doesn't happen and the while continues executing skipping the if. Can someone explain me what is happening here?

while(whileBool)
     {
      datetime a = tz.ConvertTimeForPlace(TimeH1[i],ZONE_ID_BROKER,ZONE_ID_UTC);
      datetime b = tz.ConvertTimeForPlace(TimeH1[i+1],ZONE_ID_BROKER,ZONE_ID_UTC);
      TimeToStruct(a,dateTimeH);
      TimeToStruct(b,dateTimeHNext);
      Print("i: "+i);
      Print(dateTimeH.day);
      Print(dateTimeHNext.day);
      
      if(dateTimeH.day=!dateTimeHNext.day)
        {
            Print("here 2");
            int validateDay=dateTimeHNext.day;
            int x=i+1;
            while(whileBool)
              {
               datetime c = tz.ConvertTimeForPlace(TimeH1[x+1],ZONE_ID_BROKER,ZONE_ID_UTC);
               MqlDateTime mqlDTForCheck;
               TimeToStruct(c,mqlDTForCheck);
               
               if(HighH1[x]>yesterdayHigh)
                 {
                     yesterdayHigh = HighH1[x];
                 }
               if(LowH1[x]<yesterdayLow)
                 {
                     yesterdayLow=LowH1[x];
                 }
               if(validateDay=!mqlDTForCheck.day)
                 {
                     whileBool = false;
                 }
               
               x++;
              }
        }
      
      i++;
     }
 
I'm retarded, the if has "=!" instead of "!=".
Reason: