Strategy monitor and the "Object not set", a follow-up for the "IsRawProfitMode"
Author: RuneHS
Creation Date: 2/10/2010 12:27 PM
profile picture

RuneHS

#1
I am familiar with the other forum postings about this and your general answer to go to "Wealth-Lab 5 Wiki > Strategy Monitor doesn't work".

But - I have to access to access the ".IsRawProfitMode()" (Community.Components) in the code, and using the code lines that you list in the Wiki (http://www2.wealth-lab.com/WL5WIKI/IsRawProfitMode.ashx):

using Community.Components;
...
Community.Components.Utility u = new Community.Components.Utility(this);
if( u.IsRawProfitMode())
{
// Something here
}

it is this particular sample of lines that causes the strategy monitor not to work. Is there any work-around here, any way of accessing the profit mode without the strategy monitor returning the "Error(4): Object reference not set to an instance of an object"?

I am not an expert programmer and a bit unfamiliar with the "object instance" stuff - sorry!
profile picture

Eugene

#2
Neither "Strategy Monitor doesn't work" nor a record about "object instance" somewhere else in the Wiki are going to help in this case.

Unfortunately, like any other "hack" based upon System.Reflection (GetDataSetName is one good example), IsRawProfitMode should not work in Strategy Monitor.
profile picture

Eugene

#3
Robert, could you please see if we have a request on native support for properties like IsRawProfitMode, GetDataSetName? tia.
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).