# Check if window bar completed
if self.window == 7:
if (bar.datetime.minute + 1) % 7 == 0:
self.on_window_bar(self.window_bar)
self.window_bar = None
else:
if not (bar.datetime.minute + 1) % self.window:
self.on_window_bar(self.window_bar)
self.window_bar = None