Pages:
Actions
  • #1 by demon on 26 Mar 2014
  • Hi, I'm trying to put in a condition in my horse racing back trigger which will only fire when the current back price for every selection is added together and divided by the total number of runners, with the resulting figure being equal or greater than 13.75

    Can anyone help with this? I'm struggling ::)

    Thanks...
  • #2 by 1oser on 26 Mar 2014
  • the most I have see was like 25 runners in a UK race.

    I would add up all the runner up to 30.
    selections trigger expression
    ((r_1_back_price + r_2_back_price ..... r_30_back_price) / runner_number) is greater than 13.75

    for the r_whatever that are not there you are adding 0 so it will not affect the average.

    Edit: corrected calc .. double check it
  • #3 by demon on 26 Mar 2014
  • Thanks for the quick reply 1oser, although I was hoping for a shorter solution, if this works, I'll use it...

    I had wrongly assumed (for example) 'r_30_back_price' would cause an error, due to there not being a 30th runner in the field (or the price of any of the non existent runners which were being sought by the trigger)

    Many thanks!
  • #4 by mcbee on 28 Mar 2014
  • hi
    the easy way is to have 2 triggers
    first trigger
    set user variable
    name= rv
    value= 0
    once per market

    second trigger
    first action
    set user variable
    name= rv
    value= rv+back_price
    second action
    set user variable
    name= rv1
    value= rv/runner_number
    once per selection

    in the variable screen type rv1 , now you will see the value that you want

    mcbee
  • #5 by demon on 28 Mar 2014
  • Thanks mcbee, I'll try it over the weekend...
  • #6 by demon on 31 Mar 2014
  • that was simple and worked perfectly mcbee, once again, many thanks...  :)
Pages:
Actions