Scenario:- Betfair shows BACK odds of 6.00; Lay Odds of 6.40
I will place a BACK bet at 6.60 for £1 if there is between 20 & 60 seconds to go before the scheduled off. No MATCH = no further bet. If MATCHED then I want to place a LAY bet at 6.00 for £1. If MATCHED with 5 seconds to go to the scheduled off then

a) If the LAY bet is UNMATCHED with 5 seconds to go then I want to place a LAY bet at whatever LAY odds are available.
or
b) if the LAY odds drift to, say 4 ticks above the 6.60 BACK odds leading up to the 5 seconds before the off (i.e. 7.40 LAY odds) then I want to place a LAY bet at those odds - i.e. that's my stop loss!!
Best case scenario, it looks as if I need to use BACK-F40-TL3 to place the initial bet, but I'm struggling to work out what I need for a) &/or b).