Skip to content

Instantly share code, notes, and snippets.

@StefanBelo
Created February 25, 2022 11:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StefanBelo/830c6f71f70c5f30ae88cb76bff64b6b to your computer and use it in GitHub Desktop.
Save StefanBelo/830c6f71f70c5f30ae88cb76bff64b6b to your computer and use it in GitHub Desktop.
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