Hi
A few things:
the user variable needs to be initialised either through a trigger or using a constant
the variable Lay_price should be lay_price
I would set the market status to in-play because Actual SP is only known then
and finally I suggest to swap the conditions around so the selection is defined first, because otherwise the trigger is looking at all selections whose lay price is increasing.
please see the attached screenshot, this should do what you are after.
btw perhaps have a look at the variables traded_maxp and maxlp_{minutes}