BA too fast for its own good...

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

I brought this one up in another poster's topic a good while back, but never got a response and now it's becoming a bit of an issue for me.

Here's an example from the log of what's happening:

21-03-2018 19:18:28: [G_Auto] : k 38.46 Lay bet placed on Uafgjort at 3.65. Entirely unmatched when it initially reached the market. Ref: 119875865806 ( Fill or kill bet with 99999 seconds delay. Offsetting by 1 ticks with greening. )
21-03-2018 19:18:28: [G_Auto] : k 38,46 of unmatched bet (Ref:119869667763) was filled before remainder was killed.
21-03-2018 19:18:28: [G_Auto] : k 38,46 of unmatched bet (Ref:119869627582) was filled before remainder was killed.
21-03-2018 19:18:28: [G_Auto] : k 37.94 Back bet placed on Uafgjort at 3.7. Entirely unmatched when it initially reached the market. Ref: 119875867223
21-03-2018 19:18:28: [G_Auto] : k 37.94 Back bet placed on Uafgjort at 3.7. Entirely unmatched when it initially reached the market. Ref: 119875867547

Now, I do truly appreciate you guys doing a piece of software that is fast as **** but this is a bit silly :o

I've messed around A LOT with different settings, conditions and the like to solve it myself but to no avail. In this case, the "number of unmatched bets condition" is set to less than 2. However it doesn't matter if it's 1, 2, 10, or 100; this keeps happening (ie. firing in more exposure/higher number of bets than set). The automation fires in a, in this case, third bet as a lay inside the less than a second that it takes to convert the existing two lay bets into offsetting back bets. In fact, as you can see in the above, the log seems to show it's doing it so fast that the system registers the new lay bet BEFORE registering the two lay bets, set as a maximum unmatched bets, as matched!!!

Any ideas where I need to adjust to avoid this? Rearming is set to wait 60 seconds, so the issue is not having it just firing away every second.

Edit: I should say this is pre, not In-play, mind. So IP delay has no bearing.
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

Probably a stupid question, but I'll ask it anyway...

When you set the "number of unmatched bets" condition, there's a text that says "The number of unmatched bets on".

Did you pick "the selection" from the dropdown next to it, rather than "the market"?
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

I have done so, yes :) Not necessarily a stupid question though.

All the same, for future reference if I'm missing a trick here....I'll see your question and raise you a redirected, potentially, stupid question ;) How would that make any difference if it was set as market rather than selection? Unless the automation is actively placing bets on several selections and not just one, than it surely makes no difference or?

Edit (again :roll: ): Just realized a, possible, reason for your question. So, in case this partly behind your question, then to clarify.....there is not issue with how the "number of unmatched bets condition" works in generel. Once the, again in this particular spot, two bets are placed and left unmatched, the automation does NOT fire a third bet in immidiately. It only does so in the VERY short timespan between initial bets being matched and offset bets being placed (and registered as unmatched by the software).
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

Kafkaesque wrote:
Wed Mar 21, 2018 9:41 pm
How would that make any difference if it was set a market rather than selection? Unless the automation is actively placing bets on several selections and not just one, than it surely makes no difference or?
That's a good point, it shows how foggy my brain is at the end of the day. My question was stupid after all. :D
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

Not sure really.

I just created a new simple automation (.baf) file that places a lay bet on the first selection, if "Number of Unmatched Bets" on "the selection" is "equal to" 0.

Applied it to a pre-play market, first with a Guardian refresh of 20ms, then 1s. In both scenarios, it correctly placed the bet once.

Perhaps you could try the same, create a simple .baf file with only one rule (Place lay) and one condition (Number of Unmatched Bets). If it works fine, then most probably there is some other rule or condition that conflicts somehow.
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

Thanks for taking the time to have a look and try mate 8-)

I should really stop with the edits and just post a new reply (don't want to spam the threads though), but did you see my edit above? To that end: Do you mean it only placed the one bet initially, or that it didn't place a second bet before registering that offset bet?

In any case, I've set up a basic test, as you suggested, to have a look at what happens. Even if I'm 99%+ certain that's where I started when looking into solving it myself.
User avatar
northbound
Posts: 737
Joined: Mon Mar 20, 2017 11:22 pm

I’m perhaps starting to understand your problem better.

Basically, A) the initial bet gets filled and B) the offset bet gets placed.

In the few milliseconds between A and B, the software sees there’s no unmatched bet, so it places another initial bet.

Perhaps a solution could be to set a signal upon placing the initial bet, then creating a condition that places that initial bet only if it the signal is not set.
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

I had this issue once and I did what northbound is suggesting, I used signals.....can't quite remember how now but it was more reliable than testing for (un)matched bets.
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

Exactly. I'll look into the signal suggestion as a potential solution. However.....this is kinda weird. Set up a simple automation as you suggested. The result being:

21-03-2018 23:24:00: [G_Auto] : k 35.00 Lay bet placed on Petra Martic at 1.38. Entirely unmatched when it initially reached the market. Ref: 119898408501 ( Fill or kill bet with 99999 seconds delay. Offsetting by 1 ticks with greening. )
21-03-2018 23:29:23: [G_Auto] : k 35 of unmatched bet (Ref:119898408501) was filled before remainder was killed.
21-03-2018 23:29:23: [G_Auto] : k 34.75 Back bet placed on Petra Martic at 1.39. Entirely unmatched when it initially reached the market. Ref: 119898604395
21-03-2018 23:29:55: [G_Auto] : k 35.00 Lay bet placed on Petra Martic at 1.37. Entirely unmatched when it initially reached the market. Ref: 119898624460 ( Fill or kill bet with 99999 seconds delay. Offsetting by 1 ticks with greening. )

This was done with unmatched bets equals 0. And the offset bet was placed fine with no extra lay bet. The new lay was only placed when the offset was matched at 23:29:55.

So far so good. On a hunch, I kept the simple automation and only changed to "unmatched bets less than 1" and this happens:

21-03-2018 23:33:22: [G_Auto] : k 35.00 Lay bet placed on Petra Martic at 1.38. Entirely unmatched when it initially reached the market. Ref: 119898787210 ( Fill or kill bet with 99999 seconds delay. Offsetting by 1 ticks with greening. )
22-03-2018 00:00:36: [G_Auto] : k 35.00 Lay bet placed on Petra Martic at 1.37. Entirely unmatched when it initially reached the market. Ref: 119900099751 ( Fill or kill bet with 99999 seconds delay. Offsetting by 1 ticks with greening. )
22-03-2018 00:00:36: [G_Auto] : k 35 of unmatched bet (Ref:119898787210) was filled before remainder was killed.
22-03-2018 00:00:36: [G_Auto] : k 34.75 Back bet placed on Petra Martic at 1.39. Entirely unmatched when it initially reached the market. Ref: 119900100179

So precisely the same issue as I've experienced, despite it being the same market, selection, stakes and my bank being the same. Unless my brain is also getting foggy here late in the day, then surely "equals 0" and "less than 1" is the same (in this context)??? So before messing with signals, is there a potential bug with the " unmatched bets - less than" condition?
User avatar
Dallas
Posts: 22719
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

You could try adding a 'fill or kill bet time condition'
https://www.betangel.com/user-guide/fil ... 3D&mw=MzIw
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

Dallas wrote:
Wed Mar 21, 2018 11:33 pm
You could try adding a 'fill or kill bet time condition'
https://www.betangel.com/user-guide/fil ... 3D&mw=MzIw
Cheers for that.

I had a look at that myself. Unless I'm mistaken that only works if you'd want the full exposure in with one bet, yes?

There's plenty of times where it's preferable to drip the exposure in, rather than in one go. To avoid disturbing/moving the market and/or see how the market responds to a certain price being offered at less than full exposure.
User avatar
Dallas
Posts: 22719
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Kafkaesque wrote:
Wed Mar 21, 2018 11:54 pm
Dallas wrote:
Wed Mar 21, 2018 11:33 pm
You could try adding a 'fill or kill bet time condition'
https://www.betangel.com/user-guide/fil ... 3D&mw=MzIw
Cheers for that.

I had a look at that myself. Unless I'm mistaken that only works if you'd want the full exposure in with one bet, yes?

There's plenty of times where it's preferable to drip the exposure in, rather than in one go. To avoid disturbing/moving the market and/or see how the market responds to a certain price being offered at less than full exposure.
It will prevent another bet being placed while either the opening bet or its offset is still in the market, including during the (ms) gap between the opening bet being matched and the offset being placed.
User avatar
Kafkaesque
Posts: 886
Joined: Fri Oct 06, 2017 10:20 am

Dallas wrote:
Thu Mar 22, 2018 2:14 pm
Kafkaesque wrote:
Wed Mar 21, 2018 11:54 pm
Dallas wrote:
Wed Mar 21, 2018 11:33 pm
You could try adding a 'fill or kill bet time condition'
https://www.betangel.com/user-guide/fil ... 3D&mw=MzIw
Cheers for that.

I had a look at that myself. Unless I'm mistaken that only works if you'd want the full exposure in with one bet, yes?

There's plenty of times where it's preferable to drip the exposure in, rather than in one go. To avoid disturbing/moving the market and/or see how the market responds to a certain price being offered at less than full exposure.
It will prevent another bet being placed while either the opening bet or its offset is still in the market, including during the (ms) gap between the opening bet being matched and the offset being placed.
Indeed, but it will also stop any more than one bet being placed, if used along with "unmatched bets on selection" set at anything higher than 1, or am I misunderstanding how the fill or kill bet time condition works?
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

When you test #matched/#unmatched/matched amounts I'm guessing BA 're-gets' that from BF. There's definately a little hole in time where they're not returning the values you think should be the case when messages are passing each as they go to & from BA/BF.

I can't see a way to stop the double bets other than some clever use of signals.
User avatar
Dallas
Posts: 22719
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Kafkaesque wrote:
Thu Mar 22, 2018 3:02 pm
Dallas wrote:
Thu Mar 22, 2018 2:14 pm
Kafkaesque wrote:
Wed Mar 21, 2018 11:54 pm


Cheers for that.

I had a look at that myself. Unless I'm mistaken that only works if you'd want the full exposure in with one bet, yes?

There's plenty of times where it's preferable to drip the exposure in, rather than in one go. To avoid disturbing/moving the market and/or see how the market responds to a certain price being offered at less than full exposure.
It will prevent another bet being placed while either the opening bet or its offset is still in the market, including during the (ms) gap between the opening bet being matched and the offset being placed.
Indeed, but it will also stop any more than one bet being placed if used along with "unmatched bets on selection" set at anything higher than 1, or am I misunderstanding how the fill or kill bet time condition works?
Yes, it will mean no further bets until both are matched.

So if your placing more than 1 bet at a time ie, spread betting you won't be able to use it.

Im just looking back at your OP and you said your rearm time was 60 secs - with this there should be no chance of another bet going in with the conditions you're using unless you're using two separate rules to place your opening bets?
Post Reply

Return to “Bet Angel - Automation”