Author Topic: condition help  (Read 4000 times)

Tags:
  • Beta tester
  • Posts: 197
  • Karma: +4/-0
*
condition help
« on: Wed, 26 March, 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: 590
  • Karma: +27/-1
  • Gender: Male
  • I think I could be on to something here!
*
Re: condition help
« Reply #1 on: Wed, 26 March, 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!

  • Beta tester
  • Posts: 197
  • Karma: +4/-0
*
Re: condition help
« Reply #2 on: Wed, 26 March, 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!

  • Moderator
  • Posts: 4166
  • Karma: +246/-9
  • Gender: Male
*
Re: condition help
« Reply #3 on: Fri, 28 March, 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.

  • Beta tester
  • Posts: 197
  • Karma: +4/-0
*
Re: condition help
« Reply #4 on: Fri, 28 March, 2014, 17:22 »
Thanks mcbee, I'll try it over the weekend...

  • Beta tester
  • Posts: 197
  • Karma: +4/-0
*
Re: condition help
« Reply #5 on: Mon, 31 March, 2014, 17:46 »
that was simple and worked perfectly mcbee, once again, many thanks...  :)