Hi,
Could someone help me please.
I'm trying to create what I thought was a simple bot but have run into a bit of a problem.
I'm trying to create a L2B bot with a Stop Loss
A Lay bet of £20 (liability) is placed at best market odds 5 seconds before the start of a race.
And an offset greening up Back position is placed 10 ticks from the opening Lay position.
This part is all quite straight forward.
This is the bit I'm struggling with;
I would also like to add a Stop Loss position where if the odds do not drift from the Lay bet up to meet the Back bet then a further Back bet (Stop Loss) will be placed at 5O% of the Lay Odds for the same Lay stake amount. Therefore creating a position that if the horse loses the trade is a scratch and if the horse wins then half of the original Lay stake is lost.
It's all a bit tricky as the opening Lay bet is based on liability. I'm guessing maybe a Stored Value might help as a reference for the Stop Loss but I'm not knowledgeable enough to include this.
Thank you in advance for any help.
Help with a L2B horse bot with a Stop Loss 50% of opening Lay Liability bet.
I had a very similar file at hand so quickly modified it slightly to do what you have asked for, give it a go in practice mode until you know its working how you want.
The back bet will trigger when it's at 50% of your lay price and place the bet at that price
You might want to change this to place it a few ticks lower in case the price crashes in
The back bet will trigger when it's at 50% of your lay price and place the bet at that price
You might want to change this to place it a few ticks lower in case the price crashes in
You do not have the required permissions to view the files attached to this post.
- LaMaquinaVerde
- Posts: 11
- Joined: Wed May 30, 2018 4:36 pm
Tried to import this with version 1.50.1 but it says it was created with a different version of BA.
viewtopic.php?f=46&t=17234LaMaquinaVerde wrote: ↑Wed Sep 26, 2018 8:23 amTried to import this with version 1.50.1 but it says it was created with a different version of BA.
Dallas - for the Stop Loss condition 'The Last Traded Price...' I set the 'Adjustment' field to Minus 5 ticks - thinking that if for instance the Stop Loss was set to fire at 2.64 it would fire at 2.54 avoiding being left behind if the market came in - however in practice mode it fired at 2.64..???
Also I wanted to add a rule 'Cancel All Bets' to fire if the Stop Loss fired so I added the 'Matched Bets Condition' with the total of Back and Lay bets equalling each other - this to cancel any lingering bets from a lay bet offset with greening (avoiding the risk of the market bouncing back up and catching the lingering back bet) but again this did not fire in practice mode even though the bets on the lay and back side were equal - any clues would be really welcome for these two problems.
For the stop loss, I assume you are using a regular back bet?Duderino wrote: ↑Sat Sep 29, 2018 5:08 pmDallas - for the Stop Loss condition 'The Last Traded Price...' I set the 'Adjustment' field to Minus 5 ticks - thinking that if for instance the Stop Loss was set to fire at 2.64 it would fire at 2.54 avoiding being left behind if the market came in - however in practice mode it fired at 2.64..???
Also I wanted to add a rule 'Cancel All Bets' to fire if the Stop Loss fired so I added the 'Matched Bets Condition' with the total of Back and Lay bets equalling each other - this to cancel any lingering bets from a lay bet offset with greening (avoiding the risk of the market bouncing back up and catching the lingering back bet) but again this did not fire in practice mode even though the bets on the lay and back side were equal - any clues would be really welcome for these two problems.
If so on the parameters tab make sure you place at 'Below best reverse market price'
For the cancel bets your better off using signals,
So on your stop loss rule also set a signal (call it whatever you want)
Then add a 'signal set condition' to your cancel bets rule to test if the above has been set
Thanks - the problem I can't work out is using the Baf you created the stop loss is set as a Stored Value Price on the parameters tab so I can't change this to match 'Below best reverse market price' without losing the position of the Stop Loss...Dallas wrote: ↑Sat Sep 29, 2018 7:49 pmFor the stop loss, I assume you are using a regular back bet?Duderino wrote: ↑Sat Sep 29, 2018 5:08 pmDallas - for the Stop Loss condition 'The Last Traded Price...' I set the 'Adjustment' field to Minus 5 ticks - thinking that if for instance the Stop Loss was set to fire at 2.64 it would fire at 2.54 avoiding being left behind if the market came in - however in practice mode it fired at 2.64..???
If so on the parameters tab make sure you place at 'Below best reverse market price'
I'm really struggling Dallas!!
[/quote]
Thanks - the problem I can't work out is using the Baf you created the stop loss is set as a Stored Value Price on the parameters tab so I can't change this to match 'Below best reverse market price' without losing the position of the Stop Loss...
I'm really struggling Dallas!!
[/quote]
Bad for to reply to one's own post...
Ahead of some testing I might have cracked it - I added a further stored value which deducted 10 ticks from the original stored value 'stop' - and have used this second stored value as the 'place at' parameter - so I think the Stop Loss will trigger at the first value, but place the back bet at the second value - does this look sound?
Thanks - the problem I can't work out is using the Baf you created the stop loss is set as a Stored Value Price on the parameters tab so I can't change this to match 'Below best reverse market price' without losing the position of the Stop Loss...
I'm really struggling Dallas!!
[/quote]
Bad for to reply to one's own post...
Ahead of some testing I might have cracked it - I added a further stored value which deducted 10 ticks from the original stored value 'stop' - and have used this second stored value as the 'place at' parameter - so I think the Stop Loss will trigger at the first value, but place the back bet at the second value - does this look sound?
Duderino wrote: ↑Sun Sep 30, 2018 9:31 am
Thanks - the problem I can't work out is using the Baf you created the stop loss is set as a Stored Value Price on the parameters tab so I can't change this to match 'Below best reverse market price' without losing the position of the Stop Loss...
I'm really struggling Dallas!!
If its still not working pop another message later today and i'll import the file again tomorrow when I open BADuderino wrote: ↑Sun Sep 30, 2018 9:31 amBad for to reply to one's own post...
Ahead of some testing I might have cracked it - I added a further stored value which deducted 10 ticks from the original stored value 'stop' - and have used this second stored value as the 'place at' parameter - so I think the Stop Loss will trigger at the first value, but place the back bet at the second value - does this look sound?
I can't remember off the top of my head how exactly I created as it was a user request so was put together quickly and with no detailed description like I use in my own threads
Hey Dallas - the query is working seemingly perfectly thanks - still trying small stakes albeit in live mode - I've erring on the side of caution with deducting ticks from the Stop Loss - after all BA matches at the best price so if I'm heavy on the ticks all is well - if you see what I mean.
Thanks for all your help - much appreciated.
Thanks for all your help - much appreciated.
Thanks for the update and I'm glad to hear you have it workingDuderino wrote: ↑Mon Oct 01, 2018 5:53 pmHey Dallas - the query is working seemingly perfectly thanks - still trying small stakes albeit in live mode - I've erring on the side of caution with deducting ticks from the Stop Loss - after all BA matches at the best price so if I'm heavy on the ticks all is well - if you see what I mean.
Thanks for all your help - much appreciated.