Jump to content
FORUM · BOTBEETLE
Sign in to follow this  
JustAnotherKiwi

Tennis Script

Recommended Posts

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...	

 

Share this post


Link to post
Share on other sites

I started to modernize the Dutching window and there was a lot of work there.
I will definitely make it a script

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...