namespace not found
Author: wycan
Creation Date: 7/12/2008 9:37 AM
profile picture

wycan

#1
I created a namespace so that I could include several public classes I want use in other strategies. When I try to include this namespace via "using <namespace>" it cannot find the namespace. I couldn't find anything on the website or documentation... I am sure I am missing something... any ideas ? thx
profile picture

Eugene

#2
Looks like a known bug in 5.0 (already fixed in the upcoming 5.1); workaround for 5.0 below:

Referencing and calling external .net dlls
Using System.xml
profile picture

wycan

#3
thx. Is there a release date for 5.1 ?

profile picture

Cone

#4
Fidelity doesn't publish release dates.
profile picture

wycan

#5
Understand. Having been in IT a very long time I understand the downside to publishing release dates. In any case, do you think it's something we will possibly see within the next 3 months ?

and is there a list where we could see potential fixes and enhancements in 5.1 ? I'm Particularly interested in the full optimatizion component and the fix for the namespace.

BTW... so far I've been very impressed with 5.0.. great product.
profile picture

Eugene

#6
QUOTE:
In any case, do you think it's something we will possibly see within the next 3 months ?


Most likely.

QUOTE:
and is there a list where we could see potential fixes and enhancements in 5.1 ? I'm Particularly interested in the full optimatizion component and the fix for the namespace.


There is no such list in public access.

Namespace issue: fixed.
Optimization, Rankings, PosSizers and other tools: perhaps in 5.2.

5.1 is focused on implementing trading. From what was already announced on the forum, 5.1 will bring Fidelity trading integration (Orders, Accounts, auto- and right-click trading), printing and copying, Fidelity data relocation, Reference section in the Editor to easily include references to assemblies, updates for various components (indicators, providers, rules etc.) and many more.
profile picture

Cone

#7
We tend to think a lot is going to go into 5.2, but in reality we shouldn't expect so much. I don't expect Optimization to make it, for example. (It's better not to guess at this point.)
profile picture

jaltucher

#8
Random question. Doing a simulation on about 334 symbols and I expect it to end up with 20,000+ trades. Using the latest WL. Quickly got to "(Not Responding)" and have been waiting about a half hour now. Using 5.0. Is this normal (i.e. should I wait longer?) or is it just too much for WL 5.0 to handle?
profile picture

Eugene

#9
1. Which time frame? (300,000 1-min bars vs. 2,000 daily bars would make difference)
2. Is on demand update turned off? (It's on by default, making WL access data from the Internet).
3. How complex is the Strategy? A programming inefficiency could also cause slowdown.
profile picture

jaltucher

#10
1. Time frame: daily, since 1997
2. On demand update is not turned off (I just added the symbols so they need to be updated)
3. The strategy is extremely simple. The buy "if" is just one line, as is the sell "if".

I'm on Vista, using WL 5.0
profile picture

Eugene

#11
20,000+ trades is not something that would keep WL5 thinking for so long. Please update the dataset and turn on demand off for this one.
profile picture

wycan

#12
My original post was in reference to the software not being able to find my own namespace... and apparently that's fixed in 5.1.

Since 5.1 is not yet here... Let me ask the question a different way. I want to create a file with a few classes. I want to be able to call those classes from another file.

Is there another way to accomplish that without creating a seperate namespace (and hence the workaround) ?

thx
profile picture

Eugene

#13
QUOTE:
My original post was in reference to the software not being able to find my own namespace... and apparently that's fixed in 5.1.


You should be easily able to set it up in 5.0 by placing the appropriate DLL into Program Files\Fidelity Investments\Wealth-Lab Pro 5 folder.

QUOTE:
I want to be able to call those classes from another file.


Just create a reference to that library in your project.
profile picture

wycan

#14
thx but.. Which "appropriate DLL" ? I'm not using Visual Studio.. just WL Pro compiler. I can't find any DLL anywhere on my disk named according to the file which contains the classes.

I copied the System.XML.DLL (mentioned in your previous post) in WL 5.0 and restarted WL but still can't find any of the classes.

What am I missing ?
profile picture

Eugene

#15
QUOTE:
Which "appropriate DLL" ?


The one that contains methods you want to use in WL5.

QUOTE:
I can't find any DLL anywhere on my disk named according to the file which contains the classes.


I was assuming it's a library compiled by you because there was no indication of methods/namespaces you were trying to find:

"I created a namespace so that I could include several public classes I want use in other strategies."

QUOTE:
I copied the System.XML.DLL (mentioned in your previous post) in WL 5.0 and restarted WL but still can't find any of the classes.


You need to copy your DLL(s) to the path indicated above. Copying System.XML.dll helps 5.0 only when you need the classes contained in the System.XML namespace.

To sum it up:

1. Copy your DLL(s) into Wealth-Lab main folder. This is the way to utilize them in WL5 (applies to all versions).
2.1. This step isn't required for assemblies already present in the GAC.
2.2. WL 5.1 contains a "namespace issue fix" that makes certain assemblies in the GAC visible (like System.XML) w/o having to copy them to program folder, and a GUI dialog for including any .NET references (from the GAC and user assemblies as well).
profile picture

wycan

#16
Eugene... still not connecting up here... Let me use an example and follow up with some direct questions because It's quite obvious I'm still missing something..

Consider the two class files below;

The strategy name for this "ToolBox"
CODE:
Please log in to see this code.



The Strategy name for the class below is "Mechanic"

CODE:
Please log in to see this code.


Questions/Comments:
(1) I compile both of these. I get an error on the second strategy saying It can't find CToolBox

(2) I am not using Visual Studio, but just compiling under WL. What would be the exact name of the DLL created when compiling those two strategies ?

(3) I did a complete search on my entire disk on "all" DLL's. the most recent DLL that has been modified is "System.EnterpriseServices" with a date of 6/27/08. So, clearly no DLL's are being created. Is there another option in WL where I need to create the DLL ? I didn't see it.







profile picture

Eugene

#17
QUOTE:
(2) I am not using Visual Studio, but just compiling under WL. What would be the exact name of the DLL created when compiling those two strategies ?


Ignore, nothing above applies to your case. After seeing your code it's clear to me.

QUOTE:
(1) I compile both of these. I get an error on the second strategy saying It can't find CToolBox


It's not directly possible to refer to the class in another strategy stored as a separate file.
(Please excuse me for not going into details of that since it wasn't documented by Fidelity.) What you need instead is to mix both classes in a single Strategy, like this:

CODE:
Please log in to see this code.



Also hope that this Knowledge Base example could be helpful:

Pass WealthScript object by reference



profile picture

wycan

#18
thx. One last question on this.. I assume that 5.1 will fix the namespace issue and thereby allow one to access classes directly from another file ?

profile picture

Eugene

#19
QUOTE:
I assume that 5.1 will fix the namespace issue and thereby allow one to access classes directly from another file ?


1. No, the namespace issue has absolutely nothing to do with it or your code. It's about being unable to reference some assemblies in the GAC (like System.XML).
2. No, I'm not aware of an easy documented way to use classes from another file.
profile picture

wycan

#20
Eugene.. let me ask the question a different way..

In WL 4.5 I created seperate strategies and used the "Include" mechanism to re-use and modularize my code.

What is the corresponding feature of the "Include" mechanism in 5.0 ? (ie to accomplish the same objective) ?

profile picture

Eugene

#21
QUOTE:
What is the corresponding feature of the "Include" mechanism in 5.0 ? (ie to accomplish the same objective) ?


1. Compile your DLL.
2. Put the file into Wealth-Lab main folder.
3a. Include the usual "using.... " line at the top of the Strategy.
3b. Create an instance of the class & use its methods.
profile picture

wycan

#22

How do u create a DLL in 5.0 ? I asked this earlier (see post 7/16/2008 10:42AM Question (2) ).

See below..
QUOTE:

(2) I am not using Visual Studio, but just compiling under WL. What would be the exact name of the DLL created when compiling those two strategies ?


and I believe u responded on post 7/16/2008 11:49AM, with;

QUOTE:
Ignore, nothing above applies to your case. After seeing your code it's clear to me.


and then u went on to say include the classes in one strategy.

So, I'll ask it again.. how do I create a DLL in 5.0 using WL ?







profile picture

Eugene

#23
QUOTE:
So, I'll ask it again.. how do I create a DLL in 5.0 using WL ?


DLLs are created and compiled in an IDE like Visual Studio Express or SharpDevelop (free downloads).