MarketFeeder Pro

Stunning Conditional Betting Technologies

Examples 21-25

Triggers search:


Example 21. I want to back on a runner if its back/lay ratio is less than 0.5. Then I want to place a lay bet at price 3 ticks lower than the back one.
During in-running, if my lay bet was not taken and the price of this selection is over 5.0 I want to lay on it at the best available price.

If not for the second part of your condition we would recommend you to use "Offset Betting" which is catered specially for "backing then laying" and "laying then backing".

However since you need to re-place the bet in-running you need to set up the following triggers:

Trigger 1, row 5

Cell: "Any Selection Back/Lay Ratio"
Condition: "is less than"
Value: "0.5"
Action: "back"
Price: "best"
Amount: "100"
Market: select from the drop-down list
Selection: "All Matching Selections"
Active: "once each idle market"


Trigger 2, row 6

Cell: "Triggers Worked Out"
Condition: "is equal to"
Trigger Value: "5"
Action: "lay"
Price: "3_back_price"
Amount: either "100" or "=(100*3_back_price)/back_price" - if you want to secure equal profit on all selections
Market: the same as above
Selection: "All Matching Selections"
Active: "once each idle market"

Trigger 3

Cell: "Triggers Worked Out"
Condition: "is equal to"
Trigger Value: "6"
Action: "lay"
Price: "best"
Amount: "=IF(AND(lay_matched=0, lay_price>5), 100, 0)"
Market: the same as above
Selection: "All Matching Selections"
Active: "once each in-play market"

As you can see the first two triggers make the betting while the market is idle.

The third trigger will be executed in-play, and only if nothing was matched on the lay side.


Example 22. How can I activate a trigger 2 minutes after the market has turned  in-play?

There are two ways to do it. First one is to specify this condition in Cell + Condition columns:

Cell: "Minutes After the Off"
Condition: "is equal or greater than"
Trigger Value: "2"

Whatever Action you set for this trigger it will be executed 2 minutes after the off. This method is suitable if you don't need to use the Cell column for creating other conditions.

If however you need to - for instance - watch a "Back/Lay Ratio" of a selection, you'll have to select that for the Cell column. In that case you can add your condition into Price or Amount columns in the form of the trigger variable event_off:

Cell: "Any Selection Back/Lay Ratio" - or other expression you wish to watch
Condition: whatever you choose
Trigger Value: whatever you choose
Action: something that considers either Price or Amount
Price: "=IF(NOW() - event_off >= 0.001388, enter your price here, 0)"

Note: instead of adding this condition to the Price column you can add it to Amount. You can use it as a part of a more complicated expression, involving other pre-defined variables. The number "0.001388" is a value that equals to 2 minutes in Excel date and time format (see help file for more details about this format).


Example 23. I would like to back a horse at the best price a few moments before the race and then as soon as the market goes in play lay the same horse X amount of ticks lower.

If it were not for betting in two different states of market - idle and in-running - I would certainly recommend you to use "Offset Betting" sheet which has specially designed options for such this technique.

In your situation you must set up triggers. Below is one of the possible realisations. Suppose the race starts at 15:00:

Trigger 1, row 5

Cell: "Current Time"
Condition: "is equal or less than"
Trigger Value: "14:59"
Action: "back"
Price: "back_price"
Amount: X
Market: select it from the drop-down list
Selection: select from the drop-down list
Active: "once each idle market"

Trigger 2

Cell: "Triggers Worked Out"
Condition: "is equal to"
Trigger Value: "5"
Action: "lay"
Price: "back_price" OR "2_lay_price" OR "(profit_loss/X + 1)-0.2"
Amount: X
Market: the same as above
Selection: "All Matching Selections"
Active: "once each in-play market"

A couple of explanations for the second trigger. Since it is impossible to use the price at which the first trigger's bet was placed at in the calculations of the second trigger, there are several possible options for specifying the lay price. You can key in "back_price" - only if you know that after the market goes in-play the back price of the runner will be lower than it was before the off, thus the lay bet will be placed at a lower price. It indeed happens very often with favourites.

If you're not so sure, then you can put in "2_lay_price" or "3_lay_price" - which will mean "2 or 3 ticks lower than the current lay offer" - again, certainly if the price doesn't grow up dramatically after the off.

If none of the above options seem safe enough to you, then you must know the price range within which the back bet was placed - for instance "somewhere around 5.0". Then you'll know the tick size within this range and you can use the formula like "(profit_loss/X + 1)-0.2" where profit_loss is a pre-defined trigger variable storing P/L for that runner, X is the amount you bet and 0.2 is the difference in back & lay prices. Of course the latter can be anything you want - but make sure that after deducting this difference your price will fit into the BetFair price tick formula. For instance, if back price was 11 and you bet £10, then "(profit_loss/X+1)-0.2" will return 10.8 which is not a valid odds (the correct one is 10.5).


Example 24. Let's review a trigger example very much alike to the previous one. The favourite is trading at 1.4 before the off and I think it will get beat. I lay the horse at 1.4 for £10 and the race starts. The horse then drifts to 2.1 in running. Can the software place the bet in time to grab this 2.1? Also, if the horse then trades at 1.2 because it is likely to win can the software see this trend and back it accordingly to recoup any losses?

We apparently need three triggers here: first one laying the runner before the off, the second one backing it if the price gets higher than the initial bet, and the third one as a "stop-loss" bet to provide insurance from losing money in case the runner wins.

First of all, you need to set "Max attempts on failure" setting to "-1" because we're going to make MarketFeeder Pro constantly calculate the price proportion and as soon as they match the conditions execute a trigger.

Then add the following three triggers:

Trigger 1, row 5

Cell: "Winner Back Price"
Condition: "is less than"
Trigger Value: "1.5"
Action: "lay"
Price: "best"
Amount: "10"
Market: select from the drop-down list
Selection: "Winner"
Active: "once each idle market"

Just a quick note here: if you want to place a bet on the favourite no matter what its price is you don't need to set up the condition here. In this case you may set it up as "1 is equal 1" to make MF Pro bet immediately.

Trigger 2

Cell: "Triggers Worked Out"
Condition: "is equal to"
Trigger Value: "5"
Action: "back"
Price: "back_price"
Amount: "IF(AND(profit_loss<0, back_price>(-profit_loss/10)+1), (back_price*1)/((-profit_loss/10)+1), 0)"
Market: the same as above
Selection: "All Matching Selections"
Active: "once each in-play market"

Let's take a closer look at the formula in the Amount column. The purpose of this formula is to condition the back bet only if the current back price is higher than the price at which you layed the favourite before the off. The formula consists of the following essential parts:
1. AND(profit_loss<0, back_price>(-profit_loss/1)+1) - The AND function is built into Excel. It returns true only if both conditions inside it are true. The first condition here is profit_loss<0. The pre-defined trigger variable profit_loss returns P/L for the runner in question. If we made a lay bet in the first trigger, naturally enough we expect that P/L for that runner will become negative. If it is not negative then either bet was not placed or it left unmatched. So the first condition prevents the second trigger from betting if the lay bet was not matched. The second condition, back_price > (-profit_loss/1)+1) checks if the current back price of the runner is less than that at which it was layed. (-profit_loss/10)+1 will return the initial price - provided that the amount was £10.
2. (back_price*1)/((-profit_loss/10)+1) - so if both conditions in part (1) are true the amount will be calculated with the second part - otherwise (if at least one of the conditions is false) the amount will be zero and MarketFeeder Pro will later try again. The formula here is very simple - a mere proportion between the initial price and the current odds. It will return the amount slightly greater than the lay bet, therefore all runners will be equally "greened" with some profit that will depend on the difference in prices.

Trigger 3

Cell: "Triggers Worked Out"
Condition: "is equal to"
Trigger Value: "5"
Action: "back"
Price: "best"
Amount: "IF(AND(profit_loss<0, back_price<=1.2), -profit_loss/(back_price-1), 0)"
Market: the same as above
Selection: "Winner"
Active: "once each in-play market"

The last trigger is a "stop-loss" bet. It will be executed only if - again - the P/L of the winner is negative AND its price is equal or less than 1.2. In this case the bet amount will be calculated according to the formula -profit_loss/(back_price-1) that should cover the losses for that only runner (but unfrotunately will expose you to even more losses in case this winner loses after all). You can ignore this formula and put "10" instead of it to cover some part of the losses.


Example 25. If back price of the winner is less than 1.3 I want to back 100 at 1.3. Otherwise, if the price is greater than 1.8 I want to back it 100 at 1.8.

Trigger 1

Cell: "Winner Back Price"
Condition: "is less than"
Trigger Value: "1.3"
Action: "back"
Price: "1.3"
Amount: "IF(AND(back_matched=0, back_unmatched=0), 100, 0)"
Market: select from the drop-down list
Selection: "Winner"
Active: "once each market"

Trigger 2

Cell: "Winner Back Price"
Condition: "is greater than"
Trigger Value: "1.8"
Action: "back"
Price: "1.8"
Amount: "IF(AND(back_matched=0, back_unmatched=0), , 100, 0)"
Market: select the same market
Selection: "Winner"
Active: "once each market"

Both triggers' Amounts include a formula that returns "100" only if there is no bets on the back side yet. If back_matched or back_unmatched is greater than zero it means that the other trigger has already been executed, so we don't need to execute this one.



  1. What is Triggered Betting
  2. Trigger Examples
  3. Quick Tips
MarketFeeder Pro is developed by WellDone Creative Software. ©2005-2008. All rights reserved. Terms and conditions.
SiteMap