how to select bars of the same day alone.?

 

hi, the following is the code i am trying to use in my EA, i just wanna know how to select the intraday bars alone?

High[iHighest(NULL,0,MODE_HIGH,20,4)]
i mean, from 0 hour to current hour, i want to select the highest and lowest.
 
kmnatarajan: i mean, from 0 hour to current hour, i want to select the highest and lowest.
#define HR2400      86400           // 24 * 3600
datetime TimeOfDay(datetime when){  return( when % HR2400          );       }
datetime DateOfDay(datetime when){  return( when - TimeOfDay(when) );       }

datetime now  = TimeCurrent(),
         bod  = DateOfDay(now);                       // Beginning of the day
int      iBod = iBarShift(NULL,0, bod),
         iHi  = iHighest(NULL,0,MODE_HIGH,iBod+1,0);  // +1 include bar 0
double   Hod  = High[iHi];
 
thanks WHRoeder, the code snippet u gave me works nicely.......