COM Intefrace in WL Pro 5
Author: pallavsarma
Creation Date: 1/8/2010 11:22 AM
profile picture

pallavsarma

#1
Hi,
I have been using WL Pro 4.5 and its COM interface (OLE Automation) for quite some time to access Quote Manager alerts from other external programs to do various things not directly possible in Quote Manager. Since I cannot find any COM interface in WL Pro 5, is there any way to do this kind of stuff in WL Pro 5? That is, access the list of alerts from Quote Manager (with realtime quotes) from an external software, modify the alerts in the external software, and then add the modified alerts to Quote Manager from the external software?
Thanks
profile picture

Eugene

#2
Wealth-Lab 5 is a fully managed .NET application. There is no and will be never be a COM interface in WL5. What you're asking is not a use case.
profile picture

pallavsarma

#3
Thanks Eugene, is there any other way to do this in WL Pro 5? Since WL Pro 4.5 is being discontinued this quarter by Fidelity, I am at a loss about what to do.
profile picture

Eugene

#4
By virtue of .NET, WL5 is quite extensible. Can the task being solved with your legacy COM code somehow be assigned to WLP5 for processing?
profile picture

pallavsarma

#5
Hi Eugene, I am not sure what to mean, so let me clarify exactly what I am doing with WLPro4.5: I call the WLPro4.5 COM interface from Matlab using the following code:

wlab = actxserver('WealthLab.WL3');
alerts = wlab.GetAlertList('');
....

As you know, GetAlertList('') provides my Matlab code with all the alert/quote information in Quote Manager, which I then use to perform calculations in Matlab using various sophisticated toolboxes in matlab. Of course wlab.GetAlertList('') is called repeatedly to get the latest quote.

So, can I do something similar using WLPro5 and .NET? All I need is access to at alerts in Quote Manager from external software (like Matlab), but since Matlab is not .NET, even if I can get access to the alerts using external .NET code, I will be happy.

Do have any example external .NET code/program that accesses WLPro5's internal variables/functions?
Thanks very much for your help.

profile picture

Cone

#6
You can "Save Alerts to File when Triggered". Another program can periodically check, say every 3 seconds) if the specified file has changed. If it has, read the file and process the new Alerts.
profile picture

pallavsarma

#7
Hi Cone, I need the real-time quotes of all alerts in the Quote Manager (not only the triggered ones). Also I need to add back alerts to Quote Manager with modified trigger prices (I use AddAlert function of the COM interface now). This cant be done the way you suggest.
Thanks
profile picture

Eugene

#8
I searched the net and see that Matlab can be used by .NET applications (using MathWorks.MATLAB.NET...)

So, like I believe I already told you (1? or maybe 2? years from now), you need to call Matlab from WL, not the other way round.

Let WL5 do its job and call Matlab from a WL5 strategy to let ML process your logic, and return the output to WL5. Is this feasible?
profile picture

pallavsarma

#9
Hi Eugene, yes I did ask you about this about 1 year back:) but since WL4.5 has been working till now, I didnt bother to think about this. Now that Fidelity is discontinuing it, I am forced to change over to WL5.

In any case, although your approach is theoritically feasible, but it would require running a intraday WL5 strategy realtime on more than 2500 symbols, which most likely will be too slow to work properly, and trades in this approach are triggered at the end of a bar, which is not fast enough for me. Please correct me if I am wrong.

profile picture

Eugene

#10
How do you get the alerts to Matlab? Isn't it WL4.5 already doing some screening job for ML? Or ML runs the strategy using its own intraday feed for 2500+ symbols?
profile picture

pallavsarma

#11
I use WL4.5 Simulator (end of day) to create alerts for a large number of symbols. Then I load them into Quote Manager, and then from Matlab I call
wlab = actxserver('WealthLab.WL3');
alerts = wlab.GetAlertList('');

This get the alerts into Matlab, where I do further filtering etc based on the real time quote and some amount of historical data. This can be done extremly fast. So Matlab is getting real time data from WL4.5 Quote Manager using the COM interface.
profile picture

Eugene

#12
Sounds WL4.5 can do the most part of the job, and ML does some high IQ post processing. So I propose to try to call ML via its .NET interface (MathWorks.MATLAB.NET):

Matlab "stand alone" DLL and C#
profile picture

pallavsarma

#13
Hi Eugene,
But as I mentioned before, the problem with this approach is speed and the fact the trades would be triggered at the end of a bar and not in "real time". I tried to run a very simple strategy loading only one bar of data in WL5 Strategy Monitor (1 min scale) on 500 symbols, and it timed out and couldnt process more than 100 symbols in 1 min. So calling Matlab from a WL5 strategy on 2500 symbols would never work.

Would it be very difficult to create a COM/DLL interface to Quote Manager as WLD4? Ninjatrader is also a .NET app and they proveide a COM/DLL interface.
Thanks
profile picture

Eugene

#14
I don't know how difficult this is or is it possible at all.
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).