Is there a debugger in WL5?
Author: radxxx
Creation Date: 5/27/2009 11:20 AM
profile picture

radxxx

#1
is there a debugger in WL pro 5?
profile picture

Eugene

#2
No. Please see these articles on how to debug a strategy in WL5:

How can I debug my trading strategies in Wealth-Lab Pro 5? by Dion Kurczek
Debugging a Strategy with Visual Studio Express or SharpDevelop in WL5 Wiki

P.S. Wealth-Lab Pro 5 is available to US and Canadian residents (only), while Developer 5 is for overseas customers - but the debugging technique is applicable to both of them.
profile picture

radxxx

#3
hey eugene, since ive been working more with eclipse and only lately with VS im not familiar with it(ive been working with eclipse mostly), i really need that debugger since its really putting a hold on my project, im having trouble with the guide, so far ive opened a new project, added ref, ive created new class in the project, added the using, and then i really dont understand what to do, what do you mean by deriving the class from WL?
plus im sure people asked you before but why is it that you dont made an easier way to use the debugger? is VS the easiest way to debug the programs? im only in stage 4 and i had problems with the guide.
profile picture

Eugene

#4
QUOTE:
i really dont understand what to do, what do you mean by deriving the class from WL?

How do you derive a class in Java (by mentioning Eclipse, I assume you're familiar with Java)? Step 4 is basically telling you to implement the WealthScript interface:
CODE:
Please log in to see this code.

So your code is at this step (i.e. before implementing the StrategyHelper class two steps later) should not be much different from what you do in Wealth-Lab's built-in editor.

Since I believe your troubles may have to deal with unfamiliar lingo and IDE, take a look at the open source Wiki project called Strategies.ActiveTrader. There's a good deal of strategies ready for debugging. It's always easier when you have a working example.
QUOTE:
why is it that you dont made an easier way to use the debugger? is VS the easiest way to debug the programs?

I believe that the software architects at Fidelity objectively considered that developers with some knowledge of .NET should not have trouble with using an external, full-fledged debugger. Practically, that's true. For traders, using the built-in simple tools like PrintDebug or AnnotateChart for their debugging needs could be enough.
profile picture

sf631

#5
I'm running into problems in getting VS2008 Express set up to use as my debugging environment as well. I've been attempting to follow Dion's tutorial and, without benefit of significant programming experience, I'm stumped on what I'm supposed to be doing. Obviously this is user error, but I've read every bit of the Wiki and past forum answers that I could find and no use yet.

Here's what I've done so far.
* created a new project
* added the WealthLab assembly
* within it, I've created two classes, named VSStrategy and VSStrategyHelper. The code is as follows (adapted from one of Cone's earlier posts):
CODE:
Please log in to see this code.


* Changed the output path to the WLP install directory
* made a duplicate of the "WLPLibrary1.csproj" file in "WLPLibrary1.csproj.user", replaced the code to look like:

CODE:
Please log in to see this code.


When I try to run this code as is, I get
QUOTE:
Error 1 'WealthLab.Strategies.VSStrategy' does not implement inherited abstract member 'WealthLab.WealthScript.Execute()' I:\My Documents\Visual Studio 2008\Projects\WLPLibrary1\WLPLibrary1\Class2.cs 9 18 WLPLibrary1


as my error message. Actually I'm not even certain if I'm supposed to define these classes in every strategy I create, or if I'm supposed to run them, or keep them within the same project as other strategies I create.

I'm getting one other minor error when I try to add a "using WealthLab.Indicators" and presumably other using statements. My questions are (in order of big picture to details):

(1) At a high level, how are the pieces supposed to fit together in VS debugging approach? That is, am I supposed to build a library within VS2008 including a bunch of WLP methods and classes, have VS point to WLP, or otherwise? If I choose not to copy-paste the compiled code into the WLP editor and instead run from VS, will the strategies be stored within the VS directories or the WLP?

(2) If I want to have access to all the technical indicators that exist within WLP, do I need to do anything besides the "using WealthLab"? Will it recognize other "using" statements or do I need to copy a number of DLLs or other files to a directory?

(3) Does there need to be a fresh MyStrategy and MyStrategyHelper class for every strategy? Does it need to include the author, date created, etc...?

Thanks in advance.
profile picture

Eugene

#6
QUOTE:
(3) Does there need to be a fresh MyStrategy and MyStrategyHelper class for every strategy? Does it need to include the author, date created, etc...?

Yes / Yes.
QUOTE:
(2) If I want to have access to all the technical indicators that exist within WLP, do I need to do anything besides the "using WealthLab"? Will it recognize other "using" statements or do I need to copy a number of DLLs or other files to a directory?

Yes, you have to use WealthLab.Indicators (Community.Indicators etc.)
To recognize a "using" statement, the DLL has to be referenced. Please consult your VS2008 resource for more on this.
QUOTE:
That is, am I supposed to build a library within VS2008 including a bunch of WLP methods and classes, have VS point to WLP, or otherwise?

We believe it's thoroughly explained in the 2 KB articles. Please re-read them carefully.
QUOTE:
If I choose not to copy-paste the compiled code into the WLP editor and instead run from VS, will the strategies be stored within the VS directories or the WLP?

The compiled library that holds your strategy classes should be stored within the WLP main directory.
QUOTE:
I'm getting one other minor error when I try to add a "using WealthLab.Indicators"

Most likely, you haven't referenced the assembly in VS.
QUOTE:
Error 1 'WealthLab.Strategies.VSStrategy' does not implement inherited abstract member 'WealthLab.WealthScript.Execute()' I:\My Documents\Visual Studio 2008\Projects\WLPLibrary1\WLPLibrary1\Class2.cs 9 18 WLPLibrary1

The strategy code above is just fine. Most likely, your library contains a parasite class within the file named Class2.cs that doesn't implement the interface.
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).