Skip to content

Instantly share code, notes, and snippets.

@StefanBelo
Created December 3, 2019 17:56
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/b2d6543449952db98972c733a8e60047 to your computer and use it in GitHub Desktop.
Save StefanBelo/b2d6543449952db98972c733a8e60047 to your computer and use it in GitHub Desktop.
module BfexplorerBot
#I @"C:\Program Files (x86)\BeloSoft\Bfexplorer\"
#r "BeloSoft.Data.dll"
#r "BeloSoft.Bfexplorer.Domain.dll"
#r "BeloSoft.Bfexplorer.Trading.dll"
open System
open BeloSoft.Bfexplorer.Domain
open BeloSoft.Bfexplorer.Trading
type MyBotTrigger(market : Market, selection : Selection, botName : string, botTriggerParameters : BotTriggerParameters, myBfexplorer : IMyBfexplorer) =
interface IBotTrigger with
member __.Execute() =
let message =
market.Selections
|> Seq.map (fun mySelection -> sprintf "%s: %.2f | %.2f" mySelection.Name mySelection.LastPriceTraded mySelection.TotalMatched)
|> String.concat "\n"
TriggerResult.EndExecutionWithMessage message
member __.EndExecution() =
()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment