Pages:
Actions
  • #1 by Emil on 19 Oct 2018
  • Hi,
    I need please a trigger to work in Horse races,
    lay or back.
    Now, I alternate markets by using 
    trigger 1: market_index = 1
    trigger 2: market_index = 2
    trigger 1: market_index = 3
    trigger 2: market_index = 4
    trigger 1: market_index = 5
    trigger 2: market_index = 6
    so I need to replace with a variable for odd or even
    numbers
    thx
  • #2 by Tim (WellDoneSoft) on 19 Oct 2018
  • Hello,

    You can use market_index%2 is equal to 0
    But... when you or MarketFeeder delete finished/settled markets from "My markets" the market_index is changed and your triggers will get messing.
    I would suggest you to create a global variable, say myIndex, set to 0.
    Then when your triggers (1 and 2) fire (as a second action) set myIndex to (myIndex+1)%2
    And replace checking market_index to checking "myIndex is equal to 0" in trigger1 and "myIndex is equal to 1" in trigger2.
    And add a condition to check if the opposite trigger hasn't executed on this market.
  • #3 by Emil on 19 Oct 2018
  • Hello,
    Thank you for your fast response. I use "Delete all except 400 most recent markets".
    I will follow your advice. If something goes wrong I will contact you
    Cheers 
Pages:
Actions