Created
February 25, 2022 11:57
-
-
Save StefanBelo/830c6f71f70c5f30ae88cb76bff64b6b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BfexplorerBot | |
#I @"C:\Program Files (x86)\BeloSoft\Bfexplorer\" | |
#r "BeloSoft.Data.dll" | |
#r "BeloSoft.Betfair.API.dll" | |
#r "BeloSoft.Bfexplorer.Domain.dll" | |
#r "BeloSoft.Bfexplorer.Trading.dll" | |
#r "BeloSoft.Bfexplorer.Service.Core.dll" | |
open System | |
open BeloSoft.Bfexplorer.Domain | |
open BeloSoft.Bfexplorer.Trading | |
let randomGenerator = Random() | |
type MyFillOrKillBotTrigger(_market : Market, selection : Selection, _botName : string, _botTriggerParameters : BotTriggerParameters, _myBfexplorer : IMyBfexplorer) = | |
let setupMyFillOrKill() = | |
let botParameters = FillOrKillBotParameters() | |
botParameters.Name <- "My FillOrKill" | |
botParameters.Odds <- selection.OddsContext.GetNextOdds(selection.GetBestPrice(BetType.Back), randomGenerator.Next(5, 20), true) | |
botParameters.BetMatchingTimeout <- TimeSpan.FromSeconds(float (randomGenerator.Next(5, 15))) | |
typeof<FillOrKillBot>, selection, botParameters :> BotParameters, false | |
interface IBotTrigger with | |
member __.Execute() = | |
TriggerResult.ExecuteBfexplorerBotOnSelectionWithParametersAndContinueToExecute (setupMyFillOrKill()) | |
member __.EndExecution() = | |
() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment