СIsNewBar class allows to determine the moment of a bar change. Usually IsNewBar() function is used for such things instead of a class. But such a function contains a static variable, and therefore we cannot use several calls of this function. To be able to reuse such function repeatedly in Expert Advisor's code, it would be much easier to make it a
class member. In this case that has been accomplished using IsNewBar.mqh.
Author: Nikolay Kositsin
There is a little bug in your class (as in most of the functions I saw the code). First time you call you method IsNewBar, it always return true, irrespective of the existence of a real new bar.
But such a function contains a static variable, and therefore we cannot use several calls of this function.
One can also use a two dimensional array to keep last bar open time.