Join & EARN

FOREX ALGOS { }

OnBarClosed

An event handler (and corresponding BarClosed event) that is called after a bar finishes closing. In cTraderOnBar() runs at bar open (when a new bar is formed), and OnBarClosed (the BarClosed event) is called for the last closed bar. The guide notes: “OnBar() is called for the newly formed bar; OnBarClosed() is called for the last closed bar”.