how to prevent multiple trades in one bar?

 
My EA has only up to one trade opened at any moment, but on certain bars it opens and closes mutliple trades, probably as many as the ticks in that bar. How can I prevent more than one or two trades opening in one bar?
 
Reason: