Hi,
I started a topic about this in the triggered betting section, but Mcbee suggested that I posted a request here instead.
I'm trying to create a trigger to monitor how often the favourite has won in the last 10 races. I basically only want to look at the results from the previous 10 races, so this figure will be dynamic as each day progresses:
I'll try and give an example to explain further:
1st 10 races of the day the fave wins 4 races spread through the 10 races:
Race 1 Race 2 Race 3 Race 4 Race 5 Race 6 Race 7 Race 8 Race 9 Race 10
Win Win Loose Loose Win Loose Win Loose Loose Loose
so, in the first 10 races the fave has won 4 out of 10 races, so 40% of the previous 10 races
The fave then looses both race 11 and race 12 of the day:
Race1 Race 2 Race 3 Race 4 Race 5 Race 6 Race 7 Race 8 Race 9 Race10 Race 11 Race 12
Win Win Loose Loose Win Loose Win Loose Loose Loose Loose Loose
so, in the last 10 races the fave has now only won 2 out of the previous 10 races, so 20% of the previous 10 races.
I'm trying to just work out the number of winners in the previous 10 races, but that figure is constantly evolving.
Mcbee suggested that I would need 10 variables to record the wins/losses and have them advance after 10 races, so variable 1 would be a new figure, variable 2 would take the value of variable 1 etc all the way down to variable 10 which would take the value of variable 9.
I could then get an percentage of how many races the fave had won in the previous 10 races using the formula (winners/races)*100
Hope that's enough info, and thanks for you help