Maybe someone can help me ?

On each day I have 2 signals:
a)Buy then Sell
b)Short then Cover

How to make Amibroker after second signal not to open (reverse) another trade the same day ?
In other words - I don't want to be all the time in the market.

Code in AFL would be very appreciated.