Hi,
Here is a simple trigger example for greening up / distributing the loss on all selections at 30 secs before the off, regardless of the current prices.
As you can see, the trigger consists of two actions - one for greening up and another for distributing loss, both applied with -1 tick offset. This is a standard trick for closing all open bets in the market.