**JoBlo:**

Hi all, I was just wondering if anyone could let me know if i am on the right track. I am trying to make an

EA which measures the highest point and lowest point for the first 4 (1 hour) bars of each new day.

I know how to check for new day :

bool IsNewDay()

{

static datetime OldDay = 0;

if(OldDay < Day())

{

OldDay = Day();

return(true);

}

else

{

return(false);

}

}

And I know how to check for high/low :

double high = iHighest(Symbol(),PERIOD_H1,MODE_HIGH,4,0)

double low = iLowest(Symbol(),PERIOD_H1,MODE_LOW,4,0)

My problem is, how do I make the EA check only the bars after the new days has started, ie, once the EA confirms that

there is a new day, if I tell it to check the highest/lowest values for the last 4 (1 hour) bars, it will check bars that were in

the previous day. I need it to only count the bars of the new day.

Would I need to sleep the EA for 4 hours ?? :)

I hope my rambling makes sense haha. Any help would be appreciated...thanks.

Use SRC button to display your code

The first H4 bar of the day is giving you also this value so when iTime 4hour bar is same as daily bar you can take the high and low of that bar

Hi all, I was just wondering if anyone could let me know if i am on the right track. I am trying to make an

EA which measures the highest point and lowest point for the first 4 (1 hour) bars of each new day.

I know how to check for new day :

And I know how to check for high/low :

My problem is, how do I make the EA check only the bars after the new days has started, ie, once the EA confirms that

there is a new day, if I tell it to check the highest/lowest values for the last 4 (1 hour) bars, it will check bars that were in

the previous day. I need it to only count the bars of the new day.

Would I need to sleep the EA for 4 hours ?? :)

I hope my rambling makes sense haha. Any help would be appreciated...thanks.