Using other C# libraries
Author: gregg
Creation Date: 6/3/2008 10:17 PM
profile picture

gregg

#1
Wealth-Lab Version 5 (.NET) 5.0

Hi,

Is it possible to access external information from within wealth-lab.
For example I want to parse a website (using regular expressions) and execute a strategy based on that.

Also is it possible to interface with other programs aka Bloomberg via windows APIs all from within Wealth-Lab?

Essentially is it possible to use all C# libraries etc.

I stopped using WL a while back because it is hard getting data into and out of it, this would cause run back to WL !!!!

Thanks!
profile picture

Eugene

#2
Is it possible to access external information from within wealth-lab.

Yes. The new WealthScript is a regular C# code.

For example I want to parse a website (using regular expressions) and execute a strategy based on that.

To illustrate this, HERE is an example that collects the Put/Call ratio from the CBOE website on-the-fly and executes a multi-symbol backtest.

Essentially is it possible to use all C# libraries etc.

True. Copy the library into WL5 program folder and then reference it in your strategy. (In 5.1 it will get real simple for assemblies in the GAC, there's going to be an interactive dialog for that.)

Also see THIS.

Also is it possible to interface with other programs aka Bloomberg via windows APIs all from within Wealth-Lab?

There is no Bloomberg provider available now. However, a general answer is "yes" by the virtue of .NET. HERE you'll find an example of passing alerts generated in WL5 to WL4 using the COM API.
profile picture

gregg

#3
Thanks!!
profile picture

gregg

#4
Quick followup, I am trying to access excel using C#.

I am getting the same error when I put in:
CODE:
Please log in to see this code.


I tried to look in the Microsoft.net folder, but couldn't find the file, any idea what the name of the file is?


Thanks,
Greg

Tutorial for accessing Excel:
http://www.codeproject.com/KB/cs/Excel_Application_in_C_.aspx


profile picture

Eugene

#5
I am getting the same error when I put in:

Which error? I can see no indication of a specific error message in this thread. If WL 5.0 is unable to find Excel's namespace, you'll need to copy the DLL file as mentioned above (until 5.1 fixes it.)

As to which exact file contains the Excel namespace - sorry I don't know because there's OpenOffice.org installed on my machine.
profile picture

gregg

#6
For those interested.

I used:
using Microsoft.Office.Interop.Excel;


and downloaded PIAs from
http://www.microsoft.com/downloads/thankyou.aspx?familyId=c41bd61e-3060-4f71-a6b4-01feba508e52&displayLang=en#