13/06/2019

1. What is the closest possible alternative for SP in markets where SP is not supported?

You can use last_last_traded, which is the last price at which a bet was matched on this selection before the market turned In-Play.

2. What is the difference between the runner_number and matching_number variables?

The runner_number variable contains the number of selections in the market. It does not change even if you disable some selections for auto-trading.

The matching_number variable returns the number of selections that have met the criteria of the trigger up to the moment when you are checking it. This variable does not hold any value outside of the trigger where it is checked. It can be less than runner_number if not all of the selections fit the conditions or if you disabled some of them for auto-trading. Here is an example:

In a typical Greyhound race there are 6 runners, so runner_number will be 6.

Then you check this condition in a trigger:

Selection’s Back Price is less than 9.0

Suppose, only 2 dogs have price less than 9.0.

In that case, if you write this expression in the Amount field of the trigger:

Amount: runner_number/matching_number

The amount of the bet will be 6/2 = 3.

3. How do I add only Handicap (Chase, Hurdles etc.) horse races and delete all others from My Markets?

As of now, BetFair does not provide any indicators of the type of the race (weights, turf, hurdles) except in the market’s name. Here are some shortened patterns in the names of races:

Therefore, you can look for these patterns in the name of the market you want to add to your list.

Here is how you can do this in Market Locator:

Search for handicap horse racing markets

However, this is only true for Win markets, as BetFair does not add these patterns to the names of Place, Each Way, TBP etc. markets.

Only win markets have Hcap in their names

You can solve this problem by loading both Win and Place (or others, as needed) markets, and then deleting those that do not contain Hcap in their respective Win market.

Download the trigger file that deletes markets which do not contain the specified pattern

4. How can I match any unmatched bets before the start of an event?

We have special trigger actions for this, match back unmatched bets and match lay unmatched bets.

Add a trigger that does both at a certain time before the off.

Match unmatched back and lay bets

5. Sometimes variables can be empty, i.e. they are not equal to 0, just blank, as in the case of imported_1 – a variable for an optional value imported from a text file. How do I work around these empty spaces in a trigger expression, for example if I want to use a default value if the variable is empty?

If you insert an empty variable into a trigger expression, it will generate an error.

To work around this, you can add zero to the empty variable, e.g.:

IF(imported_1+0 > 0.05, imported_1+0, default_backa)

The trick here is that is imported_1 is empty, the expression will be down to:

IF(+0 > 0.05, +0, default_backa)

which is a perfectly valid trigger expression, and it will return default_backa.

On the other hand, if imported_1 does have some value, e.g. 3.5, then 3.5 + 0 will still be 3.5, so this won't affect your staking plan.

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.