Hi all,
I have a problem, Ik put in some automated trades using the file which is explained in http://www.youtube.com/watch?v=WmBOhMpE5UI
I have done this with some success but sometimes excel fires two the same bets in the same second.
Have someone else the same problem and does someone know how I can solve this?
thanks in advance!
excel file fires a bet twice
It’s almost impossible for two bets to go on a single selection and it hasn't happened to me yet. Are you sure two bets were not placed on two different selections? If it is on a single selection then you might want to post a screenshot and log entry as I doubt there two bets placed on a single selection simultaneously.
Hi
If you are using the new version 1.27.3, you could add some conditions that check the matched and unmatched bets (you will need to use the new spreadsheet that accompanies 1.27.3 as the older spreadsheets no longer work correctly)
regards
Peter
If you are using the new version 1.27.3, you could add some conditions that check the matched and unmatched bets (you will need to use the new spreadsheet that accompanies 1.27.3 as the older spreadsheets no longer work correctly)
regards
Peter
This has happened to me. I have set the spreadsheet to fire a bet in at a certain time, eg when the countdown clock hits 1:30.
I also have the CLEAR STATUS code.
Sometimes, not always, it would fire in two bets. After banging my head for a while I put the refresh rate back to 750ms and since then have not had a problem.
I guess that sometimes it managed to place the bet, clear the status and bet again in the same second.
I don't know if you are using the clear status or not, hope this helps.
Shamrock.
I also have the CLEAR STATUS code.
Sometimes, not always, it would fire in two bets. After banging my head for a while I put the refresh rate back to 750ms and since then have not had a problem.
I guess that sometimes it managed to place the bet, clear the status and bet again in the same second.
I don't know if you are using the clear status or not, hope this helps.
Shamrock.
-
- Posts: 7
- Joined: Mon Jun 20, 2011 7:48 pm
Hi,
I have the same problem. My sheet fires perfectly for a proportion of markets throughout the day and then out of nowhere it fires 2 or 3 bets on a back and then the same on the lay. My sheet is setup up to fire one back bet, then a lay bet 12 seconds later and nothing afterwards. this is my log for a market today:
06/07/2011 17:31:36: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.18. Ref:
06/07/2011 17:31:37: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.16. Ref:
06/07/2011 17:31:38: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.16. Ref:
06/07/2011 17:31:58: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:31:59: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:32:00: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:32:01: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
Is it guardian / bet angel not working correctly or is it excel formula or vba programming that can fix this.
I have also made sure that once each bet is placed that a cell for each is changed to 1 to make sure the formula is not run again.
I have tried everything I can think of and have a reasonable level of programming experience with excel and vba. I cant get my head round this.
Kev
I have the same problem. My sheet fires perfectly for a proportion of markets throughout the day and then out of nowhere it fires 2 or 3 bets on a back and then the same on the lay. My sheet is setup up to fire one back bet, then a lay bet 12 seconds later and nothing afterwards. this is my log for a market today:
06/07/2011 17:31:36: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.18. Ref:
06/07/2011 17:31:37: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.16. Ref:
06/07/2011 17:31:38: £ 2 Back bet placed on Under 2.5 Goals at 2.16. Fully matched at 2.16. Ref:
06/07/2011 17:31:58: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:31:59: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:32:00: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
06/07/2011 17:32:01: £ 2.04 Lay bet placed on Under 2.5 Goals at 2.12. Entirely unmatched when it initially reached the market. Ref:
Is it guardian / bet angel not working correctly or is it excel formula or vba programming that can fix this.
I have also made sure that once each bet is placed that a cell for each is changed to 1 to make sure the formula is not run again.
I have tried everything I can think of and have a reasonable level of programming experience with excel and vba. I cant get my head round this.
Kev
-
- Posts: 7
- Joined: Mon Jun 20, 2011 7:48 pm
thanks for your quick reply.
I am using VBA range("CELL LOCATION").Clearcontents
Is there a different way I should be doing this?
Many thanks in advance.
I am using VBA range("CELL LOCATION").Clearcontents
Is there a different way I should be doing this?
Many thanks in advance.
I can confirm that this does indeed happen if you place a bet and use VB code to clear the placed status marker but it only happens when there is a timing delay on placing bets eg in-running. Depending on your refresh rate several bets may be entered.
Usually coders include some aspect of testing either P/L (Col:D) or Liability (Col:C) in order to decide whether to fire single or multiple bets. The problem here is that, with a delay, these fields have not been updated by the time the Excel back/lay code is executed a second time and in the meantime the independant VB code has cleared the "PLACED" marker thus allowing a second..third etc bet through the system (status is clear and P/L (Liab) is still zero).
In BA, the "PLACED" status is set when the bet is submitted, not after it has matched.
Is this what people are seeing?
Usually coders include some aspect of testing either P/L (Col:D) or Liability (Col:C) in order to decide whether to fire single or multiple bets. The problem here is that, with a delay, these fields have not been updated by the time the Excel back/lay code is executed a second time and in the meantime the independant VB code has cleared the "PLACED" marker thus allowing a second..third etc bet through the system (status is clear and P/L (Liab) is still zero).
In BA, the "PLACED" status is set when the bet is submitted, not after it has matched.
Is this what people are seeing?
-
- Posts: 7
- Joined: Mon Jun 20, 2011 7:48 pm
Thank you
A great explanation. I will test the matched or unmatched fields instead of PLACED to see if this helps.
Thanks again
I may be back
A great explanation. I will test the matched or unmatched fields instead of PLACED to see if this helps.
Thanks again
I may be back

Hello
i came across this as well. I am placing two different bets on horses. It must indeed be the case that placed is deleted by the makro and right after a bet is placed.
Have you found a resolution for the problem?
I would like to know what BA actually is doing. It writes PLACED in Excel then fires the bet, does it write anything in the right columns as well, e.G. maybe unmatched bets. I have linked the algorithm to the P/L column of course. It still fires twice pretty often.
i came across this as well. I am placing two different bets on horses. It must indeed be the case that placed is deleted by the makro and right after a bet is placed.
Have you found a resolution for the problem?
I would like to know what BA actually is doing. It writes PLACED in Excel then fires the bet, does it write anything in the right columns as well, e.G. maybe unmatched bets. I have linked the algorithm to the P/L column of course. It still fires twice pretty often.
Yes it's a timing issue. I wanted to place two bets on horse races from different systems. the first 8 minute before a race and the second 4 minutes before a race. i have a multiple market spreadsheet and the makro is deleting placed in all sheets every minute. it's supposed to be every minute but somehow is not.
So inevitably the 8 or 4 minute bet trigger and the deleting Placed makro will meet somewhen. Since it's a system i cant afford to sometimes having a bet placed twice. i think for making markets it's not a real problem, but for several different bets there is no solution i think. i will now change it to only one bet.
Thanks for your replies.
To Betangel: If you want to place two bets on the same selection you need to clear PLACED with a makro as i understand it. My spreadsheet does recognize bets which are met on betfair, so if a lay is send AND matched or listed as unmatched, the sheet won't fire another bet. but right after the bet is send, it's nowhere on the spreadsheet except the PLACED in O, so when the makro kicks in and deletes PLACED just in that moment it will fire another bet. I suggest that somwhow in the future you add another column XX where BA could write SEND or PENDING, so that it will write SEND in XX then PLACED in O then in the next actualisation check where the bet is gone (matched unmatched, p&l updated) and after that has taken place remove SEND in XX.
P.S. I have uploaded an example spreadsheet for multi markets with makro. (without algorithm)
https://docs.google.com/leaf?id=0BziuV2 ... y&hl=en_US
you need to click download, cant upload here its too big (2MB)
So inevitably the 8 or 4 minute bet trigger and the deleting Placed makro will meet somewhen. Since it's a system i cant afford to sometimes having a bet placed twice. i think for making markets it's not a real problem, but for several different bets there is no solution i think. i will now change it to only one bet.
Thanks for your replies.
To Betangel: If you want to place two bets on the same selection you need to clear PLACED with a makro as i understand it. My spreadsheet does recognize bets which are met on betfair, so if a lay is send AND matched or listed as unmatched, the sheet won't fire another bet. but right after the bet is send, it's nowhere on the spreadsheet except the PLACED in O, so when the makro kicks in and deletes PLACED just in that moment it will fire another bet. I suggest that somwhow in the future you add another column XX where BA could write SEND or PENDING, so that it will write SEND in XX then PLACED in O then in the next actualisation check where the bet is gone (matched unmatched, p&l updated) and after that has taken place remove SEND in XX.
P.S. I have uploaded an example spreadsheet for multi markets with makro. (without algorithm)
https://docs.google.com/leaf?id=0BziuV2 ... y&hl=en_US
you need to click download, cant upload here its too big (2MB)
-
- Posts: 7
- Joined: Mon Jun 20, 2011 7:48 pm
i have no idea why this happens but what ive done to solve this at my end is to change guardian refresh market time to 2 secs and to make sure any vb script has a longer delay than this. works perfectly now.