Author Topic: Repeating triggers  (Read 339 times)

  • All members
  • Posts: 17
Repeating triggers
« on: 06 Jun 2020, 18:13 »
Hi guys,

I'm trying to do a trigger that lays the current winning match selection in soccer whenever a goal is scored and the goal difference is one or less.
So for instance, if the home team scores it lays the home team, then if the home teams scores again it doesn't do anything, but if the away team equalises it lays the draw, and so on as the goals are scored.

I'm trying to do this in a loop of some sort, but having trouble with it detecting when a goal is scored.  The conditions I'm using is 

Selection's Index is equal to 1
AND Selection's Trigger Expression market_score1 - market_score2 is equal to 1

(changing the index to 2 or 3, and change the expression appropriately).

If I set the trigger to repeat they fire off all at once the number of times I've set to repeat.  How do I tell it to fire, wait for the next goal, then fire again, then wait?

I've tried the condition Market's Score has changed but this returns false on a goal.

  • Administrator
  • Posts: 8803
  • Gender: Female
Re: Repeating triggers
« Reply #1 on: 07 Jun 2020, 08:33 »

You would need to add a user variable, say, last_bet_time, and set it to now_time each time you make a bet (add it as a second action to the betting trigger). Then in the conditions of the betting trigger you need to check that at least 30 seconds has passed since the last bet:

Selection's Trigger Expression (now_time - last_bet_time)/mf_second is equal or greater than 30
and Market's Minutes Since the last goal is greater than 0.5

Also remember the last score that the match had when you placed the bet (add another user variable) and check that the current score is greater than that last score, to prevent the trigger betting when the score is still the same.

Hope this helps. If you're struggling, please make a trigger request.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!


Please note, BetFair is seems to be currently OFFLINE