User Variable Scope

Trigger tools include a powerful instrument called user variables. With variables, you can remember some temporary states of market, account, or application, and then change them or use them in your betting actions.

What are trigger variables?

Let’s look into what a variable scope is.

Triggers have five variable scopes:

Let’s start from the last item. If a variable is defined individually for each selection, it will have as many values, as there are matching selections (the ones that satisfied the criteria of the trigger). Therefore, each selection will have its own copy of var5, and it will store that selection’s last traded price.

So if you check the following trigger condition:

Selection’s Trigger Expression var5 is greater than 10.0

then for some selections it will be true, while for others not, as the value of this variable is individual.

Let’s move one item up. Now let’s check the same condition for var4 (market volume) whose scope is “Individually for each market”:

Selection’s Trigger Expression var4 is greater than 10.0

The result here will be the same (either true or false) for all selections in that market, as this variable will hold the same value for all of them. However, if you check var4 in a different market, its value may be zero (if the market has no traded money yet), so the condition will return a different outcome.

Using the same train of thought, let’s move further up. A variable within the same sport event will hold the same value for all markets within that event. By setting var3 to the current number of goals scored by the first team in the Correct Score market, you will see the same value in Match Odds, Over/Under markets, etc.

Within a racecourse, var2 will have the same value (country code), for all races that take place in that course, e.g. Wolverhampton.

Lastly, the global variable var1 will be visible from any trigger expression in any market, so by changing it in some trigger, you will instantly affect all other triggers where it is used.

You can also change variable values on the fly using the View Variables window. Watch this video tutorial for more details:

If you have not heard of BetFair yet or do not have an account, register today and get £20 free. Use the link below:
New customers only, bet up to €/£20 on the Exchange and if your first bet loses, we’ll refund you €/£20 in Cash. Bet must be placed in first 7 days of account opening. T&Cs apply.
Gamble responsibly! Always be aware that betting is NOT risk-free. You must be 18+ years old before you try gambling, but even as an adult, withhold from spending money in an ill-judged manner. Our company does not encourage you to prefer gambling over other meaningful activities. If gambling is affecting your life or the lives of people close to you, please contact GamCare
 
© 2005-2024 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of Flutter Entertainment plc. Gamble responsibly.