-
How to enable MCP /sse + WithParameters on Bfexplorer 5.08.0404?
Hi Stefan,
I'm automating bet placement from my own app and I need to place a Back bet with a dynamic MinimumOdds (a per-bet floor price computed externally), so the exchange never matches below my floor.
The changelog mentions ExecuteBfexplorerStrategySettingsWithParameters (MCP tool, ...
30.6.2026 18:49:17
-
From a Software Developer to a Successful Trader
To transition from a software developer to a successful trader or bettor on a platform like Betfair, you must recognize a fundamental distinction: Your technical skills provide the tools, but domain-specific analytical skills provide the edge.
In the world of exchange trading, your ability to write ...
6.6.2026 18:54:50
-
Introducing Bfexplorer Studio: Code
Overview
Bfexplorer Studio is an interactive environment designed to empower users—especially those with programming experience—to explore, test, and automate Betfair trading strategies and bfexplorer application features without the need to install a full IDE like Visual Studio or ...
17.4.2026 15:15:35
Betfair Bot
What did you set for StakeType? That is the only problem you could make, because when you set StakeType to whatever else the Stake, your lay bet payout is different value, that is common sense.
dnx444
Yes the way yours is working in the video is exactly how I want mine to perform. But it's not for some reason. Could you please send screen shots of both the general bot settings and action bot settings? Just so I can double check where mine is going wrong
Betfair Bot
The TargetLoss parameter stops bot execution when required loss is reached. It means that no bet will be placed.
In your previous comment you said: “…but im unsure why im getting the results im getting. if i win the lay bet after losing a lay bet it takes my sum to breakeven, which i dont believe should be right? if my initial stake is $10 and it loses, then ill be down x amount of dollars but if the next bet wins it should stake accordingly to cover the loss plus add the additional stake …”
So I made that video showing that staking plan is correct, as you can see in my video that third bet was losing on, loss -3.28, and the next bet won 5.28, so it means the lay bet was placed with stake amount: 5.28, so it covered previous loss 3.28 and added original stake 2.0. It means that staking plan is working correctly, and not the way you think/said, it works!
dnx444
Thank you for the video, I only realised you put it there once reading your email. I tried yesterday again and had the same issue, but just realised a small difference in the way yours is setup. You TargetLoss is set to 0, is there where mine is going wrong? I set mine to 1000
Betfair Bot
Here is video from my test, as you can see after loss, it is placed lost amount and default stake set by action bot, in my case it was 2 Euro.
Just one hint, when you want to filter messages generated for exact market. Click right mouse button on selected market in Bot Executor, and from context menu click on “Show Output Messages”. This way you can simply see market messages and so what stake was used to place lay bet.
Betfair Bot
Yes, it is taken your action bot stake and as well lost amount in allowed streak (the parameter ResetStakingPlan) multiplited by MartingaleStakeFactor.
So it is not taken entire lost amount, as staking plan is rest after consecutive loses defined by the parameter: ResetStakingPlan.
Here is piece of my code:
placeBetParameters.Stake <- placeBetParameters.Stake + addToStake
dnx444
yeah yeah that makes sense, but im unsure why im getting the results im getting. if i win the lay bet after losing a lay bet it takes my sum to breakeven, which i dont believe should be right? if my initial stake is $10 and it loses, then ill be down x amount of dollars but if the next bet wins it should stake accordingly to cover the loss plus add the additional stake. So after winning the second bet the sum should be $10 as that is the stake size. does that make sense? so just wondering if im missing something or not?
Betfair Bot
Do you understand what multiplication means in mathematics?
If your stake is 10, and you want to add 10% to new stake then 10.0 * 1.1 = 11.0
If you set that parameter to 10.0, then 10.0 * 10.0 = 100.0
dnx444
So for example if my stake is $10, I need to make the martingale 10 as well?
Yes im well aware of what it is about, had many years experience with it. At the moment not using real money for obvious reasons, and may not at all. I just trialling how the bots work with it
Betfair Bot
Any MartingaleStakeFactor > 1.0 gives you stake bigger than previous loss, and as the winning lay bet payout is equal to your stake it is really up to you what that factor value you set.
Sir, I have got really bad feeling that you actually do not know what is your strategy about. Do you know what risk martingale strategy involves?
dnx444
So with my trials today I setting the martingale as the defualt of 1. I was finding if the bet lost, the next bet would have a stake of what ever the total loss is. If that bet won, it would then bring the sum back to breakeven, where as I would prefer it to be a profit of what ever the initial lay stake is.
Would i need to make the martingale value 2? or is there a setting i am unaware of that will add the total loss to the stake to then give me profit?
Betfair Bot
English is foreign language for me. I speak Slovak as my native language, I understand Czech, Polish, Russian and English, so from English dictionary – factor
A number or quantity that when multiplied with another produces a given number or expression.
"an amount that exceeds it by a factor of 1000 or more"
So translating MartingaleStakeFactor is the number you can multiply by your total loss giving the stake amount in the next martingale bet.
As 1 * 1 = 1, the default value for MartingaleStakeFactor means that your next stake is increased by your loss amount only.
ResetStakingPlan means that after x losses in row (the default value is set to 3) the martingale staking plan is reset to original bet stake amount placed by your action bot.
I actually attached illustration image found on the Internet, to illustrate what your strategy looks like in used staking plan, it is called: martingale.
dnx444
What I don't understand is, what does 1 in the martingale and 3 in the reset represent?
does the 1 mean it only adds the losses going back one, so say there's multiple losses do I need to set it to 3 so it adds on 3 of the previous losses?
with the resetting staking plan with the default of 3 means it only resets it 3 times?
Betfair Bot
When selecting above parameters in the Add/update bot dialog, the following descriptions are displayed.
For MartingaleStakeFactor : Add previous loses to my stake. The default value is 1.0
For ResetStakingPlan: Reset the staking plan after loses. The default value is 3.
What cannot you understand from above sentences?
Betfair Bot
Yes, you can do so. Always create “Execute Till Target Profit” settings with unique name for each strategy you will execute.
dnx444
I think of got it running successfully. Is it possible to run multiple of these bots at the same? like one on each race meeting?
Betfair Bot
Yes, you can execute this strategy using “Place Bet” bot, and “Execute Till Target Profit” bot, create two bot settings using “Execute Till Target Profit” and name them differently, because it is clear that this bot must check your results, and it creates result service/s by assigning them name of the bot to distinguish among different result market queues.
To execute your strategy in full automated mode use the tool: “Bot Executor”.
dnx444
So this is how I would like it to perform. It will be completed on horse racing and grey hounds. Ideally it will be perfromed on single race meetings. So it will start at race 1, with a lay bet on the favourite -00:00:30 to jump time. A predetermined stake will be set eg $10, which will be the target profit as thats how the lay bet works. If the the bet wins, target profit will be achieved and bot will be executed with a profit of $10. If the bet loses, the next bet will be placed on the favourite in race 2 as a lay, again -00:00:30 to jump time. The stake will be $10 plus the liability of the first bet in race 1 and then so on, if it wins it stops and if it loses the liability of race 2 will be added on to the $10 stake and will contine until the $10 profit has been achieved. Also unsure if there is a possibility to include the betfair commission into all of that as well. Hope this makes sense
Betfair Bot
You must clearly express your intention.
Is your profit target meant to be generated by closing bet position on one market, so trading?
Or is it your target profit generated by continues betting or trading on more markets?
You instruct bots to automate your strategy by setting bot parameters, or just by putting more bots in continue execution. Just a common sense dictates that computers do not think yet, only execute set of exact instructions. You do not declare exact instructions yet from your description.
dnx444
Thank you for that info. Its starting to make sense now. So how would I do it so once the target profit is reached the bot will stop?
I've looked at the Execute Till Target Profit bot, but can not see an option for it to place a lay bet? Would this be the right one to use?