Scripts (example) - Under 0.5 goals

  • 381 Views
  • Last Post 16 August 2018
admin posted this 06 August 2018

I will make several publications and show you how to create your strategy on examples.

The first example - under 0.5 goals

 

 

 

A task:

Make a bet on the market "under 0.5 goals", provided that:

- the price is "LAY" in the range from 5 to 7

- the teams are not equal.

Order By: Standard | Newest | Votes
admin posted this 06 August 2018

1. Declare variables:

1.1. Conditions of Selection:


  • To choose not equal teams, we set the price of "favorite" LAY (The lower the price - the stronger the favorite - the greater the difference between the teams)
  • To take only markets with money, we set a variable - the minimum amount of money in the market.

admin posted this 06 August 2018

1.2. Conditions of Enter

  • Variable minimum price and maximum price set the conditions for entry.

admin posted this 06 August 2018

1.3. Order

  • These variables set the order. By default, I set the price to 10, because I enter the market when LAY = 5 ~ 7. I want an order to be accepted at any price.
  • The size of the order (%). Set as a percentage of the total balance. The user can specify from 1 to 100.

admin posted this 06 August 2018

1.4. Service variables

 

  • Variables for balance storage
  • Events - this is the list where the events (markets) are placed on which you already bet. In order not to put on one market twice.

In a script, you can declare any variables you need to work.

admin posted this 06 August 2018

 1.5. Purpose description of variable

  • Category - grouping of variables
  • DisplayName - display name

admin posted this 06 August 2018

2. Functions

There are two kinds of functions in a script:

  • service functions -  that the botbeetle program calls
  • user functions - that the user writes for work

admin posted this 06 August 2018

2.1. Service functions - Start(), Stop()

Start, stop functions are called once when the user starts and stops the script.

In this example, in the start function, I clear the list of markets where bids are already made.

 

admin posted this 06 August 2018

2.2. Service functions - BalanceUpdated(totalBalance, availableToBetBalance)

This function is called when the balance has changed. Here you can solve the  task of money management.

 

admin posted this 06 August 2018

2.3. Service functions - UpdateEvents(List<Event> events)

This function is called when data (price, size, orders, score) has changed. 

The variable (List<Event> events) contains a list of all the events that are displayed in the "Soccer Schedule" window.

admin posted this 06 August 2018

2.3.1. Select a team (runner)

  • selected runner (IsChecked = true) displayed with yellow point

 

admin posted this 06 August 2018

2.3.2. Select Event

 

 

  • selected event (IsChecked = true) displayed as checked checkbox

admin posted this 06 August 2018

2.3.3. Expand Event

  • We want to see additional markets for event, we send command to expand node.

 

admin posted this 06 August 2018

2.3.3. Select Market for place order

 

admin posted this 06 August 2018

 

 

2.4. User function - PlaceOrder(string marketId, long selectionId, decimal lay)

 

 

This function  Api.PlaceOrderInstruction(poi)will send the order through program botbeetle to betfair.com

admin posted this 06 August 2018

Scripts use the standard variables betfair, their description can be found here.

 

More on how to run the script here

chibus posted this 12 August 2018

fumanbest posted this 12 August 2018

This happens because in the script does not option to restore the loss. I have described it in detail above. And i'm really wondering why.

admin posted this 13 August 2018

 

This is not a winning strategy. I wrote about this.

This only shows that you can automate any strategy. If you have one.

admin posted this 13 August 2018

This happens because in the script does not option to restore the loss. I have described it in detail above. And i'm really wondering why.

I do not understand your strategy. If the next day just increase the rate it will not solve anything. You will simply lose more money.

I will not implement strategies whose meaning I do not understand.

kms777 posted this 16 August 2018

Что за betfair.exe ?  

Show More Posts
Close