1. How to factor the exchange commission into loss recovery?

This is a seemingly simple question, but it puzzles many of you when you want to recover the losses from earlier bets by increasing your next bet. BetFair deducts a commission (anything from 4.5% to 7%) from your net winnings, so you need to take that into account when calculating the amount you want to bet.

The commission rate is applicable to each market (it can vary from market to market), and it depends on which country you are in, whether you pay a premium commission, and many other factors. Read more about the exchange commission here.

Let’s throw in a few basic formulas.


If you back bet_size at a price of back_price, you will get the following amount in profit, provided that the selection wins:

bet_size*(back_price - 1)*(1-commission)

If the selection loses, you lose bet_size, and the commission is not charged.

If you want to recover the whole amount of your current loss (let’s call it current_lss) in your next bet, in addition to your flat bet of bet_size, you need to back the following amount:

bet_size + current_lss/((back_price-1)*(1-commission))

where commission is your commission rate.


If you lay bet_size at a price of lay_price, you will get the following amount in profit, provided that the selection loses:


If the selection wins, you lose bet_size*(lay_price - 1), and the commission is not charged.

If you want to recover the whole amount of your current loss (let’s call it current_lss) in your next bet, in addition to your flat bet of bet_size, you need to lay the following amount:

bet_size + current_lss/(1-commission)

If you are considering a green-up bet on a selection after you’ve backed or laid it previously, then the built-in tradeout_net variable will give you the net P/L after the green-up bet is matched, with the commission already included. So if you're looking to recover current_lss with a green-up trigger, you would need to check that the following is true:

Selection’s Trigger Expression tradeout_net is equal or greater than current_lss

2. How to calculate the sum of back or lay bets in a market?

There are no dedicated variables for this, but you can easily make them yourself.

Calculating the sum of bets

Here’s an example of such trigger. It creates four variables with the sums of matched and unmatched back and lay bets.

mlay_bets_sum: sum of matched lay bets

ulay_bets_sum: sum of unmatched lay bets

mback_bets_sum: sum of matched back bets

uback_bets_sum: sum of unmatched back bets

Download the trigger file

3. Where are the statement files and program logs stored?

Your logs are stored on your computer in the following folder:

C:\Users\%username%\MarketFeeder Pro 8\profiles\%profile name%\logs\

Where %username% is your Windows username and %profile name% is the name of the settings profile you’ve chosen when logging in to MarketFeeder Pro. Each settings profile has a separate place for storing logs.

The statements (both real and test) can be found further down that path:

C:\Users\%username%\MarketFeeder Pro 8\profiles\%profile name%\logs\statement\

The trigger logs here:

C:\Users\%username%\MarketFeeder Pro 8\profiles\%profile name%\logs\triggers\

The Program Log here:

C:\Users\%username%\MarketFeeder Pro 8\profiles\%profile name%\logs\program\

It’s a good practice to clear these folders from time to time to avoid clogging up your hard drive. There is a way to do it automatically using the following setting:

Clear all logs automatically

Tip: you can view your statement in Excel, as it is stored in a *.csv file.

4. How to concatenate strings in triggers?

String concatenation is simply gluing together two or more strings. Most programing languages have a dedicated operator for string concatenation, e.g. "String1" + "String2" or "String1"."String2".

In MarketFeeder Pro, two or more strings can be concatenated just by putting them together within double quotes, e.g.:

"String1 String2"

If your strings are stored in variables, you just put these variables in a single string, like this:

"var1 var2 var3"

Note: neither of these variables must actually be strings, i.e. they can be numbers.

See a trigger example that concatenates strings below. The resulting variables will give you the following:

concat1: a string with the names of the first and second selections

concat2: a single string with myvar1 and myvar2 constants.

Download the trigger example for string concatenation

5. Why does an In-Play market need to have a delay when placing a bet?

In-play markets usually carry a time delay varying from 1-12 seconds. This delay is in place to allow customers to cancel unmatched orders on the system when there is a change in market conditions. This delay protects both backers and layers and leads to greater liquidity.

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-2023 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of Flutter Entertainment plc. Gamble responsibly.