Hi mcbee,
Okay I am a bit fresher this morning, so let me have a go at explaining my set of triggers.
I'll describe the formulas in words rather than code is places.
Bear in mind I have two sets of triggers one for each index.
I'll just list index 1 here.
Firstly bets are only placed on the favourite.
the trigger1 will place a back and lay bet x ticks either side of the current back price.
When one is matched the other one is cancelled.
so the basic conditions are
and selection's index is equal to 1
and rank is equal to 1
The next time a bet is placed is if the Index 2 trigger selection becomes favourite.
Then trigger2 will place a back and lay bet x ticks either side of the back price.
when one is matched the other one is cancelled
Herein lies the problem.... if the former fav has a matched back bet then the new fav has a matched lay bet that would double the exposure on the one player.
I would only want trigger2 in this example to place a back bet only, as trigger 1 placed a back bet. If Trigger 1 had its lay bet matched then I would only want Trigger 2 to place a lay bet.
Bearing in mind as I said earlier this example only relates to Index 1 placing the first bets meaning the fav was index 1 related. If this formula could be worked out the one for trigger 2 would be a simple amendment.
If you refer to my examples given in previous posts it may make sense
Hope this is clearer than mud
Thanks
R