Hi
It's probably the Betfair in-play delay.
As you say you can use a lay trigger:
Price: r_ticks(lay_price, 5) this will lay at 5 ticks higher than best lay price, replace 5 with how many ticks higher you want to lay
OR
Price: best this will be matched at best available lay price
The formula for the amount for equal profit or loss on all selections is (bm_backp*bm_backa)/lay_price
Use conditions to make sure you are getting a reasonable lay price, for example, no more than 10 ticks spread between best back and lay prices:
and selections trigger expression g_ticks(back_price, lay_price) is equal or less than 10
As another option you could add another trigger to match unmatched lay bets at best available price:
trigger action: match lay unmatched bets
and use similar conditions to above
And another option you can use is the Stop Loss Options in the Settings, for example:
match unmatched bets: If a bet was placed 1.00 mins ago or earlier
in this case your trigger would fire the distribute loss, and if it was unmatched 1 minute later, it would then be matched at the best available price
please use test mode for testing these