Comments

  • Betfair Bot
    26.9.2019 11:09:24

    First of all, couple of hints about F# programming.  As with any programming language you can built a lot of different project types. In our case you must create .net C# or F# library project targeting .NET Framework 4.7.2, so as seen in Add a new project in Visual Studio: Library (.NET Framework).

    Ok, you have used Bfexplorer BOT SDK project: MyBotTriggers, so all should be setup. When you set this project be: Set as StartUp Project, and in the project Properties / Debug, you set Start external program:

    C:\Program Files (x86)\BeloSoft\Bfexplorer\Bfexplorer.BotUI.exe

    Then after you click Start (F5) , your project is build and bfexplorer app is executed as external program using your: MyBotTriggers.dll assembly.

    You could read here:

    http://bfexplorer.net/Articles/Content/354

    http://bfexplorer.net/Articles/Content/248

    That when debug in Visual Studio (VS) you can type in Debug / Command line arguments:

    YourUserName YourPassword True

    So when your project is executed/(started for debugging) VS start bfexplorer as well and automatically login with your betfair credentials YourUserName YourPassword. Last argument value True, means that bfexplorer is switched to Practice mode, you do not want to place real bets on betfair when debugging your bot or trigger code, right?

    Let me assume that your trigger code is correct, well actually when there were any problems with your code VS would reported errors.

    What you maybe do not know, F# programming language supports scripting

    https://blogs.msdn.microsoft.com/chrsmith/2008/09/12/scripting-in-f/

    so .fs file is normal F# source code file compiled to your targeted assembly, but .fsx is just scripting file that is actually not compiled. On my githbub:

    https://github.com/StefanBelo/Bfexplorer-BOT-SDK

    https://gist.github.com/StefanBelo

    You can find source code of such F# scripts, for instance:

    https://gist.github.com/StefanBelo/50186494957fa8a1a154866a7319d5e0

     So if you want to execute such bot trigger with "Execute Trigger Bot" as script code, your code must include referenced assemblies, have a look at from lines 7 to 14.

    On the other hand when you want to compile your bot trigger to assembly, and so debug your code like I do on attached video to this post, then you must un-comment lines 7 and 14, and rename your script file to .fs extension.

    When building bot trigger code to assembly, the bot trigger code must be the only one code in your project. It is all fine if rest of files in your project have “.fsx”, as they are not compiled, but if you have got more Bot Trigger source code files in your project with “.fs” extension, then you must set them as Build Action: None (click on file with right mouse button and in context menu: Properties)

    Why in bot trigger assembly must be just one bot trigger code?

    It is the way how bfexplorer instantiate Bot Trigger code. Your bot trigger must implement IBotTrigger interface, so bfexplorer after loading your bot trigger assembly: MyBotTriggers.dll, executes constructor of the first object implementing IBotTrigger.

    Well, yes you can have many bot triggers in your assembly, but as the mechanism of selecting the exact bot trigger just takes the first found, you must use just one bot trigger implementing IBotTrigger in your assembly.

    This mechanism is quite different for bot assemblies, have a look at on projects MyCsharpBot and MyFsharpBot, where you can find interface IBotCreator.

    I do not know what the level of understanding of .net programming, you have got, but any junior software developers should understand what I said up to now. I mean all that said should be clear for junior developer just from browsing Bfexplorer BOT SDK projects code.

    Have a look at attached video to see how easy your can debug any bot trigger code.

    What I can advise you about bot trigger programming, use bot trigger really just for triggering, orchestrating your bots that place bets, like “Place Bet” bot.

    Well, yes you have got in the trigger the option to place a bet directly, using:

    TriggerResult.PlaceBets

    But is it really a good idea, mainly when a lot of things could happen at the moment you place a bet:

    Market can be suspended.

    Your Internet connection could go down.

    Market prices could move rapidly so your bet could be placed bet unmatched.

    Just part of your bet is matched.

    Market is turned at in-play so your unmatched bet is cancelled when your bet was placed without keep attribute, and so on…

    The point is that you must manage bet status in any possible state, and bfexplorer prebuilt bots do so well.

  • Betfair Bot
    25.9.2019 17:13:37

    Not all projects in bfexplorer bot sdk solution are using bfexplorer app as hosting environment.

    Bfexplorer Bot SDK allows you to build your own apps for betfair if for any reason you do not like to use bfexplorer app.

    Projects like:

    BetfairApiConsole, BetfairApiConsoleFSharp, BetfairApiMarketBrowsing, BfexplorerServiceConsole are console apps, so standalone application showing different kind of using bot sdk code.

    JayBeeBot project is winforms app with very simple user interface, integrating existing bot you can find in bfexplorer app.

    Projects like: MyBotTriggers or MyBotTriggersCSharp are bot trigger projects, so yes these two projects could be executing with bfexplorer app as hosting app, and using with bot: “Execute Trigger Bot”

    Projects like: MyCsharpBot or MyFsharpBot are bot assembly projects, and again they can be executed with bfexplorer ap as hosting app, and bots implemented in these projects automatically occur in My Bots to Execute dialog, when adding a new bot strategy. So these kind of bots offer parameters interface for this add bot dialog.

    Project MyConsoleScripts contains scripts that could be executed in Bfexplorer Console tool in bfexplorer app. You can automate bfexplorer tasks or interact with exposed bfexplorer objects.

    You must have at least base understanding of programming in C# or F# programming languge, or any other .net programming languge, for instance Visual basic to use Bfexplorer BOT SDK.

    Please read articles about Bfexplorer BOT SDK:

    http://bfexplorer.net/Articles/Search?text=bot sdk

  • Betfair Bot
    25.9.2019 17:12:48

    In my example I mentioned “Place Bet” or “Place Bet and Close Selection Bet Position” bot strategies, so if you set trigger criteria for one of these bots, it is clear the bot is executed / triggered.

    There are other bots in bfexplorer arsenal that actually do not place bets, but execute other bots, so in your case you can use bot named: “Execute Bots” and set your criteria for this bot, when criteria are met, this bot executes other bot (bots) set by the parameter: BotNames.

    What does it mean?

    Your “Execute Bots” can evaluate different criteria for different selection, and execute another bot that can be executed on the other selection, depending on how you set parameter s and criteria for this action bot.

    Of course all these preprogrammed bot strategies can do what they were programmed for and what set of parameters these bots offer.

    When your strategy needs more, other betfair apps offer Excel scripting, so you must program VBA code to do what you need. In your example you would have to program in Excel VBA, conversion of market name in win horse racing markets, to race distance, and make your trigger work by evaluating race distance to allowed race distances.

    Bfexplorer offers trigger programming, so such short code is then executed by bot named: “Execute Trigger Bot”.

    On the forum you can find a lot of such examples:

    http://bfexplorer.net/Articles/Search?text=bot trigger

  • peteresgate@outlook.com
    25.9.2019 10:33:23

    I do understand what a trigger is, I just don't underdtand how to implement it with this software so if you could explain it that would be much appreciated.  So with the example of Trigger 2 of which you have explained it as a bot, how would I now make this a trigger so as to run a different bot when this trigger is true?  Thanks

  • Betfair Bot
    25.9.2019 10:07:11

    You can execute whatever strategy you want, by other words, actually by your words you could understand:

    A trigger is set of conditions (formulas) which all must be fulfilled the trigger to be activated, fired.

    By my words, so words any software developer could understand:

    A trigger is function returning boolean value, if returned value is true, another action is executed:

    If trigger() then action()
  • peteresgate@outlook.com
    25.9.2019 9:56:17

    Hello.  Thanks for the quick  reply.  I have noticed the support is very good and fast.  I just wanted to clarify  the Trigger  2 again.  I don't want to bet on this horse, I want to bet on amother horse when this trigger is true.  I feel that this program can definitely do it, but is it something that needs to be programmed or is there a trigger  ir some method that already does this? 

  • Betfair Bot
    25.9.2019 9:27:32

    For your Trigger 2:

    Depending on whether you want to place a bet or trade on specific horse, you can use bot strategy: “Place Bet” or “Place Bet and Close Selection Bet Position” (that is trading bot strategy).

    You set SortSelectionBy Last Price Traded, ExecuteOnSelection to 1, EvaluateEntryCriteriaOnlyOnce set to True (checked), and in Entry Criteria tab you add criteria LastPriceTraded is between 1.5 and 2.0

    Your Trigger 1 can be done by filtering markets in Event Browser and executing your strategy only on selected markets using Bot Executor.

    If you want to fully automate Trigger 1 as well, then you must realize where information about race distance is. It is in market name and is coded in miles and furlongs for GB, US and IE, and meters for the rest of countries, so 6f, 7f, 1m, 1000m and so on.

    It means that you need to transform text of race distance to meters. You did so in custom build triggers like you can see in attached videos.

    When I first executed my strategy on 6f race, and MinimumRaceDistance was set to 1760 meters, the bot did not executed my action bot “Trade 3 ticks”, as race distance did not fulfill set criteria, when I change that to 1000 meters, and top tipster’s selection fulfilled another criteria so Confidence at least 40, the bot strategy chosen nomited horse Holloa and executed trading strategy on this horse.  

    I make simple triggers for free only to my subscribers.

  • peteresgate@outlook.com
    25.9.2019 8:45:39

    I just wanted to clarify Trigger 2.  When I say any horse, I mean I'd like to use a specific horse based on current position (based on odds).  For example Trigger is when horse # 2 has odds between 1.5 and 2 (therefore obviously horse number 1 has better odds and horse number 3 has worse odds).

  • Tony
    22.9.2019 13:52:57

    Football livescores start working again this morning. I blamed nobody. Just stated what happened tonight.

  • Betfair Bot
    22.9.2019 10:43:51

    All live score apps work in bfexplorer.

    I just wonder what your posts are about. Because you must understand that software is not mechanical thing, it cannot wear out, so if worked before it must work. Only input values could change or services could be down.

    All live score data used by betfair are provided by third parties as well, so if score does not work, you must blame data provider not my app or betfair. Do we understand each other?

  • Betfair Bot
    14.9.2019 11:44:22

    If you strategy requires executing only when previous result is known then you can use the bot strategy called: Execute Till Target Profit

    Please read this post: “Closing down trading after reaching a predefined profit” where the bot “Execute Till Target Profit” is used as well.

    The bet result checking mechanism can be used even in strategies requiring a result, so who won or lost, even when a bet was not placed in the market, similar like in this request: “Some Lay Strategy”, but in this case it is necessary to build custom bot trigger script, for instance like here:

    MyWatchedResultsBotTrigger.fs

    For my subscribers I build custom strategy triggers for free if such work requires no more than 2 hours of my work.

    Bfexplorer BOT SDK is free for my subscribers as well:

    http://bfexplorer.net/Products/BfexplorerBotSDK

  • Betfair Bot
    6.9.2019 14:10:13

    There is no need to program anything, and I actually really wonder why you think you need to have programming skills to execute such strategy with bfexplorer.

    To automate your betting or trading strategy you need to use a bot strategy, in this it is named / called:

    “Close Selection Bet Position”

    You need to set the parameter ProfitLossType to Percentage, and set your Profit and/or Loss target (set Loss to 0, if you do not want to close your bet position/ hedge it in loss)

    Now you can execute your bot strategy on all selections on which you placed your bets. Or you can use the bot:  “Execute on Selections”, to execute your “Close Selection Bet Position” on all selections.

  • Betfair Bot
    5.9.2019 12:12:24

    May I ask you what you actually mean?

    I have just made above video showing that all works for me.

  • Betfair Bot
    2.9.2019 10:00:52

    In the application status bar, so in the bottom of the application window, on the right side there is reload button and as well amount showing your available balance to bet. Whenever you click on this button, your balance is reloaded.

  • Betfair Bot
    24.8.2019 9:17:15

    I do not think Bet Angel can execute your fourth strategy:

    Championship: Back Underdog when odds are 3.0 - 3.5

    Because similar like my “Place Bet” bot, when you sort selections, all selections are included. So to get underdog, the naïve approach is to sort selections by Last Traded Price, and the second item in sorted list is underdog, but as all selections are taken, The Draw selection could be second one as well, therefore you need custom script like I did here:

    FootballExecuteOnUnderdogBotTrigger.fsx

    I would suggest you to post your request to market feeder as well. They have similar policy like me, for subscribers they build one simple trigger for free, otherwise you must pay for it.

    I have some case studies for market feeder as well:

    http://bfexplorer.net/Articles/Search?text=feeder

    And bfexplorer could execute any strategy market feeder users have problems with.

    I just wonder if market feeder can manage to execute your strategy simpler way. Your automation script for skilled developer is no problem at all, using Bfexplorer BOT SDK.

    Just for inspiration, your FootballExecuteOnUnderdogBotTrigger.fsx uses: ExecuteActionBotOnSelection to execute your preset strategy, entered by BotName parameter on selection the bot trigger script evaluate.

    As you can setup all your strategies by “Place Bet” bot, your strategy requires choosing exact named bot strategy for exact league.

    The league is stored in the property of BetEvent object:

    market.MarketInfo.BetEvent.Details

    You can get it from Market object. So five lines of code in F# (have a look at match keyword) will give you the name of strategy that should be executed, and in your bot trigger code such bot strategy can be executed by:

    TriggerResult.ExecuteMyActionBotOnSelectionWithParametersAndContinueToExecute (botName, mySelection, None, false)

     

  • Nicksim80
    24.8.2019 3:47:44

    Yes, just trying to work out what is the best solution for my needs.

    So far I think bfexplorer is best long term solution, but it requires me to get the programming to work.

    Where as I can achieve my strategies with Bet Angel, but it takes a lot of spreadsheets to make it work. There is no elegant solution with Bet Angel.

  • Betfair Bot
    19.8.2019 10:15:59

    It is good you posted your request to betangel forum. We will see what solution will be offered:

    Automation : Football Pre-Game Strategy

  • Betfair Bot
    18.8.2019 14:15:41

    Nick, what you do is expert level for betfair trader, and common users can use just built-in bots and set automation/so create their betting or trading strategies just by setting bot parameters, so without programming.

    You are maybe that Nick, who used bfexplorer back in 2007 when I started developing bfexplorer. A lot of changed from that time, a lot of apps had ended and new one comes, and I believe you used most of betfair apps on the market up to now.

    Even those apps, which are labeled user friendly for automation, are actually not so user friendly when specific task must be executed, so not just task prebuilt in rules settings dialogs like market feeder or betangel use, and forums of these betfair apps just confirm what I say because it is full of simple questions users asked, well at least from my point of view:

    http://bfexplorer.net/Articles/ByTag?tag=Case Study   

    Very good example is this one:

    http://bfexplorer.net/Articles/Content/438

    Because it shows how bfexplorer app manages strategy automation by comparing to other betfair apps, for which BDP team from Australia made tutorials:

    https://betfair-datascientists.github.io/#using-third-party-tools-for-automation

    And my tutorial:

    http://bfexplorer.net/Community/BlogContent/434  

    Actually, your request for strategy automation is similar to one presented by BDP Australia. You have got ML model that generates those coefficients for your prefer football leagues, maybe similar like FiveThirtyEight

    https://projects.fivethirtyeight.com/soccer-predictions/

    And you need to automate your betting strategy, so by league you run preset strategy when your coefficient met set criteria.

    This automation task has again nothing with betfair, it is just programming task to conduct result of one app as the input to the other app, and it is task for software developer or just skilled user.

    You must realize what you want to do and how, and to understand that you must learn by doing.

    Just a hint from my understanding of your strategy automation, build your custom bot to do really just specific task, so:

    Load you data, and tagged them by league name.

    Your custom build trigger will identify league of the match/market.

    From league name you find your coefficient and evaluate it whether is in allowed range. If it is in allowed range, you execute preset league strategy, created from pre built bfexplorer bots.

    This way you will get bot trigger which will do just this specific task, the rest is done by bfexplorer bots, so this way you can simply switch from just placing a bet, like you do with “Place Bet” bot strategy settings to trading strategy when you like, using “Place Bet and Close Selection Bet Position” bot settings.

  • Nicksim80
    18.8.2019 13:04:51

    Thanks, I got it to work after many attempts. I am not a software developer or programmer, but I can learn enough to get things to work.

    I still think you should do a video as many of your users are not software developers or programmers and this would help them get started with your SDK and become familiar with IDE's and setting up the references and outputs.

    Once you understand that process you can learn to write and debug your code and eventually get it to work.