projected Betfair starting price
Posted in Bot programming by mapper
Hi Stefan,
for horse racing selections there is "projected Betfair starting price". Is it possible to use it for bot? Idea is to set some difference from this price and open bet if abs(actual price - projected price) >= difference. This idea expect that price will be around projected price.
I see that soccer or other markets do not have this value. Is there posibility to calculate or read something like moving average for selection? I think that technical analysis can help us to find better moment to start trading on market.
Thanks!
Tuesday, May 18, 2010
Betfair api offers 3 starting prices: FarStartingPrice, NearStartingPrice and ActualStartingPrice and you can use them with your custom bot script.
For UK horse racing win markets Bfexplorer PRO offers Betfair betting forecast and again you can use this value through selection property: AverageOdds. You can see this value if you open Selection Property window.
Thursday, May 20, 2010
could you please show part of code how to use some of 3 starting prices in custom bot script?
I see that Selection criteria but I am not sure how to use it. Example: I want to back horse if it is overvalued. This mean actual BACK price is higher than average odds for more than 5 ticks. And I want to do it vice versa for undervalued horses with LAY. Is it posible to do it via bot executor or do I have to create my own custom bot?
Thank you in advance
Thursday, May 20, 2010
Betfair bot: Bfexplorer.Scripting.ShowNearStartingPriceBot
I prepared simple bot script that shows for each selection: the current back price, near starting price and odds difference between those two prices .
class ShowNearStartingPriceBot : Bot { public ShowNearStartingPriceBot(IBetfairService betfairService, MonitoredMarket monitoredMarket, Runner runner) : base(betfairService, monitoredMarket, runner) { } public override void DoYourJob() { base.DoYourJob(); List < string > report = new List < string >(); Runner[] runners = monitoredMarket.MarketDetails.Runners; foreach (Runner myRunner in runners) { double odds = myRunner.BestPriceToBack != null && !myRunner.BestPriceToBack.IsNull ? myRunner.BestPriceToBack.Price : OddsRange.MinOdds; double nearSP = myRunner.NearStartingPrice; if (nearSP != 0) { report.Add(string.Format("{0}: back: {1}, near SP: {2} | {3}", myRunner.Name, odds, nearSP, OddsRange.GetOddsDifferenceInTicks(odds, nearSP))); } } report.Reverse(); report.ForEach(ShowMessage); ShowMessage(monitoredMarket.Description); Stop(); } private void ShowMessage(string message) { betfairService.AddMessage(message, false); } }You can download the source code here, unzip the file and copy the betfair bot script to MyBots folder.
Friday, May 21, 2010
thank you for this simple code. It is very good to understand how to get this value (runner.NearStartingPrice) and how to calculate odds difference. I have some questions related to this topic here. I try to read back & nearSP values for selected runner in Visual Studion 2010 Express but without success :( I think I have issue with selecting runner (for example first) because I cannot read back value to double in DoYouJob(). Visual Studio create "private BetPrice back;" under class. But nearSP can be used by reading value to double. Could you please show me how to do it correctly?
Thursday, May 27, 2010
Martin, I did read all your forum articles you opened about bot programming but I did not reply because firts if you want to program your betfair bot you must understand what are base object oriented programming (OOP) principles. These programming techniques of OOP includes: data abstraction, encapsulation, polymorphism and inheritance.
In a couple lines of code above, there are presented all OOP principles. What is quite strange is that code itself answers your questions, but you are not able to see it in the code.
It is like answering how much is 1 + 1 and why is it 2.