Help with a L2B horse bot with a Stop Loss 50% of opening Lay Liability bet.

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
Dadders
Posts: 57
Joined: Mon Oct 03, 2016 1:36 pm

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.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

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
You do not have the required permissions to view the files attached to this post.
smd100
Posts: 18
Joined: Sun May 21, 2017 9:51 pm

if you were to do this in reverse for back 2 lay would the store value be

"back price of selection"

"plus 50%"

muchos gracias
Dadders
Posts: 57
Joined: Mon Oct 03, 2016 1:36 pm

Hi Dallas,

Sorry only just seen this, I normally look for a little alert when I log in.

Thank you so much for this.
Duderino
Posts: 22
Joined: Wed Dec 09, 2015 7:51 pm

I'm getting an error message when I try to open this Baf - created with a different version - I'm using 1.50 - do I need to use the Beta 1.51 Dallas?
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Duderino wrote:
Tue Sep 25, 2018 6:10 pm
I'm getting an error message when I try to open this Baf - created with a different version - I'm using 1.50 - do I need to use the Beta 1.51 Dallas?
Yes it was created with the new beta
viewtopic.php?f=46&t=17234
User avatar
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.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

LaMaquinaVerde wrote:
Wed Sep 26, 2018 8:23 am
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=17234
Duderino
Posts: 22
Joined: Wed Dec 09, 2015 7:51 pm

Dallas wrote:
Sat Sep 22, 2018 6:52 pm
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
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.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Duderino wrote:
Sat Sep 29, 2018 5:08 pm
Dallas wrote:
Sat Sep 22, 2018 6:52 pm
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
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?
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
Duderino
Posts: 22
Joined: Wed Dec 09, 2015 7:51 pm

Dallas wrote:
Sat Sep 29, 2018 7:49 pm
Duderino wrote:
Sat Sep 29, 2018 5:08 pm
Dallas wrote:
Sat Sep 22, 2018 6:52 pm
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
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..???
For the stop loss, I assume you are using a regular back bet?
If so on the parameters tab make sure you place at 'Below best reverse market price'
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!!
Duderino
Posts: 22
Joined: Wed Dec 09, 2015 7:51 pm

[/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?
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

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!!
Duderino wrote:
Sun Sep 30, 2018 9:31 am
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?
If its still not working pop another message later today and i'll import the file again tomorrow when I open BA
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
Duderino
Posts: 22
Joined: Wed Dec 09, 2015 7:51 pm

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.
User avatar
Dallas
Posts: 22674
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Duderino wrote:
Mon Oct 01, 2018 5:53 pm
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 the update and I'm glad to hear you have it working :)
Post Reply

Return to “Bet Angel - Automation”