OnBar is a cTrader Algo event method that is called when a new bar is formed. Developers can use it to evaluate strategy conditions at bar intervals rather than on every price tick.