Moving through the race card with the Q2 trigger and VBA

Discuss anything related to using the program (eg. triggered betting tactics)

Moderator: 2020vision

Moving through the race card with the Q2 trigger and VBA

Postby guayanes » Fri Jan 06, 2012 2:21 am

Hi to all. I hope you all had Happy Holydays . Ok there is something I am trying to do using BA along with Excel and VBA but my knowledge of VBA sadly is very, very poor.
What I am trying to do is every morning I hand pick races where I want to Place bets in Play.
I place my races into a column like this I sheet 1
13:10
14:45
16:00
17:00
18:00

My hand picked races I will write manually in column $B$17:$B$35

In E5 I have VALUE(MID($C$1,FIND("- 1",$C$1)+2,5)) wich gives me the time of each race.
‘ in $C$1 I have the race string which I Got from the Race Matrix which is refreshing from BAssistant on Sheet2
In E6 I have IF(ISERROR(MATCH($E$5,$B$17:$B$35,0)),0,MATCH($E$5,$B$17:$B35,0)) Using this formula Excel gives me any value above 1 if the current race is in my list,0 is the current race is NOT in my list
What I want to do is for VBA to keep me moving through the day races (using the trigger on Q2 -1)placing bets ONLY in the races I have in My Column Matrix and switching to do next race once the race is suspended.If the next race is not in my matrix then move on to the next and to the next until it finds one where I want to place bets. I tried opening several tabs but since my system requires me to open TWO tabs per race sometimes I had open 20 pages at the same time which SLOWS down the software big time( a no,no since I am placing bets in Play)

This is the VBA code I put in Sheet2 and Sheet3

Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
If updating Then Exit Sub
updating = True
If Cells(2, 5) = "In Play" Then
If Cells(1, 27) = "" Then Cells(1, 27) = Cells(2, 3)
If Cells(1, 27) <> "" Then Cells(1, 28) = DateDiff("s", Cells(1, 27), Cells(2, 3))
End If
If Cells(2, 5) <> "In Play" And Cells(2, 6) <> "Suspended" Then
Cells(1, 27) = ""
Cells(1, 28) = ""
End If
If Cells(2, 5) = "In Play" Then
Cells(2, 18) = ""
End If
If Cells(3, 20) = 0 Then Cells(2, 18) = Cells(3, 21)’ I have -1 in Cell 3,21
If Cells(2, 6) = "Closed" Then
Cells(2, 18) = Cells(3, 21)
End If
If Cells(2, 6) = "Suspended" Then
Cells(2, 18) = Cells(3, 21)
End If
updating = False
End Sub

The very few lines of the subroutine is Garys t Start Time to code that I use to placebets in Play.

What I does is well first it kept jumpin until it came to the last race and this one doesn’t switch to the next race like it is supposed to. To the programmers out there apologies for this horrible block of coding
:D :D
guayanes
 
Posts: 12
Joined: Sun Oct 30, 2011 4:49 pm

Postby guayanes » Fri Jan 06, 2012 2:23 am

Do not know how those stupid smilies got in my code SORRY :oops:
guayanes
 
Posts: 12
Joined: Sun Oct 30, 2011 4:49 pm

Postby GaryRussell » Fri Jan 06, 2012 8:10 am

To prevent code from looking messed up when posting on the forum click the "Code" button, type your code then click the "Code" button again. This will surround your code with code tags. I have edited your post.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby guayanes » Fri Jan 06, 2012 12:43 pm

thanks,Gary :D :D
guayanes
 
Posts: 12
Joined: Sun Oct 30, 2011 4:49 pm


Return to Discussion

Who is online

Users browsing this forum: No registered users and 40 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.