Switching to Next Market..

Please post any questions regarding the program here.

Moderator: 2020vision

Switching to Next Market..

Postby Owen123 » Fri May 17, 2013 9:21 am

Morning
I tried posting the request below, but posted in the wrong section..
If anyone can help it would be appreciated
By the way; my VBA knowledge is very basic
Thanks
Owen

Morning,
This is my first post on Gruss
I've been around a while, mainly using Excel automation since late 2006 and done very well over the years. I've recently tried Gruss and found some very neat features

Just looking for some VBA assistance if anyone can help please? On busy days, like today or bank hols, I want to catch every race if possible. My preferred method is to play in play bets mainly mid race to the end and I want to catch as many races as possible.
If I use the "Auto Select Market" ) seconds, I sometimes miss the best part of the race (the closing stages) and would rather switch at the end of the current race.

Ive been using a sample spreadsheet provided by Gary listed in the sample section that displays:-

Actual Start time in cell AA1
In Play seconds in cell AA2

In Conjunction, it also submit a "-1" into cell Q2 after each suspension to switch to the next race in the pick list. Works like clockwork - great stuff

This is the code it uses:
Code: Select all
Option Explicit

Dim currentMarket As String
Dim inPlay As Boolean

Dim marketChanged As Boolean
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Columns.Count = 16 Then

      If [A1] <> currentMarket Then
         currentMarket = [A1]
         inPlay = False
         marketChanged = False
      End If
      If [E2] = "In Play" Then
         If Not inPlay Then
            inPlay = True   
         End If
         If [AA1] = "" Then
            [AA1] = [C2]
         End If
         If [AA1] <> "" Then
            [AA2] = DateDiff("s", [AA1], [C2])
         End If
         If [F2] = "Suspended" And Not marketChanged Then
            marketChanged = True
            Application.EnableEvents = False
            [Q2] = "-1"
            Application.EnableEvents = True
         End If
      Else
         inPlay = False 
      End If

      If [E2] <> "In Play" And [F2] <> "Suspended" Then
         [AA1] = "" 
         [AA2] = ""
      End If

   End If
End Sub


The problem I have seen is that if a race is delayed, it sticks on that race.
I was wondering if anyone had amended the code to correct this in some way? For example it may be able to compare the scheduled start time with the current time and that time was greater than say, 7 mins, switch anyway? (on the assumption that that race has been delayed)
Any help appreciated or better suggestions?
Thanks
Owen
Owen123
 
Posts: 18
Joined: Sat May 11, 2013 8:54 am

Return to Help

Who is online

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