Author Topic: Resetting constants  (Read 1204 times)

  • All members
  • Posts: 28
  • Gender: Male
Resetting constants
« on: 09 Feb 2020, 16:11 »
Hi,

I am trying to run a trigger that remembers the highest rank of the favourite in each race.

Attached is the test that I have been running.

I want to remember the rank only if it goes above 2.

I have made a constant "high" and set the initial value to 2. I have also set it to start with the initial value.

In the trigger I have set it to operate individually for each market.

The problem I have is that, when I check in the user variable viewer, the trigger is not resetting to 2 for each market, it remembers the highest rank from all the markets overall.

Is there a way I can get it to reset to 2 for each market, and if two races overlap, have the value record separately for each market?

Thanks for any help you can provide.

Kind Regards

John

  • All members
  • Posts: 28
  • Gender: Male
Re: Resetting constants
« Reply #1 on: 10 Feb 2020, 18:16 »
Hi,

I have managed to find a way to reset the constant at the beginning of a race. This is working fine. However, I would still be interested in your thoughts.

The only problem that I now foresee is when a later race starts before the previous one has finished, as the second race starting would reset the constant and could cause bets to be placed incorrectly in the first race.

I am still trying to thunk of a way to avoid this happening, but would appreciate your input.

Kind Regards

John

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Resetting constants
« Reply #2 on: 25 Feb 2020, 21:14 »
Hello John,

Sorry for the delay in my response.

From what I can see, you have set the scope of the variable to "Individually for each event", which, in case of horse races, means the racecourse where a number of races take place that day, e.g. Wolverhampton. Thus each time you run a market from that venue, the value of the variable is overwritten.
I know this sounds confusing, but it takes its roots from the term "meeting" that BetFair uses to denote all races that take place on a particular racecourse.

To make a variable have a unique value for each market, use "Individually for each market".

Also, once you've introduced a constant with the name "high", it automatically assumes the global scope, so changing it later to a different scope using a trigger may produce confusing results. If you need to initialise a market variable, just create a separate trigger for that.

See the reworked trigger attached and let me know your thoughts. The new variable you'll need to check is market_high.
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