Referring to a Value in the Past in Excel - Please Help!

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
mmp2018
Posts: 2
Joined: Fri Oct 26, 2018 5:30 pm

Hello

I was wondering if anyone can please help me.

I have been messing around with automation in Guardian for some time now and have now progressed on to Excel. Currently trying to learn VBA - I am on a mission!

Basically, I am trying to find a way to refer to a price/volume etc that is in the past, compared to the present value for that indicator in the standard Betangel Excel template. In Guardian, the commands make this quite easy to refer to a past price for example, so I'd just select a Historic Relative Odds condition for example.

If anyone could please point me in the direction of how this can be done in Excel, i'd be very appreciative! I am sorry if there is a thread on this and I have missed it, however I can't seem to be able to find anything.

Thanks for reading and in advance for any help!

Steve
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Steve what you'll need to do is create a routine in vba that periodically reads the data from the BetAngel sheet and appends it to another sheet. Essentially creating your own history of price changes, or of any item that's exported by BA such as Volume or Weight of Money. Each of these stored lines should also have the catpure time in one of the columns. Your code which is making descisions and creating bets will use that History sheet as its source of info, perhaps also using info from the 'live' sheet.

I think there's some data capture excel examples somewhere on the forum that will help to get you started.

It's not super easy if you're a beginner, it might take you a week or two, but it will be really educational to have a go and enormously satisfying when you get it working. Once it's done I'm sure you find other uses for it such as using those stored price histories to do some analysis on.

Take some time up front to design where you want this to go, so you know what to capture, how often, pre-play or in-play etc , and then just tackle it piece by piece.

good luck
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

...or a simpler version, once you have a routine that runs periodically, just store the value you want in column = Z, line number = CountdownSeconds on the BetAngel sheet ?

If you want to look at the price 30 seconds ago, just read cell col Z, line number CountdownSeconds +30

Basically you have to do the recording of old info yourself. How, where and why is down to you and people do it in various ways with varying levels of sophisication. Once you've made a start, you can build on it.
spreadbetting
Posts: 3140
Joined: Sun Jan 31, 2010 8:06 pm

mmp2018 wrote:
Fri Oct 26, 2018 5:43 pm
Hello

I was wondering if anyone can please help me.

I have been messing around with automation in Guardian for some time now and have now progressed on to Excel. Currently trying to learn VBA - I am on a mission!

Basically, I am trying to find a way to refer to a price/volume etc that is in the past, compared to the present value for that indicator in the standard Betangel Excel template. In Guardian, the commands make this quite easy to refer to a past price for example, so I'd just select a Historic Relative Odds condition for example.

If anyone could please point me in the direction of how this can be done in Excel, i'd be very appreciative! I am sorry if there is a thread on this and I have missed it, however I can't seem to be able to find anything.

Thanks for reading and in advance for any help!

Steve
It's all relatively easy in excel, basically you'd either copy the data you want into a static variable or if you're new to vba the easiest thing is to copy the data to an area within your worksheet that's not being used i.e. you copy the contents of F2:F50 to AA2:AA50. In vba that's as simple as

Code: Select all

Range("AA2:AA50").value=Range("F2:F50").value 
To freeze the data we simply add conditions such as if AA2 is empty then we haven't run the code, if you only want it to run at set times you'd add additional conditions too.

Code: Select all

If Range("AA2:AA50").value="" Then  Range("AA2:AA50").value=Range("F2:F50").value 
There's a few example sheets on the forum but with little details it's hard to second guess when you want things to grab the data. Have a look at some of the odds logging sheets as the code on those should be enough to get you started.
mmp2018
Posts: 2
Joined: Fri Oct 26, 2018 5:30 pm

Shaun & SB

Thank you for your quick responses - both very helpful and I am surprised that this actually seems to be within my fairly limited VBA capabilities at the moment :D

This gives me a great starting point and I'll enjoy trying to get it working.

Thanks again for taking the time to come back to me

Cheers
Steve
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”