10/03/2020

1. How to limit the number of simultaneous events where my triggers work?

This is one of the most popular trigger requirements in our trigger requests, so I thought I’d suggest a simple trigger template you can use to limit the number of simultaneous bets.

Download the triggers for limiting the number of simultaneous events with bets

You need to place the triggers “initialising bet_cntr” and “decrementing bet_cntr at the end of an event” at the very top of your trigger block. The “betting” trigger is provided as a template: use it as a base for other trigger actions and conditions: just remember to place the “set user variable” action on top of other actions. You can replace laying with any other trigger action you need.

2. How to get the average price of the back or lay bets I’ve placed?

Strictly speaking, you won’t need the average price, you will need the average weighted price, i.e. the price that would produce the equivalent profit or loss from the sum of all back or lay bets placed by you on a given selection. See Can Dutching stakes be expressed through a single stake with the equivalent size and price?

For example, if you have two lay bets, £10 @ 4.5 and £15 @ 4.8, the average weighted price will be (10*(4.5 - 1) + 15*(4.8 - 1))/(10 + 15) + 1 = 4.68, and not (4.5 + 4.8)/2 = 4.65 as would be in the case of a simple average.

MarketFeeder Pro has special variables for the average weighted price of your bets placed on the given selection:

Back matched bets: bm_backavp

Back unmatched bets: bu_backavp

Lay matched bets: bm_layavp

Lay unmatched bets: bu_layavp

For example, to get the average weighted price of lay bets matched on the favourite, use r_1_bm_layavp.

Where would you need this figure? Mostly for the calculations of bet amounts to use in green-up or loss distribution, if you decide to do it via backing and laying rather than using the built-in “green up”, “distribute loss” and “trade out” trigger actions.

See 10 Facts About Green-up in MarketFeeder Pro for more information about greening up or distributing the loss evenly.

The payout of a selection is defined as (sum of bets)*(average weighted price).

3. How to count the number of remaining markets in My Markets?

If you’re half way through your trading day, you might need to know the number of markets left in your list. For example, you would then divide the existing loss by that number, or use it to estimate whether it makes sense to pursue a staking plan at that point.

There are several built-in variables for this in MarketFeeder Pro.

market_num The number of markets in My Markets list
refr_market_num The number of markets that are currently being monitored
susp_market_num The number of suspended markets
inplay_market_num The number of markets that are currently monitored and are in-play
settled_market_num The number of settled markets in your list

By using simple arithmetic, you will get the number of remaining markets that are neither in-play, nor suspended or settled yet:

No. of remaining markets = market_num - susp_market_num - inplay_market_num - settled_market_num

4. How to go back and forth along the time line in Time Machine?

Once you start Time Machine, its internal clock begins to tick and the slider moves forward along the timeline. If you have a time span of a whole day, you may want to skip hours on the timeline or, on the contrary, go back and restart from a certain point.

Here are ways to do this.

1. To skip forward several minutes

Jump one step forward

Press the “Jump one step forward” button. It works when Time Machine is both started and stopped. The number of minutes to skip can be adjusted in the Time Machine settings.

2. To fast forward manually

Move time forward

Pause or stop Time Machine, press on the slider and drag it forward. Watch the time reading to be able to stop when the time is right.

3. To move the time backward manually

Move time backward

Stop Time Machine, press on the slider and drag it backward until you reach the required moment in time. The reason for which Time Machine must be stopped before you can go back in time is that it must “forget” all the history of your bets, all the trigger variables it might have set in the process and other critical data which have changed since the start of the virtual time. Yep, going back in time is trickier than travelling into the future, even in computer software!

4. To type in the exact time

Enter the time manually

Pause or stop Time Machine and press on the time reading. Enter the required time using the suggested format. If Time Machine is stopped, you can enter any time value you want (within the start & end time range of the markets in your list), but if it is paused, you can only enter a date and time of a later moment (for the same reason, you cannot travel back in time while Time Machine is running).

5. I sometimes get the TOO_MANY_REQUESTS or TOO_MUCH_DATA errors in the log, as my markets stop refreshing. What could be causing it?

BetFair puts a limit to the number of simultaneous requests you can send to its server and to the amount of data you can request. You can read the details in their official developer’s manual (also see here), but here is the summary.

TOO_MANY_REQUESTS

There are too many pending requests, e.g. you can refresh up to 3 markets in one go. The error also applies to more than three requests for matched & unmatched bets.

TOO_MUCH_DATA

Each type of request is given a weight, depending on how much data you’re pulling from the server. Here is a list of the most popular requests used in MF Pro with their respective weights:

Type of request Weight per market
Market description, including event rules 1
Horse silks (jockey name, age/weight of the horse, stall number, etc.) 1
Three best market prices & amounts offered 5
SP prices 3
Detailed traded volume (for all prices) 17
All prices with unmatched amounts 17

To calculate the total amount of data you’re requesting, multiply the sum of weights used by the number of markets for which you request them:

total_requests = (market_description + silks + prices + sp_prices + detailed_volume + all_prices)*market_number

Here total_requests must not exceed 200.

To cut down the number of requests, turn off as many options you do not need as possible in Monitoring Options and General Options.

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.