How to find values for 24hrs?

 

Hi!

I like to take high/low of last 24 candle in 1hr chart.

eg: 01AM GMT(yesterday) to today 01AM(today).

how to filter the above time periods?

when i try which filter current 01am candle high/low only. Please help me to solve this issue.

#define  YONEAM 01
#define TONEAM 01
oneAM=0; while( TimeHour(Time[oneAM]) != TONEAM ) threeAM++;
EJHigh1To1 = iHigh(NULL,PERIOD_H1,iHighest(NULL,PERIOD_H1,MODE_HIGH, TONEAM-YONEAM+1,oneAM));
EJLow1To1 = iLow(NULL,PERIOD_H1,iLowest(NULL,PERIOD_H1,MODE_LOW, TONEAM-YONEAM+1,oneAM));
 

What is this supposed to do?

oneAM=0; while( TimeHour(Time[oneAM]) != TONEAM ) threeAM++;
Reason: