Start a timer when Market goes INPLAY!

Discussion regarding the spreadsheet functionality of Bet Angel.
Post Reply
Sneeto
Posts: 5
Joined: Sun Mar 07, 2010 8:40 pm

Hi Guys
I have just spent three days searching for the right code, without any luck :(
I am not an Expert at programming and I know this is really easy.
What I basically want the spreadsheet to do is:
When market goes INPLAY, Start the timer.
The timer should be in seconds (only showing seconds in a cell)
I am going to use this, because then I know for how long the market has gone In play, and I can place my bets. This is a strategy for football, match odds.
The timer should stop counting automatically after a period of time (seconds).
Can anybody help me with this?
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

We are playing with putting the Bet Angel timer into Excel today. So you may want to wait till we have managed to do that.
Sneeto
Posts: 5
Joined: Sun Mar 07, 2010 8:40 pm

That sounds great, thanks a lot!
Zenyatta
Posts: 1143
Joined: Thu Mar 11, 2010 4:17 pm

As far as I can see the basic Excel functions can't record values at given times (no variables), which is very annoying. The only solution as far as I can see is to resort to VBA programming.

The following simple Excel functions provide a timer giving you the time in seconds before/after the advertised off-time, the trouble is, the advertised time won't neccesserily match the real time, because events are often delayed and don't start until several minutes after advertised time start time.

Put this in cell C70: it extracts the off-time from cell B1:

=RIGHT(LEFT(B1,SEARCH(":",B1,1)+2),5)

Now, make sure cell C71 (the cell you want to use as a timer) is formatted to the 'Number' format, and put this in:

C71=(C70-C3)*86400

This simply subtracts the last refresh time (cell C3) from the off-time (cell C70) and gives you the result in seconds. The timer will show a positive number indicating seconds before the off-time, and a negative number indicating seconds after the off-time.
Sneeto
Posts: 5
Joined: Sun Mar 07, 2010 8:40 pm

Hey Zenyatta
Thanks for the respond, but unfortunately there is no advertised off-time in the soccer odds market. It would probably work just fine in horse racing markets. That is why I wanted to create the timer when the market goes inplay.
As bet Angel said above, they are going to put the BA timer instead. But this leaves me with two problems.
1. The timer will probably look like this hh.mm.ss. How can I put an IF statement (among other statements), if I wanted to fire a bet between say the first minute and 40. Minute???
2. The second one is as you mentioned before, the events don’t always start on time. But here maybe the bet angel timer don’t start running until the event actually has gone in play??
PeterLe
Posts: 3715
Joined: Wed Apr 15, 2009 3:19 pm

Hi
Can you now create a conditional if when cell g1 states "in-play" ??
Regards
Peter
Bet Angel
Bet Angel
Bet Angel
Posts: 3999
Joined: Tue Apr 14, 2009 3:47 pm

We should point out that any timer we implement would only count up from that initial suspension or from when you join the market. There is no regular data that comes from the market that exposes the time the actual event went off. So it is not possible to implement that.
Sneeto
Posts: 5
Joined: Sun Mar 07, 2010 8:40 pm

Hi Peter,
no! Not yet, but I think the only solution is to create a macro. In this topic: viewtopic.php?f=19&t=1377&p=7635&hilit=timer#p7635
Nigel has created a timer, you push a button and it counts in seconds. That would be perfect for counting time when market has gone in play. So the question is, - is it possible to change the scripting and instead of bushing the button, when “in play” appears in G1, the timer starts counting automatically!?
Any help with this, will be appreciated!
nigelk
Posts: 469
Joined: Wed Apr 15, 2009 11:00 pm

If you right click the BA sheet and view the code, you'll see two instructions under the worksheet change event.

One to run the timer if G1 is "IN PLAY", and one stop it running if G1 is empty. Put "IN PLAY" in G1 and the timer will start running, clear it, and it'll stop.

Please be aware that it is case sensitive, and whatever appears in G1, must also be the same as whatever is in the code, so "In play" and "IN PLAY" will not work
You do not have the required permissions to view the files attached to this post.
Sneeto
Posts: 5
Joined: Sun Mar 07, 2010 8:40 pm

thank you a lot! that is just what I needed :)
Post Reply

Return to “Bet Angel - Spreadsheet / Excel chat”