We added a new BarClosed event to Automate API. When coding a cBot, you can choose a triggering event: the closing of one bar or the opening of another. Find out more in our Help Center.