I-XL's data capture spreadsheet multi market

CallumPerry
Posts: 523
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: 523
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: 523
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
firlandsfarm
Posts: 1390
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.
firlandsfarm
Posts: 1390
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: 1810
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.
firlandsfarm
Posts: 1390
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: 1453
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!!!!
Post Reply

Return to “Betfair Data”