Highest H1 Open on the current day

 

Hi all, I'm trying to write an .mqh file to find the highest H1 Open for the daily bar.

Could you help me? Thank you!

double HIGHEST_H1_OPEN;       

double HIGHEST_H1_OPEN() 
       {

   for(u=Hour()-1; u==0; u--)

   if ( ???? ) 
      {
      HIGHEST_H1_OPEN  = iOpen(NULL,PERIOD_H1,u) ;
      u = 0
      }
   
return(HIGHEST_H1_OPEN);
          
}
 
Please check iHighest() and iHigh()
 
for(u=Hour()-1; u==0; u--)

Not a valid condition for a loop as it will only execute when u equals zero.