Article

Selections list from matched criteria

Hi Stefan.  I have 1 last coding question that I am stuck on, that hopefully you have a generic one coded already.  I'd like a list of mySelections generated from criteria matched from 2 other lists.  For example, List1 has all selections sorted in order of profit, and list2 has all selections with unmatched lay bets, so I would like to generate a list3 that has all selections that are have profit  > 0 and have unmatched lay bets.  Could you please share how to do this?

Comments ( 1 )


  • Stefan
    8.10.2019 15:51:11

    I do not know why you need two other lists to make your new list having only selections with profit and unmatched lay bets.

    Any information you need are in Selection object. I created short console script where you can see how to make different filter functions:

    ShowSelectionsWithProfitAndUnmatchedBets.fsx

    Basically you should orchestrate bot strategy(ies) execution in your trigger code, so the same way you can query for running bots, and running bot on a selection is still indication that your trading session, or bet placing is not yet finished.

    Another hint, please really use Visual Studio InteliSense support, as typing . (dot) in the name of object variable gives you all properties or methods you can use on the object. I mean what I created you could figure out as well.