How to run a bot on each market selection
Posted in Tutorials by StefanBelo Tags: bot programming
The Bot Executor is very simple tool for setting bot criteria for automated trading or betting. It is a tool which will help you to set your triggers and select a betting or trading strategy you want to execute on qualified market selection.
If you want to execute any betting or trading strategy on all market selections you need to use the bot script you can find in MyBots folder:
- Bfexplorer.Scripting.SetupBotOnRunners.cs
To better understand how this bot works first I will explain how bot criteria settings are entered into the bot executed on the market selection. Any bot parameters are entered into the selection property. When you open a market with bfexplorer pro and click on the menu item View / Selection Property the Selection Property window is displayed, in this window you can see all parameters which can be used by bot script. The parameters are grouped into 5 sections:
- Analyze
- Bot
- Bot Parameter - Place Bet
- Bot Parameter – Trading Odds
Not all parameters are used by a bot, some of them use just couple parameters the others more than 20, when writing your own bot script you can use any of these parameters and actually it is the only way how to enter any parameter from the bfexplorer user interface you have got, with the new release of bfexplorer pro 3.0 this mechanism will be changed.
How to use Bfexplorer.Scripting.SetupBotOnRunners
Have a look on some trading strategy you would want to run.
I want to trade a selection starting to lay with 100 on better odds when odds are in range from 4 to 6, if matched trading out with the profit of 3 ticks or a loss of 20% of my liability closing my position at the official start time if not done before.
To create such trading strategy you need to use the bot: Place bet and close position setting the following parameters with the Bot Criteria Editor:
| Parameter | Value |
|---|---|
| BetType | Lay |
| MinOdds | 4 |
| MaxOdds | 6 |
| AllowPlacingBetInPlay | False |
| AtInPlayCancelBet | False |
| PlaceBetAtBetterOdds | True |
| PlaceBetOnRunner | 0 |
| Stake | 100 |
| MinOddsDifference | 3 |
| UseMinOddsDifference | True |
| StopLossOnPercentageLiability | 20 |
| ClosePositionAfter | 00:00:00 |
| ClosePositionAfterEnabled | True |
It is a good idea to test these bot criteria parameters in the practice mode executing them on the market selection with the Bot Executor, to ensure that no parameter was missed and bot works as it was intended.
Now we can finally setup these bot criteria setting to run on all market selections. As it was mentioned at we will need to setup MyBot: Bfexplorer.Scripting.SetupBotOnRunners and as the parameters we will use the bot parameters we used for the PlaceBetClosePosition bot adding the following parameters:
| Parameter | Value |
|---|---|
| BotType | MyBot |
| ExtraBotType | PlaceBetClosePosition |
| MyBotClassName | Bfexplorer.Scripting.SetupBotOnRunners |
We can again test it first in the practice mode starting these bot criteria setting with the Bot Executor.
You can download the bot criteria setting to import into the Bot Executor here.
Thursday, December 25, 2008
Does the file to import in the Bot Executor work ?
I downladed this file (LayTradingOnAllSelectionsBotCriteriaSettings.bcd) but when I try to import it in my Bot executor nothing happens.
I would like to apply the Bot executor to a group of 10 markets but I failed to to it. I must do it one by one.
Thanks
Monday, December 29, 2008
This article explains how to execute a bot on each market selection and yes the bot setting import works well.
If you want to run your bot settings on more markets have a look at on the trade opportunity lookup service tool or execute my strategy on selections. How to use both tools is described on the product web pages or you can find two articles in the tutorial section of this blog.