Open soccer markets with Vba

Please post any questions regarding the program here.

Moderator: 2020vision

Open soccer markets with Vba

Postby Tradyann » Wed Dec 21, 2011 10:20 am

Hello,

The sample test_BA_COM.xls permit to "update balance and find next UK horse race" in example with the "start" button... CommandButton1_Click()...

I don't know if it's possible to modify this code to do this :

Opening markets in principal tab "Over/Under" (all over/under) actually inplay ?

Or is it possible to limit Over/under to the markets selected in quickpicklist ?

Thanks to vba specialists :wink:
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby Tradyann » Tue Dec 27, 2011 10:36 am

.. or is it possible to load all soccer's over/under markets in quick pick list ?
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby osknows » Tue Dec 27, 2011 8:11 pm

I could write a VBA routine to get the market ID's for all o2.5 markets but I don't know if there is a way to add them to the quickpicklist?

Does anyone know if it's possible to add single markets to the quickpicklist using VBA?

If not a workaround could be to store the ID's in a collection and cycle the markets by clicking a button and using OpenMarket(eventId:integer,exchangeId:integer)
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Tradyann » Tue Dec 27, 2011 9:33 pm

"a VBA routine to get the market ID's for all o2.5 markets"

only o2.5 or all o/u are possible too ?

"a workaround could be to store the ID's in a collection"

Market's ID ? or Event's ID ?

I think Market's ID.. because I have seen in data betfair that EVENT IDs are not unique. For example, o1.5 could have the same ref. 102080200 or 102080300 like o2.5 ...etc strange :?


Thks for your answers, Osknows. 8)
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby osknows » Tue Dec 27, 2011 9:48 pm

Give this a go http://www.mediafire.com/?cvgu1mt8ijmrmpg

Instructions:
1. Ensure COM is enabled in BA/Excel
2. Open BA and navigate to ANY market
3. Link the Excel spreadsheet
4. Click "Fetch Over/Under markets" to collect the market ID's for all Over/under markets for the next 2 days
5. Click "Next Market" to cycle markets
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Tradyann » Tue Dec 27, 2011 11:42 pm

Thks

I have tested the file.

I've opened any soccer market.
Link BA/excel done.

Market loaded appeared in excel sheet.

But in step 4, nothing happen when i click on "fetch o/u markets" :?:
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby osknows » Tue Dec 27, 2011 11:52 pm

Check that the following are enabled

In BA
- options/preferences/COM server/ enabled is checked
- Excel/log current prices/ enable triggered betting is checked

In Excel
- VB editor/Tools/References/ ensure BettingAssistantCom is checked

The Fetch Over/Under button just loads the markets and won't look like it's doing anything apart from briefly display the progress of event extraction in the statusbar in the bottom left whilst fetching the markets.
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Tradyann » Wed Dec 28, 2011 9:38 am

All checks in BA and Excel (2007) are done, it was ok.

I summarize :

I open BA an this market for example : Arsenal v Wolverhampton (match odds)
I open Excel's file.
In BA : Excel/log current prices/enable triggered betting

Now I can see Arsenal (MO) in sheet1 with information that are updated.

I click on Fetch Over/Under button... but nothing :(

Normally, all over/under markets (today&tomorrow) should be loaded in sheet1, , isn't it ?

and these markets are automatically opened in BA in principal tab ?

Or these markets are opened one by one in principal tab (clicking with next market) ?
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby osknows » Wed Dec 28, 2011 1:04 pm

I'm not sure then?

Try the following test file and let me know what is output on the sheet named "Test" after connecting to BA and clicking the Fetch Over/Under button? http://www.mediafire.com/?ts9k5vaa3y3yoae

Send me the saved file to my email address
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby osknows » Wed Dec 28, 2011 7:09 pm

This will fix it http://www.mediafire.com/?nbrx2nrxw3an3a1

It's your system locale changing the month to "déc" instead of "Dec"

Regards
Os
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Tradyann » Wed Dec 28, 2011 7:29 pm

Yes! Very good Os... it works!

So Markets are opened individualy... but closed after opening the following.

"Does anyone know if it's possible to add single markets to the quickpicklist using VBA? "

yes, it will be perfect to add the result in a quick pick list for a later selection.
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby Tradyann » Thu Feb 09, 2012 11:36 am

I don't know if it's possible to increment ID markets after fetching in excel column (or text file) :

e.g.

104573943
104573951
104573948
104573962
...etc


Thereby It should be possible to copy/paste these markets in QPL file and restore Quick pick List with all over/under markets.

The code of next market button is :

Code: Select all
Private Sub NextMarket_Click()

If BAEvents.Count > 0 Then
   
    If marketCount = BAEvents.Count Then
        marketCount = 1
    Else
        marketCount = marketCount + 1
    End If
   
    'MsgBox marketCount & " " & BAEvents(marketCount).Tree2 & ": " & BAEvents(marketCount).eventId
    Sheet1.Range("Q2").Value = "GO:" & BAEvents(marketCount).eventId
   
End If

End Sub


So I don't know how to modifiy this code to do this ? :?
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby osknows » Thu Feb 09, 2012 8:48 pm

Hello,

That's a good find. I didn't know you could export/import to the quickpicklist! Essentially that means you can build any market you want.

Attached link now has option to export the markets to a .qpl file. It saves it to the same location as the file is saved. http://www.mediafire.com/?wk6x5v364avzs8g
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby Tradyann » Thu Feb 09, 2012 9:10 pm

Hello Osknows,

:P

It works perfectly ! With this update (markets sorted) : http://gruss-software.co.uk/forum/viewt ... p?t=5373... it's now very easy and quick to load all over/under markets.

Thanks again !
User avatar
Tradyann
 
Posts: 139
Joined: Thu Dec 15, 2011 7:13 pm

Postby faibo » Fri Feb 10, 2012 1:09 am

Hi, nice topic

Do you mean that it's possible to build a BA quickpicklist with the markets we want? I was looking for that.

What do i do with the .qpl fle?
User avatar
faibo
 
Posts: 23
Joined: Sun Sep 18, 2011 9:02 pm

Next

Return to Help

Who is online

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