object reference not set to an instance of an object
Author: kguclu
Creation Date: 9/21/2010 6:00 PM
profile picture

kguclu

#1
I imported CSI ASCII data successfully. I try to test following simple strategy bu I get "object reference not set to an instance of an object" failure.
- How can I fix this?
- Is there a guide for debugging? I can not see the line number where this failure occurs.


CODE:
Please log in to see this code.
profile picture

Eugene

#2
To quote the Wealth-Lab Wiki FAQ:
QUOTE:
Note: this is a pretty multifaceted error message - it can happen outside of a Strategy. But should you experience the run-time error in your Strategy telling you that "Object reference not set to an instance of an object", you need to know that there's a variable that has not been initialized, in other words it's null. Either you haven't assigned a value to some variable, or a method/function that you called has set the variable to null.


However, I don't believe this simple code is the reason, rather it's in the data. How many symbols are in the ASCII DataSet?

Since your message doesn't tell if this was a single- or multi-symbol test, I assume this was the latter. Did you go through individual symbols to find some particular symbol(s) producing this error?

QUOTE:
- Is there a guide for debugging? I can not see the line number where this failure occurs.

How can I debug my trading strategies in Wealth-Lab?
profile picture

kguclu

#3

I created an ASCII Dataset and imported daily data for the following symbols successfully.
AA AIG AXP BA C CAT DD DIS GE HD HON HPQ IBM JNJ JPM KO MCD MMM MO MRK PFE PG T UTX VZ WMT XOM

All data is between 01.06.2009 - 30.06.2010 range.

I tried to test the strategy on a single symbol and on the dataset. I get the failure on both cases.


I read a post I removed all the symbols and imported them again but I get the same failure.

I am using 32 bit Windows XP in Germany.


Koray,
profile picture

Eugene

#4
Try a different data loading range and if it didn't work, please enter a support ticket with the zipped data file for an affected symbol.
profile picture

kguclu

#5
I created an MSN Dataset and tried MSN Wholesale sector data as well. I get the same failure message.
I get the same failure for all strategies and all symbols.

I removed all Wealth-lab developer 6, restarted the computer and installed WL6 again. But nothing has changed. I get the same failure.


profile picture

Eugene

#6
I have your support ticket, thanks.
profile picture

catweazle

#7
Not sure if this is the problem, here, but I've gotten this error after importing a strategy from one PC to another. To get around it, I simply copied the strategy code on the affected PC and pasted it into a new empty strategy.
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).