JustAnotherKiwi 7 Posted December 10, 2018 Hello Admin Could you write a sample tennis script please? I want to automate the Break of Serve strategy, but I've just started to learn C# and I'm lost already! The (well-known) strategy: If the server or favourite is facing a break of serve, we place a lay bet If the server wins the point - the score is now 30-40 - we hedge/green for a loss If the server loses the point, we hedge/green for a profit Placing the bets - we could place a bet at the current lay price, or use a higher price (betfair will use Best Price Execution and match at the current price). WTA games usually have more breaks of serve than ATP. Is it possible to bet every time there is a break of serve? There can be a lot of games some days, maybe one bet per tennis match is safer... Cheers! using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Xml.Serialization; using Botbeetle.Types.BettingEnums; using Botbeetle.Types.BettingTypes; using Botbeetle.Types.Scripts; namespace Botbeetle.Scripts { [Serializable] public class TennisEventScript : EventScript { protected override Script CreateInstanceForClone() { return new TennisEventScript(); } //---------------------------------------------------------------------------------- [Category("1. Script")] [DisplayName("Name")] public override string Name { get; set; } = "Tennis"; [Category("1. Script")] [DisplayName("Description")] public override string Description { get; set; } = "Bet on Break of Serve"; [Browsable(false)] public override EventTypeEnum EventType { get; set; } = EventTypeEnum.Tennis; //---------------------------------------------------------------------------------- [Category("2. Selection Markets")] [DisplayName("Type of market")] public TennisTypeEnum TennisType { get; set; } = TennisTypeEnum.WIN; [Category("2. Selection Markets")] [DisplayName("Matched Volume")] public decimal TotalMatched { get; set; } = 50000; //---------------------------------------------------------------------------------- [Category("3. Rules For Entry")] [DisplayName("Lay Price greater than")] public decimal PriceEnter { get; set; } = 1.40M; [Category("3. Rules For Entry")] [DisplayName("Lay Price less than")] public decimal PriceEnter { get; set; } = 2.00M; [Category("3. Rules for Entry")] [DisplayName("Score equal to")] public decimal TennisScore { get; set; } = 15-40; // Score should be 0-40 or 15-40 [Category("3. Rules for Entry")] [DisplayName("Number of Sets")] // Add option here to select 1, 2 or 3 sets //---------------------------------------------------------------------------------- [Category("4. Order Settings")] [DisplayName("Price")] public decimal Price { get; set; } = //Use the current LAY price; [Category("4. Order Settings")] [DisplayName("Order Size")] public decimal Size { get; set; } = 5; //================================================================================================== public override void UpdateEvents(List<Event> events) { // 1. I have no idea what to do here... Quote Share this post Link to post Share on other sites
patric75 1 Posted December 13, 2018 I think It would be useful for many people a tennis script sample like this. Quote Share this post Link to post Share on other sites
Admin 90 Posted December 13, 2018 I started to modernize the Dutching window and there was a lot of work there. I will definitely make it a script Quote Share this post Link to post Share on other sites
JustAnotherKiwi 7 Posted December 15, 2018 Thanks Admin! Quote Share this post Link to post Share on other sites