Pages:
Actions
  • #1 by armarni on 15 May 2014
  • 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
  • #2 by mcbee on 18 May 2014
  • hi
    working on the trigger now


    mcbee
  • #3 by Oxa (WellDoneSoft) on 18 May 2014
  • Hi mcbee,

    Sorry to intrude, but since there was no response in this topic I decided to help with this, so I have the triggers ready.

    armarni, please see the file attached. The solution does not look elegant, but it works, so that's something. Like mcbee suggested, you need 10 variables to hold the previous result (i.e. whether the favourite has won or lost). When you get to the end of the sequence, these values get shifted, so that the first variable contains the result of the second, the second - the result of the third and so on. In the end you sum up these variables to get the number of races where the favourite has won.

    This number will be stored in wins_counter.

    If you are going to use these triggers in combination with yours, then add this block on top of your triggers and query the wins_counter in your trigger expressions.

    I also want to add that this has been a great mental exercise as the task turned out to be non-trivial!
  • #4 by armarni on 18 May 2014
  • Hi Oxa

    Thanks for your effort on this, I'll incorporate it now.  It was tying me up in knots trying to get my head around how to do it, so I  appreciate your time on it.

    And thanks to Mcbee as well for starting to work on it as well.

    Hopefully other people will find a use for it as well in their strategies.
  • #5 by armarni on 22 May 2014
  • Please be aware that while this works very well in test mode, I had to tweak it to work in live mode.  For some reason the trigger doesn't register a win when the market is settled in live mode.

    I found the only way around this was to put in a live bet and then it would register the win.

    Hope that helps anybody whose stuck.
  • #6 by Oxa (WellDoneSoft) on 08 Jun 2014
  • Hi armarni,

    Did the white "WINNER" label appear in the live markets where you were testing the triggers?
  • #7 by Angelito20 on 08 Jun 2014

  • Oxa (WellDoneSoft) i like your trigger. Well done. Its possible add the folowing:

    Number of lost in a row for the present moment:
    Number of win in a row for the present moment:
    Max nÂș of win in a row:
    Max n0 of lost in a row:

    Thanks
  • #8 by armarni on 09 Jun 2014
  • Hi Oxa

    In test mode the white winner label came up instantly the market settled from betfairs RSS feed.  In live mode however, the winner label comes up after the market has settled, approximately 20 seconds later.

    I dont have any market or bet refreshes set anywhere near as long as 20 seconds so I think its a betfair side issue.
  • #9 by Oxa (WellDoneSoft) on 27 Jun 2014
  • Oxa (WellDoneSoft) i like your trigger. Well done. Its possible add the folowing:
    Hi Angelito,

    Please make a new tirgger request for additional changes.
  • #10 by Engineer on 24 Nov 2014
  • Hi, I like the way this trigger works, but when I add a back trigger which refers to wins_cntr it does not trigger. Can anyone help? Many thanks.
    I have attached a screenshot.
  • #11 by Oxa (WellDoneSoft) on 25 Nov 2014
  • As always, bring in the logs from the trigger.
Pages:
Actions