Record data quicker than every second on Excel.

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

Hi all,

I have a simple data capture spreadsheet that I have made but it only looks at recording data every second. Is there anyway this can be under a second? Code can be posted.

Regards
Nero Tulip
Posts: 686
Joined: Wed Apr 15, 2009 5:29 pm

Depending on how you tell the sheet a second has passed, you could point your trigger at something different (or several things), such an increase in traded volume, a change in odds, book % and so on. If that's not sensitive enough, sum them, then if any of the above change it'll record something.
Last edited by Nero Tulip on Wed May 31, 2017 12:34 pm, edited 1 time in total.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

Im looking at recording Book% but obviously every second wouldnt be sufficient especially in-running. Im a rookie with all the VBA coding so not sure how to record a cell only when data changes instead of every second....
What would be the best function to do this?
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

One of the quickest ways would be to use an event such as worksheet calcuate.

However, depending on how long it takes to run your code (if you have any), you could run into trouble. Say for example the calculation changes 4 times in a second, and your code takes 1/2 sec to run, excel will always be playing catchup and will probably crash. If you turn the events on/off while running the code, then the whole exercise becomes pointless.

Cheers, Nigel.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

nigelk wrote:
Mon May 22, 2017 11:26 am
One of the quickest ways would be to use an event such as worksheet calcuate.

However, depending on how long it takes to run your code (if you have any), you could run into trouble. Say for example the calculation changes 4 times in a second, and your code takes 1/2 sec to run, excel will always be playing catchup and will probably crash. If you turn the events on/off while running the code, then the whole exercise becomes pointless.

Cheers, Nigel.
Cheers for the reply Nigel, Is it possible to PM you?
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

Sure.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

Thankyou PM sent
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

i'll have a look and get back to you later.

Cheers.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

nigelk wrote:
Mon May 22, 2017 11:56 am
i'll have a look and get back to you later.

Cheers.
Not a problem, Thankyou Nigelk
welshboy06
Posts: 165
Joined: Wed Mar 01, 2017 2:06 pm

I know you specifically asked for an Excel way to do this, but if you have any sort of programming experience (You mention VBA) then I'd suggest learning a little bit of python.
With little knowledge you can use LinusP's API (BetfairLightweight) and manually fetch the JSON results and save to a file. You can save these as csv, json or (with a bit more knowledge) directly to a database. One major advantage of this is you can decide how and what to store and there's a lot less CPU/Mem overhead than having excel to it. Plus you can get data in 200ms chunks if you wish.

Python is one of the more simpler languages to learn (That I've come across) and I'm sure if you give it a little time you can make something to get the data you need.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

Iv managed a bit of simple VBA coding and have it running currently and it is doing the job but I agree with you, iv always wanted to have a look into Python and will need to one of these days, a very powerful tool to have.
welshboy06
Posts: 165
Joined: Wed Mar 01, 2017 2:06 pm

It is indeed. Now I just need to master this trading malarkey and I'll be set!
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

welshboy06 wrote:
Mon May 22, 2017 1:04 pm
I know you specifically asked for an Excel way to do this, but if you have any sort of programming experience (You mention VBA) then I'd suggest learning a little bit of python.
With little knowledge you can use LinusP's API (BetfairLightweight) and manually fetch the JSON results and save to a file. You can save these as csv, json or (with a bit more knowledge) directly to a database. One major advantage of this is you can decide how and what to store and there's a lot less CPU/Mem overhead than having excel to it. Plus you can get data in 200ms chunks if you wish.

Python is one of the more simpler languages to learn (That I've come across) and I'm sure if you give it a little time you can make something to get the data you need.
Dont fancy my chances much with Python, took me an hour to actually get the command propmt to recognise what it was :lol: :lol:
welshboy06
Posts: 165
Joined: Wed Mar 01, 2017 2:06 pm

Haha yeah that can he a pain sometimes. If you did want to try it out, I'd suggest IntelliJ pyCharm. The best ide I've used, I use their java ide too.
User avatar
HRacing
Posts: 278
Joined: Tue May 14, 2013 11:25 am

welshboy06 wrote:
Tue May 23, 2017 12:56 pm
Haha yeah that can he a pain sometimes. If you did want to try it out, I'd suggest IntelliJ pyCharm. The best ide I've used, I use their java ide too.
Its like iv stepped into another world :lol: iv lived a sheltered life :lol:
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”