Need To Stop my Excel Sheet Triggering Bets

Please post any questions regarding the program here.

Moderator: 2020vision

Need To Stop my Excel Sheet Triggering Bets

Postby forum1 » Mon Nov 21, 2011 12:03 pm

I am looking for a way to stop my excel sheet firing automatically bets when the market gets suspended. When the market goes in-play again I will be required to intervene manually in order to allow it firing bets again.

For example, if market gets suspended cell A10 gets value No. I must change content of cell A10 manually to Yes if i want it to start triggering again.

Is VBA required for this?
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Postby Graham » Mon Nov 21, 2011 3:25 pm

cell F2 will show "Suspended" when the market is suspended, or "Closed", when the market is closed. Just check it's blank as part of the formula for your trigger.
Graham
 
Posts: 130
Joined: Thu Jan 27, 2011 10:25 am

Postby forum1 » Tue Nov 22, 2011 7:57 am

cell F2 will change from "Suspended" to blank when the market reopens. I don't want it to fire a bet before I intervene manually (=make sure that flow of information is Ok after what caused suspension).
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Postby Graham » Tue Nov 22, 2011 10:23 am

Sorry misunderstood, VBA is required


Private Sub Worksheet_Calculate()
If Cells(2, 6) = "Suspended" Then Cells(10, 1) = "No"
End Sub
Graham
 
Posts: 130
Joined: Thu Jan 27, 2011 10:25 am

Postby forum1 » Mon Nov 28, 2011 5:02 pm

I am sorry for the late response.

I've incorporated these 2 lines as well as changed my trigger conditions (to trigger bets according to the content of cell A10) and I've noticed that it works in about 90% of the cases (huge improvement but not 100%) that there is a "Suspended" market.

I consider strange that although I have 3 sheets connected to the same market (3 different Tabs open on it) sometimes 2 of them have their A10 cells filled with "No" but the third does not. Is it a symptom of busy/"tired" excel/computer?
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Postby Graham » Mon Nov 28, 2011 9:12 pm

It's possible that you "miss" the suspension due to it occurring between refreshes. What refresh rate are you using, and is it the same for all tabs?
Graham
 
Posts: 130
Joined: Thu Jan 27, 2011 10:25 am

Postby forum1 » Tue Nov 29, 2011 3:54 pm

Refresh rate 0.6 sec for all three tabs while the market during these odd cases stays suspended for about 15sec.

I've also noticed that sometimes Sheets 1 and 2 change cell content to "No" while Sheet 3 doesn't while another time it can be Sheets 1 and 3 while 2 doesn't.
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Postby Graham » Wed Nov 30, 2011 8:10 pm

Strange, don't know why that should be. Are all the sheets in the same workbook? Where did you put the code?
Graham
 
Posts: 130
Joined: Thu Jan 27, 2011 10:25 am

Postby Captain Sensible » Wed Nov 30, 2011 11:54 pm

If you're intervening manually when in play why not have your code set the cell to NO when E2 shows "In Play"?

You can set other flags within your code to stop it changing back after you've started betting inplay and reset evrything back either when you change markets or using another trigger cell.
User avatar
Captain Sensible
 
Posts: 2926
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Wed Nov 30, 2011 11:59 pm

Only need to amend the code to something like

Private Sub Worksheet_Calculate()
If Cells(2, 5) = "In Play" AND Cells(10, 1) = "" Then Cells(10, 1) = "No"
End Sub

You'd just set the trigger not to bet if Cells(10, 1) is "No" and to resume betting just stick anything in the cell "y" then clear the cell again ready for the next market
User avatar
Captain Sensible
 
Posts: 2926
Joined: Sat Nov 19, 2005 2:29 pm

Postby forum1 » Mon Dec 05, 2011 12:31 pm

Answering to Graham:
I've copied these two lines as well as changed my trigger conditions in the code (object sheet 1,2,3) of these three sheets I'm referring above. It is still below 100% and the sheet that cell's content does not change is not always the same.
My only explanation can be "tired'' computer.

To captain Sensible:
Not sure I understood his advice; however I don't think what he's proposing faces the reason why Graham's routine does not work in my sheet everytime.
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Postby Captain Sensible » Mon Dec 05, 2011 12:52 pm

No problem , the suspend indicator is only there for a fraction of a second so even at 0.6 seconds refresh it's easily missed especially if excel is busy updating and slowing further refreshes.
User avatar
Captain Sensible
 
Posts: 2926
Joined: Sat Nov 19, 2005 2:29 pm

Postby Captain Sensible » Mon Dec 05, 2011 12:54 pm

I'm only talking from a Horseracing point of view so obviously if you're playing football the suspend will stay for a lot longer
User avatar
Captain Sensible
 
Posts: 2926
Joined: Sat Nov 19, 2005 2:29 pm

Postby Graham » Tue Dec 06, 2011 1:10 am

Seems strange that one sheet doesn't update while the rest do, especially since the market is suspended for 15 seconds. I do not have the first idea why. Sorry.

Can I ask if on any ocassion that all 3 sheets miss the suspension?

I have no idea of your setup forum1, but i am assuming that :

you have one instance of BA open with the same market on 3 tabs, linked to 3 sheets in one excel workbook, all with the same refresh rate.

And that once you have made some manual change after a suspension you wish to restart your automated betting, this will be conditional on the contents of cell A10.

Am I correct, because it would be easy to come up with a simple workaround (although I cant see why this is not working for you 100 percent)
Graham
 
Posts: 130
Joined: Thu Jan 27, 2011 10:25 am

Postby forum1 » Mon Dec 12, 2011 2:01 pm

Can I ask if on any ocassion that all 3 sheets miss the suspension?

no, only one of the three (not the same)

you have one instance of BA open with the same market on 3 tabs, linked to 3 sheets in one excel workbook, all with the same refresh rate.

this is right

And that once you have made some manual change after a suspension you wish to restart your automated betting, this will be conditional on the contents of cell A10

actually, I don't want to make any change, but I want to make sure that my algorithm is still valid (related to what caused the suspension). In case it isn't, there is no reason to fire bets automatically so your VBA code that has changed the A10 cell content to "No" perfectly blocks my sheet from firing bets (unfortunately, not always :(
forum1
 
Posts: 22
Joined: Thu Aug 18, 2011 8:59 pm

Next

Return to Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 32 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.