Pages:
Actions
  • #1 by pcal72 on 21 Jul 2013
  •  Hi all

    A friend of the Portuguese forum asked me for help but do not know the answer as I remembered to ask you this question together with friends here in forum English

    "
    I developed a trigger and now wanted to duplicate it, what I want is entering alternately ... ie Trigger 1 (T1) and Trigger 2 (T2)

    Following racing, T1, T2, T1, T2 .....

    The first idea that occurred to me was to put a condition for the total number of runs, ie odd and even, the point is that I was looking in the manual and found no reference to where to put the expression "odd" and "even" ...

    I can always manually put 1,3,5,7 etc .... or 0,2,4,6 etc ... but this would be infinite ...

    How can I do what I want? is there another option rather than odd or even?

    thank you"

    So... is there a way via variable and or via formula know if a number is "odd" or "even"???


    Many thanks
    pcal72
  • #2 by mcbee on 22 Jul 2013
  • hi
    if you want to use alternate triggers, then add a variable to each trigger, call it   ok
    in the constants put
    ok                     DO NOT ALTER                  (value)  0
    now in the first trigger trigger add the action
    set user variable    ok    1
    in the conditions add
    and selections trigger expression ok is equal to 0
    and trigger (your second trigger name) number of runs is equal to 0

    in your second trigger add the action
    set user variable   ok   0
    in the conditions add
    and selections trigger expression ok is equal to 1
    and trigger (your first trigger name) number of runs is equal to 0

    so the first trigger will only activate if the value of   ok = 0 , then change the  ok value to 1
    the second trigger will only activate if the value of   ok = 1 , then change the   ok value to 0


    mcbee
  • #3 by pcal72 on 22 Jul 2013
  • Hi mcbee

    Yes this will solve the alternate triggers problem, for sure.

    Many thanks

    By the way, you know a way of we program MFP for recognize "even" and "odd" numbers?

    Is not already needes for this case but for others who need this option..
    Imagine one trigger that bets in determidated way if market id is  even and bets other way if market id was odd.

    Thanks again mate, always the best  ;D

    pcal72
  • #4 by Oxa (WellDoneSoft) on 22 Jul 2013
  • This is the formula for determining if a [number] is even or odd:

    [number] % 2 = 0 - even
    [number] % 2 = 1 - odd
  • #5 by pcal72 on 22 Jul 2013
  • Thanks Oxa

    One more post solved  ;D

    pcal72
  • #6 by RodrigoM. on 23 Jul 2013
  • Thank you very much for the support, tomorrow I will do some changes on the trigger and introduce the new conditions...  :P

    thanks
Pages:
Actions