Getting Started (Programming in Visual Studio) -- 2012
Author: jony
Creation Date: 4/20/2012 2:04 PM
profile picture

jony

#1
Hello WealthLab,
Please pardon my nube queries, just trying to get started with WealthLab programming. I have WealthLab 6.3 installed and running. The platform looks awesome! Where can I find intro material for programming? (I have the Wealthscript Programming Guide, but that seems more of a reference manual.) Searched forum for "Getting Started" and the best reference seemed to be from 2005. This is just the kind of intro I'm looking for, but is this still relevant? Or is there a more recent version?
Also more specifically, where can I find a catalog of Wealthscript Methods? I see a variety of Community Indicators, Components and such on the WealthLabWiki page, but I can't seem to find a catalog of built-in Methods?
Thank you kindly
profile picture

Eugene

#2
Please see the FAQ items on Documentation and the WealthScript Programming Guide (Help menu) > "Introduction".
profile picture

jony

#3
Hi Eugene,

Thanks for the pointer. I've been studying through the material -- got stuck on ... FAQ/Documentation/Create A Strategy Library/How can I debug my trading strategies in Wealth-Lab Pro 6?/step 6 ... which says "generate a new GUID in Visual Studio using the Tools/Create-GUID menu item."

I can't find this menu item? I'm using Visual Studio 2010 Express. Any ideas?

Thanks much!
profile picture

jony

#4
Whoops! Missed a link ... I'm stuck on ... "FAQ/Documentation/Wealth-Lab Version 6 (.NET) Development/Create A Strategy Library/How can I debug my trading strategies in Wealth-Lab Pro 6?/step 6"

Thanks!
profile picture

Eugene

#5
Hi John,

Make sure you've read this KB article alongside the official debugging guide:

link removed

There you'll find an utility that enables GUID generation AND a step-by-step procedure for DLL debugging in Express version.


UPDATE 08/30/2017: Visual Studio 2015 Community has a "Create Guid" tool built in.
profile picture

jony

#6
Hi again Eugene,

Okay, getting closer, just a couple more q's if you would be so kind . . .

In the general debug guide: How can I debug my trading strategies in Wealth-Lab Pro 5? . . .

1) On step 9, the instructions say that setting the output path to the WealthLab folder will cause the assemblies to be built there, but this isn't working. When I compile the code, I get a "can't copy, access denied" error? I'm the only user, I've looked for VS explanations but can't find anything.

I also get 10 reference warnings such as ["System.Core", which is a framework assembly, could not be resolved in the currently targeted framework. ".NETFramework,Version=v2.0".] Note that I have reset the "Target Framework" from .NET4 to .NET2, as per instructions -- is that correct?

Despite the error and warnings, I find that if I manually transfer the .dll and .pdb files to WealthLab, then I can see and open the strategy in WealthLab, although I haven't tried doing anything much with it yet. Any idea why it's not building in the WealthLab directory automatically? And any idea on these reference warnings?

2) On step 13, "select Debug/Attach to Process from menu" -- this function doesn't seem to exist in Visual Studio 2010 Express, nor does the issue appear to be addressed in the second document you mentioned (Debugging a Strategy with Visual Studio Express or SharpDevelop)(although that did fix the GUID problem :-). What does the "Debug/Attach" do? Does it's absence matter? I find that I can open the strategy in WealthLab without this, but will this cause any problems down the road when I get into interactive debugging?

Thanks again!
John
profile picture

Eugene

#7
1) On modern operating systems (starting from the already unsupported Vista - time flies fast!), the built-in UAC (when engaged) prohibits one from copying/modifying files to sensitive areas like the root of the system drive and Program Files, requiring explicit admin privileges. To sum things up, start Visual Studio by right-clicking its shortcut and selecting "Run as admin". Only then this step will work out properly, unless you disable UAC (which is highly not recommended).

2) It means just that: Attach To (an already running) Process (debuggee). This feature is not present in Express edition, so you are better off following my walkthrough ("Debugging a Strategy with Visual Studio Express or SharpDevelop").

For debugging your own projects, you can live happily without attach to process. After all, there are excellent tools making your debugging a piece of cake - like dragging the yellow arrow while debugging and "Edit and Continue" (sadly, working in x86 mode even in VS 2010). Attach to process is useful mainly for debugging others' work - e.g. Wealth-Lab itself or a malfunctioning addin.

For more details on this and any further VS specific queries you may have, please look them up in Google, MSDN and on thematic VS websites. Thousands of them will do a better job explaining than me.
profile picture

jony

#8
Got it. With that, I think I'm off and running.

Thanks for your help! And for your very prompt response time!
John