LOOP NEEDED - get next event [irrespective of current time]

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

Moderator: 2020vision

LOOP NEEDED - get next event [irrespective of current time]

Postby grimesy » Sun Jan 15, 2012 10:09 pm

Hi Mark / Gary,

another quick query on the getNextRace code, if I may:-

Code: Select all
Sub getNextRace()
   Dim sports, sport, Events, evnt, diff, result
   If ba Is Nothing Then
      Set ba = New BettingAssistantCom.ComClass
   End If
   sports = ba.getSports()
   For Each sport In sports
      If sport.sport = "Horse Racing - Todays Card" Then
         Events = ba.getEvents(sport.sportId)
         For Each evnt In Events
            diff = DateDiff("s", Now(), evnt.startTime)
            If diff >= 0 And InStr(evnt.eventName, "(") = 0 Then
               result = ba.openMarket(evnt.eventId, evnt.exchangeId)
               Exit For
            End If
         Next
      End If
   Next
End Sub


The above code will grab the next race when the current time is greater than the scheduled-off time of the prior race.

As such, the code above is directly linked to the current time.

However, I would like to be able to grab the next race in the left nav bar of GRUSS, irrespective of whether the current time is greater or less than the scheduled off-time of the prior race i.e.

In summary, my algorithm would:-

- performs specified orders on prior race;
- when this is complete [irrespective of time], a flag is triggered;
- this flag is then used to call the next race in the event ladder.
- the coding should be based on grabbing the next event ID in the event
ladder, irrespective of off-time, bringing my robot into the next race.

Whereas: the current approach [as above] relies on waiting until the scheduled off-time of the prior race.

Is this something that is possible?

Thanks,
G.
grimesy
 
Posts: 53
Joined: Tue Sep 30, 2008 3:58 pm

Postby GaryRussell » Mon Jan 16, 2012 3:35 pm

Are you using this code in a spreadsheet linked to BA? If you are you could do it without COM. Just make sure the quick pick list contains the markets your want and get your code to insert "-1" in cell Q2 which advances to the next race in the quick pick list.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby grimesy » Tue Jan 17, 2012 2:07 am

Hi Gary,

Yes, I've hooked-up the use of the Q2 trigger ["-1"] today for BA on BF; it's working perfectly.

My query was also related to my prior thread on BA for BETDAQ; I'm looking to automate my trading approach on both sites - but am conscious that the COM server is unavailable at present on "purple".

Furthermore, I was hoping that there was more than one way to do it!

Thank you for your reply.
grimesy
 
Posts: 53
Joined: Tue Sep 30, 2008 3:58 pm


Return to Discussion

Who is online

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