Author Topic: Question  (Read 1125 times)

Tags:
  • All members
  • Posts: 14
  • Gender: Male
Question
« on: 05 May 2017, 14:41 »
I'm playing with "Greening up on multiple positions with a target profit" trigger, and i can't understeand this condition:
"and Selection's Trigger Expression sel_id % 2 is equal to 0"

I understeand this is the randomize function, but i can't see what it exactly does.
It doesn't look for the 2nd number to be 0, and it doens't look for 0 in the entire id

What does "% 2" mean?


And as a side question
On some races, it returns true for say 7 selections, so it doens't bet at all since this condition is false (max bets set at 5):
"and Selection's Trigger Expression matching_number is between 1 and max_bet_num"

How can i make it to, in that case, back the first 3 selections? So it activates the random lay trigger, with still 2 bets to make

  • Moderator
  • Posts: 3597
*
Re: Question
« Reply #1 on: 06 May 2017, 19:22 »
Hi
Good question. It is modulus or remainder. The help file describes as:
% modulus or remainder. For example, 5 % 4 = 1, 36 % 6=0, 23 % 7 = 2

so the idea in the trigger is to randomise whether to back or lay the selection according to the remainder or modulus of selections ID (sel_id)

the attached screenshot shows how it works
there is a selections id. this number is divided by 2, and there is no remainder (it divides equally into 2) so it returns 0

and selections trigger expression sel_id % 2 is equal to 0
therefore this selection will have a back bet not a lay bet


 
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: 14
  • Gender: Male
Re: Question
« Reply #2 on: 09 May 2017, 23:29 »
Thank you very much. I understand now how it works


 

Please note, BetFair is seems to be currently OFFLINE