StakeIsMyLiability does not update the stake according to the odds
Posted in Bfexplorer Products by Hamid
Hi Stefan,
Today I was surprise how my bot (bot setup "my bot" and bot type "Auto Trader") has acted with the parameter "StakeIsMyLiability".
I was thinking that the bot updated the stake accoding to the odds each time.
Parameters:
Maximalodds: 1,95
Minimalodds: 1,03
My stake : 100
StakeIsMyLiability : True
The facts:
Someone place a bet lay at 1,20.
19:36:59 My bot "placing the bet lay. 1,21 [476,19]" ( 476,19 x 0,21 = 100="my stake")
Later someone place a bet lay on the same market at 1.94
19:36:59 My bot "Updating the bet odds to 1,95"
I was expeting that the bot would calculate again the amount to place and would put 105,26 (100/0,95= 105,26)
but the bot placed 476,19 at odds 1,95 (that means a stake of 452,38 so it is far from the liability I was excepting of 100)
I was expecting that the bot would calculate again the amount to place and would put 105,26
I hope you have understood what I meant.
Thanks
Friday, January 22, 2010
Hi Hamid,
Well it is not so simple because betfair does not support updating odds and stake by one betfair api command as betdaq does for instance. That means that such operation when applied on in-play market will take more times as first the stake is updated and after successful operation the odds is updated too.
I have just updated Bfexplorer PRO to update both odds and stake when chasing price with StakeIsMyLiabilty set to True, but you have to be aware how it works.
Best regards
Stefan
Friday, January 22, 2010
Thanks Stefan for the reactivity. ( I hope you didn't forget my request about the "repeattradingcycle")
Saturday, January 23, 2010
Hamid, when your bot have to stop execution it executes fallowing procedure:
private void StopBot() { if (RunnerProperty.RepeatTradingCycle /*&& !stopLossActive*/) { if (RunnerProperty.StopTradingCycleAtProfit != 0 && RunnerProperty.MinReturnOnInvestment >= RunnerProperty.StopTradingCycleAtProfit) { Stop(); } else { betType = RunnerProperty.BetType; DoSetBetPosition(); RunnerProperty.MinReturnOnInvestment += RunnerProperty.IncreaseProfit; betPlaced = false; tradingState = TradingState.WaitingForTrade; } } else { Stop(); } }It can really be read by non programmers as well, like reading a sentence: if RepeatTradingCycle ... else ...
Yes, there is slightly problem with the code above as there is no check whether the next iteration of the trading cycle starts from previous loss position, or not, but with parameters you use with this bot, so without using StopLossOnPercentageLiability parameter, this procedure works as it should in your trading scenario.
Friday, January 29, 2010
Hi Stefan,
I updated the last Bf pro and something is going wrong with "StakeIsMyLiabilty". When the bot updates odds and stake, it updates only the odds but takes the former stake.
The problem happens only when the odds go up (like from 1.6 to 1.7)
Thanks
Friday, January 29, 2010
Hamid, when odds goes up bet updating creates two bets maybe from the original one, and that could be a problem. Is it so in your case? I will look at on it this weekend.