COM Interface and commands

Please post any questions regarding the program here.

Moderator: 2020vision

COM Interface and commands

Postby VBADeamon » Sat Oct 29, 2016 6:03 am

part.jpg
part.jpg (105.46 KiB) Viewed 25615 times
Hello,

I am trying to figure out how to directly "push" commands to Gruss using VBA... can someone please help me with these?

So, there is a little story here.... I am a BetAngel (BA) user, but I need to escape that :evil: . The reason is that BA is slow in executing bets.
I mean slower that I need it to be.

My search took me to Geeks Toy ... but it seems that even if it is a very fast software, GT lacks the COM interface and also the Excel integration... :roll:
Then I remembered that I had Gruss installed once.... and I reinstalled it.
My surprise is that it has a COM interface and I could just push the commands directly to Gruss.

Can you please help me learn this new interface? ( new for me at least)

For example, I understand that CLEAR , could help me retrigger a new bet in the market.
Of course , there are the normal triggers like : BACK, LAY, CANCEL, CANCEL ALL....
Where could I find a list of all these triggers and some examples?

The annoying part in the BA excel interface was that I had to send a clear cell command (under status in the pic) and that command did not always take.

For example, I was reading the odds and making calculations every 200 ms.... but I was reading and writing so fast that I put 90 bets in 20 seconds.. by the time I realised what happened I jumped and manually greened up... yes I made that time 230 pounds... but next race... same bug... I lost 170 pounds....

I guess what I am trying to say at 5:58 AM is that I need some help with those commands because I think I have found the fastest most responsive software out there.. Gruss.

Thank you... and sorry if I bored you to death. :roll: :oops: 8)
VBADeamon
 
Posts: 5
Joined: Sat Oct 29, 2016 5:35 am

Re: COM Interface and commands

Postby VBADeamon » Sat Oct 29, 2016 6:15 am

Also, another problem that I see is, in the main interface in the betting settings, when I try to keep that refresh rate at 0.2 seconds it suddenly stops refreshing... why is that?

Thank you.
VBADeamon
 
Posts: 5
Joined: Sat Oct 29, 2016 5:35 am

Re: COM Interface and commands

Postby Daywalker » Sat Oct 29, 2016 9:36 am

Hi. This may help if you haven't already done it. There is some basic code that you need to include in all Gruss compatible VBA.

Gary wrote this in reply to another query but it gives the basic layout your code should follow. This may help with you entering multiple bets and the triggers that aren't consistent.


GaryRussell wrote: ....It is best practice to make sure your code populates the trigger cells when the prices are updated because it is in this update that it processes the triggers. It is also good practice to prevent further events firing while your code updates.

Eg.
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
        Application.EnableEvents = False
        ' your code goes here
        Application.EnableEvents = True
    End If
End Sub


Note that it checks if the updated columns count is 16, this is the update where the triggers are processed.


It sounds like you are familiar with VBA but just to make sure, if you stop the code before it completes its cycle, you will have to enter Application.EnableEvents = True in the Immediate window
I have a blog https://trader247.uk
User avatar
Daywalker
 
Posts: 200
Joined: Wed Aug 18, 2010 11:43 pm
Location: Mid-West Yorkshire

Re: COM Interface and commands

Postby alrodopial » Sat Oct 29, 2016 1:17 pm

You should start from the manual
http://www.gruss-software.co.uk/Betting ... e/help.htm

The excel files that Garry uploaded in the excel section are very helpfull
take a look at their code
viewforum.php?f=8
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Re: COM Interface and commands

Postby VBADeamon » Sat Oct 29, 2016 1:50 pm

Thank you Daywaker and alrodopial.
Really impressed by your bots Day.
I tested the executing time... Anywhere between 180 and 5000 ms...
I guess i need a VPS in Ireland....
VBADeamon
 
Posts: 5
Joined: Sat Oct 29, 2016 5:35 am

Re: COM Interface and commands

Postby Daywalker » Sat Oct 29, 2016 2:42 pm

Thanks.

As Alrodopial says, guide and example sheets are a good start.

My VPS is based in London, I get around 18ms delay. From my house it's around 60ms (It's improved from around 90ms a few months back).

Here are some blog posts on my VPS

https://trader247.wordpress.com/2016/03/29/vps-active/

https://trader247.wordpress.com/2016/03 ... y-testing/

https://trader247.wordpress.com/2016/04 ... d-hosting/

https://trader247.wordpress.com/2016/05/19/vps-a-guide/

https://trader247.wordpress.com/2016/05 ... m-desktop/
I have a blog https://trader247.uk
User avatar
Daywalker
 
Posts: 200
Joined: Wed Aug 18, 2010 11:43 pm
Location: Mid-West Yorkshire

Re: COM Interface and commands

Postby Captain Sensible » Sat Oct 29, 2016 6:58 pm

VBADeamon wrote:I tested the executing time... Anywhere between 180 and 5000 ms...
I guess i need a VPS in Ireland....



Are your bots betting inplay? That ay account for the 5000ms as that is very high for a response, where are you based?
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: COM Interface and commands

Postby VBADeamon » Sun Oct 30, 2016 12:46 am

Yes Captain, they are trading in play.
I am based near Sheffield, using a 100mb fiber optic ... Wireless connection. I did not try using wired, I will try to test wired...
I guess that is why I am losing money , right? :oops:
I have an idea for a stand alone application that will connect to gruss using the COM method.
That way it will be faster not using Excel... In theory...
But I do not have that much time , cause of work...
Still dreaming of leaving work and to be my own boss.... It is hard when you are in your 30s and still searching .. Oh well...
VBADeamon
 
Posts: 5
Joined: Sat Oct 29, 2016 5:35 am

Re: COM Interface and commands

Postby Captain Sensible » Sun Oct 30, 2016 2:51 pm

On inplay markets there's a delay in bets being matched, to conteract for any delays in TV feeds, stops people betting live from the venue having a big advantage over people betting from hoe watching delayed TV pictures. That probably accounts for the delays your seeing in the betting responses of up to 5 seconds in play. Also if you're betting under the £2 minimum amounts bet assistant has to do two bet submissions and an update to get around the minimum limits. They have released new additions to the API so that isn't needed in certain cases and hopefully that'll be added to Gruss sometime soon along with the bet streaming that should make bots more efficient for price data.

If you are quite proficient at coding and able to write your own standalone it may be worth you looking at coding your own bot as the API is relatively simple to use, I have some of my own stuff betting via php and mysql as well as using Gruss.
User avatar
Captain Sensible
 
Posts: 2923
Joined: Sat Nov 19, 2005 2:29 pm

Re: COM Interface and commands

Postby VBADeamon » Sun Oct 30, 2016 3:14 pm

Thank you all for your reply.
I will update you when I do something worthwhile :lol:

Gtg to work...

Havr a good day !
VBADeamon
 
Posts: 5
Joined: Sat Oct 29, 2016 5:35 am


Return to Help

Who is online

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