Trigger a Rule on same Selection in a Different Market (Template)
I'm trying to get a version of this working.
I've got a BackThisHorse for $10 servant in a 1-click column. When I click it in the win market on a horse, I want to also have a $10 back bet on the same horse in the place market. On a typical race I might click 2 different horses once, and another two horses twice.
I've got it working to place a single bet on given horses per Dallas' instructions, but I'm struggling to get that second piece of info (how many bets) sent to the correct horse in the place market.
Anyone have any ideas how to achieve that?
Thanks
I've got a BackThisHorse for $10 servant in a 1-click column. When I click it in the win market on a horse, I want to also have a $10 back bet on the same horse in the place market. On a typical race I might click 2 different horses once, and another two horses twice.
I've got it working to place a single bet on given horses per Dallas' instructions, but I'm struggling to get that second piece of info (how many bets) sent to the correct horse in the place market.
Anyone have any ideas how to achieve that?
Thanks
To bet multiple times on different runners will just require the triggers increasing on rule file (B)Anbell wrote: ↑Thu Jun 19, 2025 6:18 amI'm trying to get a version of this working.
I've got a BackThisHorse for $10 servant in a 1-click column. When I click it in the win market on a horse, I want to also have a $10 back bet on the same horse in the place market. On a typical race I might click 2 different horses once, and another two horses twice.
I've got it working to place a single bet on given horses per Dallas' instructions, but I'm struggling to get that second piece of info (how many bets) sent to the correct horse in the place market.
Anyone have any ideas how to achieve that?
Thanks
and a number of place bet triggers condition on selection is equal to 0
It gets a little difficult when betting multiple times on the same runner, but your basically going to need to store the amount placed/matched or number of matched bets (depending on how you are betting in the first market)
Then pass that to the other file so in the same way as the runner ID is passed across and then use it as a condition/s
Thanks. I'm clicking on the column on the 1-click screen manually, reacting to what I see on the screen, so it might be 10 times on one horse on one race, or 3 times on 3 different horses in another.Dallas wrote: ↑Thu Jun 19, 2025 11:20 amTo bet multiple times on different runners will just require the triggers increasing on rule file (B)Anbell wrote: ↑Thu Jun 19, 2025 6:18 amI'm trying to get a version of this working.
I've got a BackThisHorse for $10 servant in a 1-click column. When I click it in the win market on a horse, I want to also have a $10 back bet on the same horse in the place market. On a typical race I might click 2 different horses once, and another two horses twice.
I've got it working to place a single bet on given horses per Dallas' instructions, but I'm struggling to get that second piece of info (how many bets) sent to the correct horse in the place market.
Anyone have any ideas how to achieve that?
Thanks
and a number of place bet triggers condition on selection is equal to 0
It gets a little difficult when betting multiple times on the same runner, but your basically going to need to store the amount placed/matched or number of matched bets (depending on how you are betting in the first market)
Then pass that to the other file so in the same way as the runner ID is passed across and then use it as a condition/s
The main issue that I'm struggling with (I think) is that I dont know how to send BOTH the selectionID and the (amount placed/matched or number of matched bets) per selectionID.
How do I send the selectionID AND the (amount placed) together to the second market? That is: How do I tell it to have $30 on horse 1 and $20 on horse 7?
This is a great rule that I must get working, so I'll spend some time on it as I'm wanting to be able to trigger either back bets in linked markets or lay bets in linked markets and need to be able to link multiple markets. When I tried a while ago it triggered bets in market (b) but not in market (c).
----------------------------------------
...and even before I've managed to get this servant automation working, my head is also now telling me I need to develop an additional but opposite version of this servant where I back a selection in market (a) and that triggers lay bets to be fired for the same selection in different linked markets (b), (c), (d) etc.
I'd also like the file to cancel lay bets only on the chosen selection in market (a) (ie not cancel all unmatched bets on all selections) when the back bet is fired into the market (a) and cancel back bets only on the same selection (but only that selection) in markets (b), (c), (d) etc. when it triggers the lay bets to be fired. I plan to use this in active in-play markets so there will likely be an in-play delay.
----------------------------------------
...and even before I've managed to get this servant automation working, my head is also now telling me I need to develop an additional but opposite version of this servant where I back a selection in market (a) and that triggers lay bets to be fired for the same selection in different linked markets (b), (c), (d) etc.
I'd also like the file to cancel lay bets only on the chosen selection in market (a) (ie not cancel all unmatched bets on all selections) when the back bet is fired into the market (a) and cancel back bets only on the same selection (but only that selection) in markets (b), (c), (d) etc. when it triggers the lay bets to be fired. I plan to use this in active in-play markets so there will likely be an in-play delay.
I'm getting the following error message when trying to apply (then test) a version of this rules file into Guardian to a market.
Does anyone know what might I have done wrong? (TIA)
Does anyone know what might I have done wrong? (TIA)
You do not have the required permissions to view the files attached to this post.
You have something in the file assigned to use Servant Context
ie, rule applied to, bet placement, or staking method
Many thanks Dallas and all for your help and assistance. I'm a servants newbie and have a lot of catching up to do, so thank you for your time and patience.
I've learnt a number of things today about this file template:
I've learnt that a single Market (B) can trigger either a back rule (triggered_back) or a lay rule (triggered_lay) from Market (A).
I've struggled to get Markets (C) and/or Market (D) to trigger either when using their own rule or when using the Market (B) rule.
...but I still have some questions:
In 'Market (A)', is it best/necessary to have separate servants for BACK and for LAY (as per the files shown below), or can a single servant distinguish between a servants context back or lay? (currently Market (A) fires in both backs and lays when both rules are added to a single servant - is there a way for the servant to distinguish when clicking on the back side or the lay side of a selection?)
In 'Market (B)', is it best/necessary to have additional servants for Market (C), Market (D) etc. or can a single Market (B) servant be used for more than one market?
I've learnt a number of things today about this file template:
I've learnt that a single Market (B) can trigger either a back rule (triggered_back) or a lay rule (triggered_lay) from Market (A).
I've struggled to get Markets (C) and/or Market (D) to trigger either when using their own rule or when using the Market (B) rule.
...but I still have some questions:
In 'Market (A)', is it best/necessary to have separate servants for BACK and for LAY (as per the files shown below), or can a single servant distinguish between a servants context back or lay? (currently Market (A) fires in both backs and lays when both rules are added to a single servant - is there a way for the servant to distinguish when clicking on the back side or the lay side of a selection?)
In 'Market (B)', is it best/necessary to have additional servants for Market (C), Market (D) etc. or can a single Market (B) servant be used for more than one market?
You do not have the required permissions to view the files attached to this post.
- jamesedwards
- Posts: 4919
- Joined: Wed Nov 21, 2018 6:16 pm
Are you using this for sports where the same selection is listed in different markets? eg horse race WIN and PLACE markets?Tuco wrote: ↑Tue Nov 25, 2025 5:41 pmMany thanks Dallas and all for your help and assistance. I'm a servants newbie and have a lot of catching up to do, so thank you for your time and patience.
I've learnt a number of things today about this file template:
I've learnt that a single Market (B) can trigger either a back rule (triggered_back) or a lay rule (triggered_lay) from Market (A).
I've struggled to get Markets (C) and/or Market (D) to trigger either when using their own rule or when using the Market (B) rule.
...but I still have some questions:
In 'Market (A)', is it best/necessary to have separate servants for BACK and for LAY (as per the files shown below), or can a single servant distinguish between a servants context back or lay? (currently Market (A) fires in both backs and lays when both rules are added to a single servant - is there a way for the servant to distinguish when clicking on the back side or the lay side of a selection?)
In 'Market (B)', is it best/necessary to have additional servants for Market (C), Market (D) etc. or can a single Market (B) servant be used for more than one market?
Place BACK Bet on Selection in Market (A) TEST.baf
Place LAY Bet on Selection in Market (A) TEST.baf
Trigger Bet on Same Selection Market (B) TEST.baf
Last edited by jamesedwards on Tue Nov 25, 2025 5:50 pm, edited 2 times in total.
- jamesedwards
- Posts: 4919
- Joined: Wed Nov 21, 2018 6:16 pm
- jamesedwards
- Posts: 4919
- Joined: Wed Nov 21, 2018 6:16 pm
eg a trigger on horse A in the WIN market sets a stored value, perhaps called 'place trigger ID', to = 'a selections ID on betfair'. Then in the PLACE markets you trigger a bet on every selection on condition that 'place trigger ID' for the current selection = 'a selections ID on betfair' for the current selection.jamesedwards wrote: ↑Tue Nov 25, 2025 5:50 pmThen you could look at using the stored value 'a selections ID on betfair' to match up the same selection across different markets. That's what I do. Much simpler.
This way a trigger on horse A in the WIN market will automatically also trigger on horse A in the PLACE markets.
- jamesedwards
- Posts: 4919
- Joined: Wed Nov 21, 2018 6:16 pm
OK. Makes no sense why you are struggling with markets C and D in that case though?
Out of interest, I've been picking up lots of unusual £22 @ 1.01 matches from the place markets today. Are they yours?
