I'm developing an algorithmic trading application using complex event processing and I'm looking into Microsoft StreamInsight as CEP processor. However I'm not sure if everything I want to do is possible within StreamInsight.
Particularly, I would need to be able to dynamically create strategies that would then be inserted into the server as standing queries. For example, person A creates a strategy where a buy order has to be placed when the 30 day average of stock X rises above a certain value. This would then have to be translated in a StreamInsight query and be placed on the server at runtime.
What sort of code can I execute in a StreamInsight query? I'm not sure if all the processing that I want to do is possible in a StreamInsight query, since they are linq queries. Can I use data from other data sources? Can I use switches, loops, variable declarations etc. in a query? Or is it just one single query, like with compiled queries?
This all probably sounds a bit fuzzy, if need be I will try to clarify further. Basically, my question is, how complex can I program my StreamInsight queries? The samples that I have found only show simple filtering, grouping, etc.
Suggestions about other CEP servers are also welcome, although I would really prefer to stay in my area of expertise, which is .NET/C#.