22/03/2020

1. How to choose only markets with selections I list in a file? Like team names, horses, etc.

Use the “is in file” condition:

Selection’s Name is in file.

Add the names of selections for the markets where you want to bet to a text file (one selection per line), enclose them in double quotes. See a sample text file below. One selection per market is enough.

List of selections in a text file

It could be less straightforward if the selections you list are from a different market of the same event. For example, suppose you want to back on Over 2.5 goals in football matches where certain teams play (and delete all others)? As you know, this market contains only two selections: Under 2.5 and Over 2.5, not the names of the teams playing.

In that case you can check the names of the teams in Match Odds and then bet on Over 2.5 goals if the Match Odds trigger sets a variable.

Obviously, you will need to add Match Odds along with Over/Under 2.5 goals (you can do this automatically using Market Locator). The Match Odds market is deleted automatically by the trigger.

Check markets with selections in the file

Just make sure the path to the text file is correct. You can download the file with these triggers at the end of this article.

2. Can I create a variable on the fly, while my triggers are being executed?

Yes, you can create any number of variables while refreshing markets and running the triggers. Use the View User Variables window for that purpose. Add a new line and type in the name of the variable. Remember that you can’t use the names of built-in trigger variables or names that contain complete names of existing variables.

Add a new variable

You can choose the scope of the variable (Global, Sport or one of the markets in My Markets):

Set the scope of the variable

Right-click on the newly entered variable and choose “Set Value”:

Set the value of the variable

Watch a video on how to influence the work of triggers by adding or changing the values of variables.

3. How to check that a selection has won or lost in the market?

The winning places become known after a market is settled. Until then the place of each selection is equal to zero. Therefore, you can only check if a selection has won or lost in a settled market, by addressing its sel_place variable. In a Win market, the only winner will have sel_place=1 and all other selections will have sel_place=0. In a Place market, two or more winners will have their sel_place>0, and all others will have sel_place=0.

So for example, you want to check if a selection that you laid on using a trigger called “laying” has lost in the market. Here is what you need to do:

Check whether the selection lost

Note how you must not only check that the losing selection’s sel_place=0, but also that any other selection’s sel_place>0, otherwise the trigger may work before time, as a market can be settled slightly earlier than its winners are announced.

You can download the file with these triggers at the end of this article.

4. How to imitate the partial matching of a test bet?

In order to error-proof some betting strategies, you may need to test them for situations when only a part of your back or lay bet is matched.

Normally, the Test Mode will not provide this opportunity, as your bet will be matched in its entirety if the current best price of the selection is equal or better than the price of the bet, even if there is not enough money in the market. This is happening because a test bet cannot influence the market with real money.

However, there is a way to imitate the partial matching of a test bet. Here is how.

After an unmatched bet appears in the Unmatched Bets panel, click inside the amount field and type in a fraction of your bet that you want to be matched.

Edit the amount of the bet

Press the Update button to apply the changes, then the Force-Match button to manually match this bet:

Update and force-match

Don’t be deluded: the Force-Match button only works in Test Mode (life would be so much easier if it worked in real mode too!).

The matched part will appear in the Matched Bets panel. Now right-click on any of the betting buttons of this selection (or left-click if you have not activated One-Click betting) to open the Betting Interface:

Place the second part of the bet

Enter the rest of the bet and press Lay or Back. Now you have a partially matched bet:

An imitation of a partially matched bet

Download the file with the trigger examples in this article.

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-2020 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of The Sporting Exchange Limited. Gamble responsibly.