Author Topic: condition help  (Read 5225 times)

Tags:
  • All members
  • Posts: 163
condition help
« on: 26 Mar 2014, 18:08 »
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...

  • Nerd
  • Élite
  • Posts: 462
  • Gender: Male
  • I think I could be on to something here!
*
Re: condition help
« Reply #1 on: 26 Mar 2014, 18:23 »
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
Fortune favors the brave!

  • All members
  • Posts: 163
Re: condition help
« Reply #2 on: 26 Mar 2014, 19:41 »
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!

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: condition help
« Reply #3 on: 28 Mar 2014, 10:13 »
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
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 163
Re: condition help
« Reply #4 on: 28 Mar 2014, 17:22 »
Thanks mcbee, I'll try it over the weekend...

  • All members
  • Posts: 163
Re: condition help
« Reply #5 on: 31 Mar 2014, 17:46 »
that was simple and worked perfectly mcbee, once again, many thanks...  :)

 

Please note, BetFair is seems to be currently OFFLINE