How do I use code completion in Visual Studio to provide stubs for StrategyHelper?
Author: gregg
Creation Date: 7/29/2008 4:54 PM
profile picture

gregg

#1
In Glitch's tutorial #5 says # Derive the class from WealthScript. At this point you can use Visual Studio's code completion to automatically generate a stub for the required "Execute" method.

QUOTE:
In the same source code file (or a different file if desired) create a new class derived from StrategyHelper. A StrategyHelper is required for each Strategy that you create. Wealth-Lab Pro examines your assembly for the StrategyHelpers that it contains, and uses them to determine what Strategies to display and load. Name the helper class the same name as your Strategy's class name, with the word "Helper" appended. Use code completion to provide stubs for the required properties. The Strategy Helper class returns properties that describe details about the Strategy that are needed by Wealth-Lab Pro. Implement the properties in the code of your helper class.

How do I use code completion to provide stubs?

Thank You,
Greg
profile picture

Eugene

#2
Greg,

I believe that Visual Studio's online help should address this question. In plain English, create a StrategyHelper class by suffixing the strategy class with Helper : e.g. MyStrategy and MyStrategyHelper. Right-click on the interface name and let Visual Studio generate all stubs for interface members.
profile picture

gregg

#3
I don't see option to generate stubs, is there somewhere else I should be clicking?

http://img337.imageshack.us/img337/2159/picture4qa8.png

profile picture

Eugene

#4
Most likely, something is wrong with your syntax: Class1Helper looks like it falls out of namespace, Class1 title isn't highlighted for some reason. Make sure you have followed the tutorial's steps exactly.

Download the source of Strategies.ActiveTrader assembly to get a working sample.

Alternately, see post by Cone from 2/28/2008 3:19 PM in this thread for a template:
Referencing and calling external .net dlls
profile picture

gregg

#5
I think I am getting somewhere, thanks.
-Greg
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).