The idea is to have 2 block chains under "on Tick" like this:
No buys => Check condition to open new Buy => Close all trades (or only sells, but there are no buys anyway) => Create new Buy
No sells => Check condition to open new Sell => Close all trades (or only buys, but there are no sells anyway) => Create new Sell
Depending on the condition "Once per bar" can be used somewhere to speed up the backtesting (actually not checking conditions when there is no need to) or to limit the number of trades in one bar in case you got both conditions within a very short period of time.