Documentation for methods, structures etc?
Author: higgsja
Creation Date: 12/16/2010 10:04 AM
profile picture

higgsja

#1
I'm trying to find the documentation for the code base that includes things like the properties, methods/functions for classes, the details of what is in data structures, etc.

So far, I'm not finding that information other than by getting some of it through the examples.

I've looked in the Wealth Lab User's guide, WealthScript Quick Reference, WealthScript Programming Guide.

Is there another set of documentation I'm not finding?
profile picture

Eugene

#2
QUOTE:
like the properties, methods/functions for classes, the details of what is in data structures, etc.

QuickRef. QuickRef again. Wait, did I mention QuickRef?

On a serious note, everything you need to know about the properties/methods/structures/enumerations of the WealthScript namespace you should find in the QuickRef. If you can't find something there (e.g. the StaticDataProvider abstract class, that's off the top of my head), the usage of it is not supported. In this case, use Visual Studio Object Browser + MSDN.

What specific property, class or structure you didn't find covered in the QuickRef?

P.S. A couple more namespaces are thoroughly covered in the WealthScrip Programming Guide: ChartStyles.Trending and WealthLab.Rules.
profile picture

higgsja

#3
Right, I was thinking QuickRef, perhaps :-).

I was after trying to make a ChartPane stop auto-scaling. So, searched for "scale" and came up with the DataScale property in the QuickRef. It definitely isn't what will do what I want, but it set me off on a different journey...

I couldn't discover any "Set" or "Get" methods nor could I discover any further information on what other data elements might be in the BarDataScale struct other than the example. So, what type of data is the BarInterval and Scale?

Meanwhile, still would like to find a way to stop auto-scaling for indicators that are range bound. If all that is exposed is what's listed in the ChartPane object in QuickRef, then perhaps it cannot be done.

I'm really new to WealthLab so am trying to get into the class structure, etc., and understand what is available and possible.
profile picture

Eugene

#4
QUOTE:
So, what type of data is the BarInterval and Scale?

Scale = BarScale. Available values are documented in Bars.Scale.
BarInterval = again, documented under Bars.BarInterval.
QUOTE:
Meanwhile, still would like to find a way to stop auto-scaling for indicators that are range bound.

Please open a new thread, thank you.
profile picture

higgsja

#5
Ok, thanks.
profile picture

jalalfeghhi1

#6
Eugene,
Hi again, hope you had a good weekend. I am working on a rather large-scale application and need to break up my project into various classes. I would like to define one class derived from WealthScript for my strategy with the Execute method and then many other classes that are not derived from WealthScript, because I only have one strategy. The problem is that pretty much most of functionality of the WealthLab is concentrated in WealtScript class, unless I derive all my other classes from WealthScript, I don't have access to WealthLab functions. If I do subclass from WealtScripts, now I am defining more strategies, which is not the spirit of my project.

Is there anyway that I can define only one subclass from WealthScript and then have other classes not derived from WealthScript but yet have access to Wealthlab features? Is there any documentation on other classes within WealthLab with their methods and properties?

Thanks, -J
profile picture

Eugene

#7
Jalal,

Seems like I'm probably missing the point of your question. What are you trying to do with that large-scale application and what's the connection to the WealthScript namespace?
profile picture

jalalfeghhi1

#8
Eugene,
I have one MAIN class derived from Wealthscript that is the entry point to my system and strategy via the Execute method. My project has many components: Risk management, Monitoring, Position Management, etc. I want to represent each component with one distinct class. These classes should not be derived from WealthScript b/c I already have a MAIN class. The problem is that because I am not deriving these classes from WealthScript, I pretty much have no access to WealthLab features.

For example, in my Position Management class, I would like to access ActivePositions object, but this is not possible b/c the ActivePositions object is defined within WealthScript. I did try to cheat my way out and derive the Position Management class from WealthScript (in addition to the MAIN class) but this does not work.

The (scary) observation might be that all my features and functions need to be within the MAIN class (where there is access to WealthLab features) and I cannot break up my project into various classes and files.

Hope that helps!

-J
profile picture

Eugene

#9
Hmm, can you pass an instance of WealthScript to the auxiliary classes?
CODE:
Please log in to see this code.
profile picture

jalalfeghhi1

#10
Eugene,
This is a fantastic idea and it works, thanks so much :-)

Just a quick question: While my strategy executes and the state changes, for example, I create a new position within the MAIN Execute function, will all the Wealthscript objects that I have passed around to my helper classes get updated too and, therefore, all the helper functions have access to latest state of the execution?

-best, J
profile picture

Eugene

#11
I think they'll get updated too. This is easy to see:
CODE:
Please log in to see this code.
profile picture

jalalfeghhi1

#12
Eugen,
Yes, everything is working fine and I do appreciate your support. The strangest problem is that from the Helper class I have access to all the functions via the obj member except for one, the CreateParameter method!! Visual Studio complains that CreateParameter is not accessible because of its protection level. I can't figure this out because all the other methods are accessible via obj pointer. Do you have any clues Eugene?

-Best, J
profile picture

jalalfeghhi1

#13
Eugene,
Please ignore my previous posting, I had to add Strategies to my namespace :-)
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).