Author Topic: Alternate markets  (Read 752 times)

Tags:
  • All members
  • Posts: 9
Alternate markets
« on: 19 Oct 2018, 10:06 »
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

  • Tim Vetrov
  • Administrator
  • Posts: 4870
  • Gender: Male
*
Re: Alternate markets
« Reply #1 on: 19 Oct 2018, 11:48 »
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.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 9
Re: Alternate markets
« Reply #2 on: 19 Oct 2018, 12:25 »
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 

 

Please note, BetFair is seems to be currently OFFLINE