a couple questions about the COM functions

Please post any questions regarding the program here.

Moderator: 2020vision

a couple questions about the COM functions

Postby rhysw » Mon Sep 21, 2020 4:53 am

Hi there, I am writing a scalping bot and have found that trying to write triggers into the excel link just doesn't work and that placing and cancelling bets using the COM functions to be the answer to my woes. However this brings its own set of troubles for me, the first being that I need to know the profit and loss if the selection wins for each selection. To do this I have called getBets and run through each matched bet calculating the profit and loss for each selection. This works but it causes my Excel to run very slowly, if I want to stop the bot for any reason I have to kill it by double tapping the ESC key. Is there any other way to get the profit/loss OR make it run better?

Question 2: eventually I want to expand this bot so that it is placing bets on every betfair market that fits the conditions (number of selections, liquidity etcetera). My idea is to have a master sheet that scans betfair for these markets and when it finds one, opening a new sheet with the market and then placing bets accordingly. Is this possible, or is there a better way of doing this?
rhysw
 
Posts: 21
Joined: Tue Jun 30, 2020 12:48 pm

Re: a couple questions about the COM functions

Postby MarkRussell » Mon Sep 21, 2020 10:35 am

Hi,

In answer to your questions:-

1. Why not use the COM functions to trigger your bets but still have the market linked from Betting Assistant using the standard method of linking where the profit and loss is already output.

2. You could use the COM functions to scan through the markets and then open the market in a single sheet already linked to Betting Assistant. No need to use separate sheets unless you plan on having multiple markets open at the same time.

Regards,
Mark
User avatar
MarkRussell
Site Admin
 
Posts: 1787
Joined: Tue Feb 20, 2007 6:38 pm
Location: Birmingham

Re: a couple questions about the COM functions

Postby rhysw » Mon Sep 21, 2020 10:04 pm

Thanks Mark I will try that. One of the reasons I like using the COM though is the pricesUpdated event seems to work better for me than the worksheet change event as the markets I'm betting on (Match Odds with only 2 selections) are static a lot of the time. Is it possible to us the pricesUpdated event even if I'm using the Excel link?
rhysw
 
Posts: 21
Joined: Tue Jun 30, 2020 12:48 pm

Re: a couple questions about the COM functions

Postby rhysw » Tue Sep 22, 2020 12:10 pm

OK so I've just found out the problems I've been having have been caused by the full stream option being ticked, I've unticked it now and have written my code in the worksheet_change event and it seems to be working fine
rhysw
 
Posts: 21
Joined: Tue Jun 30, 2020 12:48 pm

Re: a couple questions about the COM functions

Postby rhysw » Sun Oct 04, 2020 11:09 am

So now I have started try to link to multiple markets using multiple sheets but instead of placing bets to the individual markets the bets are all getting placed on the market in the first tab. I assume the solution to this is to use the tabIndex property to switch between tabs... if I wanted to switch to the next tab could I use something like
Code: Select all
ba.tabIndex = ba.tabIndex +1
? And is there a way I could find out how many tabs are open?
rhysw
 
Posts: 21
Joined: Tue Jun 30, 2020 12:48 pm

Re: a couple questions about the COM functions

Postby alrodopial » Sun Oct 04, 2020 6:01 pm

First fix the linking ie 1st BA's tab (tabIndex=0) links with sheet1, etc and then
before placing any bet you should define it's tab number
ie ba.tabIndex = 2 and you get this info because you know that the conditions for your bet fulfilled in sheet3
- (sheet number minus one) if you start linking from sheet1 -

tabs open?

why not check sheets that getting data since from these sheets is where you will check/place your bets
alrodopial
 
Posts: 1355
Joined: Wed Dec 06, 2006 9:59 pm

Re: a couple questions about the COM functions

Postby rhysw » Sun Oct 04, 2020 10:02 pm

Ahh so on sheet 1 make sure it says ba. tabIndex = 0, sheet 2 says ba. tabIndex = 1 and so on. I was thinking of looping through the tabs on one sheet but that sounds much better.
rhysw
 
Posts: 21
Joined: Tue Jun 30, 2020 12:48 pm


Return to Help

Who is online

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