Created
December 3, 2019 17:56
-
-
Save StefanBelo/b2d6543449952db98972c733a8e60047 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.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