Calling WL from an external program
Author: chasl5409
Creation Date: 5/25/2009 3:08 AM
profile picture

chasl5409

#1
How can WL5 Developer be instantiated and a strategy be executed (and results retrieved) via a call from an external program (eg VB, C#)?

COM interop can be used as discussed in [link removed], but my understanding is that this uses only the Wealth Lab 3 interface and creates an instance of WL3 -- which runs strategies very slowly compared to WL5, among other limitations.

In my case I have a VB 2008 NET application, which currently calls both WL3 (passing timeseries, dates, script etc) and Matlab (does some processing Wealth Lab cannot do) and then combines the results from each. Using COM interop, variables are visible / can be passed between VB, WL & Matlab easily.

How can I do this using WL5?

profile picture

Eugene

#2
WL5 does not contain a COM API, it's fully managed .NET application. The Wiki KB article exemplifies exactly the opposite operation -- utilizing the WLD3's COM API from a WL5 Strategy.

QUOTE:
How can WL5 Developer be instantiated and a strategy be executed (and results retrieved) via a call from an external program (eg VB, C#)?


Although I haven't experimented with instantiating WL5 from an external application (Fidelity didn't consider it to be a use case), you may take a look at the internals (i.e. how can you programmatically retrieve the results of a Strategy execution) if you read the following KB article:

WealthScript Techniques | Interacting Dynamically with Portfolio Level Equity

The examples there heavily relies on some routines I put into Community.Components: here's the source code.

If MatLab's got a .NET API, then I'd suggest employing it directly from a WL5 Strategy. That's supposedly going to be the most efficient way, instead of trying to deal with WL5's .NET APIs, many of which are undocumented by the developers at Fidelity. If not, then you can still use COM Interop to communicate with MatLab (I believe there was an article on CodeProject on this suject).
profile picture

chasl5409

#3
Thanks Eugene. I'll work through your references and relevant documentation from Matlab etc -- they do have a NET API -- and get back when I have sorted out how the various bits might work together.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).