Page 1 of 1

Can an EA detect a New Bar?

PostPosted: Thu Jul 05, 2012 3:40 am
by LunaPark29
Here's another question...

Can an EA, from among all the incoming price "ticks," detect when a new bar is "born," and thus be able to (for example) bypass executing its main logic... except at the OPEN of a NEW BAR? This would be in the interests of speeding up execution of the EA.

I'm sure this question has been asked and answered before, so please bear with me.

If the answer is Yes, that it CAN detect a new bar, then please explain how this condition might be coded in MQL4.

Thanks much!

-Luna.