Highest H1 Open on the current day

To add comments, please log in or register
Alberto Tortella
680
Alberto Tortella  

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);
          
}
Marco vd Heijden
Moderator
8808
Marco vd Heijden  
Please check iHighest() and iHigh()
Keith Watford
Moderator
15733
Keith Watford  
for(u=Hour()-1; u==0; u--)

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

To add comments, please log in or register