I-XL's data capture spreadsheet multi market

Post Reply
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

How would you fire bets in? Would it not be better to use a rolling logger than an ever-expanding one that gradually gathers more and more data thus slowing down your system? (Just food for thought)

I'm still rubbish at VBA myself but maybe something like this could work? ...

Code: Select all

Sub Example ()

If Worksheets(“Bet Angel”).Cells("G1") <> “In Play” And
Worksheets(“Bet Angel”).Cells("H1") <> “Suspended” Then
Call CopyData

End if
End Sub
Run that in your sheet code so as long as G1 and H1 are not in play or suspended your CopyData sub would run and then just make sure your CopyData sub is in a separate module somewhere so it can be called. Only problem with this is the system would stop if either one popped up so you may want to think how you could refine this for your needs. Hope this helps a little.
jonedelman
Posts: 17
Joined: Sat Aug 20, 2011 4:17 pm

Thanks Callum

Was thinking of tracking things in the data capture sheet and then using that to fire bets into the main BetAngel sheet ..... sadly Excel skills are lacking !
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

BA Rolling Logger Test Dogs.xls
This may help you get started. This is a rolling logger I made, the only part you need (Can just copy and paste the code from VBA into your own workbook) is the yellow area and the 30 cells underneath. You put your formula(s) inside the yellow area and it ticks down the sheet every second. I assume you're going to take some average like an EMA or something so this is the best way to do it as the spreadsheet only 'remembers' the past 30 seconds so your system won't get swamped.

I'll leave the rest for you to figure out as it's a good way to learn. Good luck :)
You do not have the required permissions to view the files attached to this post.
CallumPerry
Posts: 575
Joined: Wed Apr 19, 2017 5:12 pm
Location: Wolverhampton

Change the interval setting before attaching to a market and then save the document? Once it is linked to a market it will be running constant VBA code so best to make any modifications between going live always. That should be a total fix but if not you're best to just make your refresh (Restrict refresh in Guardian too) one minute, that way the spreadsheet will only 'talk' to BetFair once a minute giving you minute by minute updates per each line.
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

The code expects the "Data" sheet to always be the active sheet, when you switch to "Bet Angel", it can't find what it's looking for on that sheet, so, as you found, it throws an error.

To re-set it without closing it down, make sure that the "Data" sheet is the one in view, then just below the "run" button on the top row, there's a little blue box (re-set), press this.

Try the code below (untested), it does the same thing as what you've already got but doesn't need to select anything, hence there shouldn't be a problem when switching between sheets.

Code: Select all

Sub Record_data()


' Record_data macro


Dim rngFrom As Variant, rngTo As Variant

Set rngFrom = Sheets("Data").Rows("5:5")

Set rngTo = Sheets("Data").Rows("7:7")

rngTo.Value = rngFrom.Value

With Sheets("Data")

.Rows("7:7").Insert

End With
'
End Sub
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Deleted … wrong thread
Last edited by firlandsfarm on Fri Mar 08, 2019 12:56 pm, edited 2 times in total.
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Deleted … wrong thread (though you can read it in gutuami's post that follows together with his disrespectful implication)
Last edited by firlandsfarm on Fri Mar 08, 2019 1:00 pm, edited 1 time in total.
User avatar
gutuami
Posts: 1858
Joined: Wed Apr 15, 2009 4:06 pm

firlandsfarm wrote:
Fri Mar 08, 2019 10:36 am
Nigel, thanks for your reply and I think I posted my error in the wrong thread, my error was of course related to the single market spreadsheet and I'm going to assume you noticed that and your revised code is for that spreadsheet. My apologies to all for any confusion. (Can a moderator move my offending threads to the Betfair Data : Recording market odds spreadsheet - capturing data thread where they should be.)

OK, now to carry on … awaiting revised content
I am going to assume that Nigel is not obliged to do that revision even if it's his own code.
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

I'm sorry guys, you must all think I'm crazy, replying to post that are not here! Something seems to have gone crazy with my posts … posts are appearing in the wrong threads! I don't know how that's happening or why. I will try and delete and repost to sort it out. But gutuami I have to say that does not excuse you for the implication in your post. I have never, ever, considered anyone in this or any other forum to be under any obligation to do anything for anyone else … until now and I resent your inference otherwise.
User avatar
MemphisFlash
Posts: 2126
Joined: Fri May 16, 2014 10:12 pm
Location: Leicester

oh here we go. the snowflakes kicking off again.!!!! lol

Fight, Fight, as the kids at school would gather round.
if you two start trading punches make sure we can all trade the fight.

in the blue corner we have Gutami, and in the red corner we have firlandsfarm
Let's get ready to rumble!!!!
User avatar
firlandsfarm
Posts: 2688
Joined: Sat May 03, 2014 8:20 am

Hey Memphis I can assure you snow doesn't sit on me for long. :lol: It should have been clear to anyone that my message was thanking Nigel for something he had already done and not looking to scrounge a feebe! Maybe I over reacted but I don't take kindly to someone questioning my honour. Let that be the end of it … love to all :D
Facedcomic
Posts: 5
Joined: Wed Apr 15, 2009 4:53 pm

Hi Nigel,

I'd just like to thank you for this spreadsheet and the work you've put into it.

Many thanks
Steve
Facedcomic
Posts: 5
Joined: Wed Apr 15, 2009 4:53 pm

Hi Nigel,

I'd like capture some data with milliseconds incorporated into the timestamp format ("hh:mm:ss.000"). I'm thinking if I could change the countdown time format this would be possible. I've tried to find the format within the vba project, but I'm thinking this is the part of the project I can't access. Is there a way I can change this format without having to access the protected area? I'm trying to learn VBA but it's very minimal at this stage.

Also, I've created a sheet based on your spreadsheet with 50 Markets in it. I've made all the sheet code and formulae updates as outlined by yourself on the first page this post. In addition, I've added a new worksheet named 'CONSTANTS' - this can be found after worksheet 'Bet Angel (50)' and before worksheet 'Data'. I've added a 'INTERVAL.SECONDS' constant to this page. I've updated all the data sheets so that the user can change the 'Interval (seconds)' value in the 'CONSTANTS' worksheet and it will update the G1 cell across all the 50 data capture sheets.

If it's ok with you I can post this up for anybody who may find it useful.

Many Thanks
Steve
jtrader
Posts: 100
Joined: Thu Feb 09, 2017 11:35 am

Excellent work,nigelk! Everything is working fine :!:

But if someone could change something in VBA code I think,cause to be possible to change capturing interval - I need for example -15,20,30 secs and etc.?
Post Reply

Return to “Betfair Data”