Excel triggered bets sometimes fire twice

Please post any questions regarding the program here.

Moderator: 2020vision

Excel triggered bets sometimes fire twice

Postby spindlefish » Mon May 19, 2014 9:37 am

Is there a way to make sure a trigger can only fire once? It shouldn't fire twice, because if the Bet Ref cell is populated, which it is after the first bet, then a second bet shouldn't be triggered at all.

It's happened on about 3 or 4 occasions in the last 30 or 40 markets I've tried it on. My rule says to fire a bet if price conditions are met 20 seconds before the official race time. Maybe there's a delay in the first bet placement which causes it to fire a second time?

Any advice appreciated.
spindlefish
 
Posts: 24
Joined: Mon Jul 29, 2013 3:39 pm

Postby MiniBlueDragon » Mon May 19, 2014 12:17 pm

I use a simple count function:

Code: Select all
=IF(AND(COUNT($T$5:$T$50)=0,$R$2<=20,$R$1<>"In Play"),"BACK-IP","")


COUNT($T$5:$T$50)=0 checks that there are no bet refs in the existing race.
$R$2<=20 checks that the race start countdown is 20 seconds or less.
$R$1<>"In Play" checks that the current race is not "In Play"
MiniBlueDragon
 
Posts: 130
Joined: Tue Jul 05, 2011 1:14 pm
Location: London

Postby Captain Sensible » Mon May 19, 2014 1:33 pm

Are you talking about duplicate bets on the same runner or just other bets firing because the criteria has also been matched for other runners.

Might be worth checking your coding too as I've never come across it firing duplicates on the same runner- are you using formulas or VBA for populate the cells/fire off bets
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby spindlefish » Mon May 19, 2014 3:50 pm

I use a not dissimilar formula. Yes, bets on the same runner are fired twice, the second bet almost immediately after the first. Possibly there's a minor delay in the Bet Ref being populated after the first bet, so Excel thinks it's valid to fire again. At least that's my reading of the situation.

I'm clueless with VBA, I'm afraid.
spindlefish
 
Posts: 24
Joined: Mon Jul 29, 2013 3:39 pm

Postby spindlefish » Wed May 21, 2014 12:29 pm

I might have discovered the problem. My formula ends:

BACK-SP,CLEAR)

- but I have the "Clear trigger clears matched odds" tick box selected when I connect Excel to BA. I needed this for another method I was using, but maybe I need to un-tick that tick box. Or maybe I should change the formula so it ends:

......BACK-SP,"")

Any advice as to the appropriate solution gratefully received. The important thing is that it should only trigger once. I'll check it out over the next few days.
spindlefish
 
Posts: 24
Joined: Mon Jul 29, 2013 3:39 pm

Postby Dai_Young » Wed May 21, 2014 2:19 pm

Yep, don't think there's any need for you to have CLEAR at the end of your formula, that's why it's firing twice
Dai_Young
 
Posts: 203
Joined: Sat Nov 19, 2005 8:52 pm
Location: Jerez

Postby Captain Sensible » Thu May 22, 2014 1:05 pm

spindlefish wrote:I might have discovered the problem. My formula ends:

BACK-SP,CLEAR)

- but I have the "Clear trigger clears matched odds" tick box selected when I connect Excel to BA. I needed this for another method I was using, but maybe I need to un-tick that tick box. Or maybe I should change the formula so it ends:

......BACK-SP,"")

Any advice as to the appropriate solution gratefully received. The important thing is that it should only trigger once. I'll check it out over the next few days.


I'm surprised you're not continually firing if you clear the refs after every bet, tbh.

Might be worth reading the excel section of the manual so you're clearer as to what each command will do, just knowing your formula ends BACK-SP,CLEAR) isn't really enough for anyone to give advice as the rest could be doing all sorts of stuff.

Shouldn't be too hard for you to get it working properly with formulas as plenty of us use the CLEAR you just need to avoid getting into loops
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Thu May 22, 2014 1:11 pm

The problem you have just using CLEAR straight away is that all it does is reset the bet ref and time cells if nothing else has changed when it refreshes it'll just kick off again. So say you're formula is monitoring profit and loss columns to stop or re-fire other stuff those initial bets might not have been matched by the time the refresh comes round
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Postby spindlefish » Sat Jun 14, 2014 9:41 am

Thanks for the replies. I had to use the CLEAR trigger as I described it because of the cumbersome way my worksheet was set up. I would enter Y in cell T1 when I wanted my strategy to fire, and if I then changed my mind, I'd clear that Y from the cell. That would cancel my unmatched bets in the market, but would leave the bet refs populated, hence my use of the CLEAR trigger. Either that or I'd have to manually delete bet refs using my mouse and/or keyboard. So because I'd manually removed my Y trigger, bets couldn't fire twice.

All hugely inefficient I know, but that's the price one has to pay for being clueless with macros and VBA!
spindlefish
 
Posts: 24
Joined: Mon Jul 29, 2013 3:39 pm

Re: Excel triggered bets sometimes fire twice

Postby hirrakki » Thu Jun 25, 2015 4:44 am

Does that bit of code work for in play? I am wanting to stop betting after 1 successful bet, because my criteria matches at the end of the race to multiple selection and i don't want that to happen.

any help appreciated

J
hirrakki
 
Posts: 8
Joined: Wed Jun 24, 2015 11:13 pm


Return to Help

Who is online

Users browsing this forum: Bing [Bot] and 50 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.