Object reference not set to an instance of an object
Author: jayram
Creation Date: 7/13/2010 1:22 PM
profile picture

jayram

#1
Hi

When I run any script I get runtime error above.
The script compiles and runs and seems to complete, but when it does complete WL5 jumps to the editor view to show the error.
I am currently trialling the software having been a long time WL4 user.

Is this a known issue for newbies to WL5? (only found 1 non related ref to this in the forum)

J
profile picture

Eugene

#2
Hi,

This is an indication of a coding error:

Knowledge Base > Errors | Strategy (scroll down to the end)
profile picture

jayram

#3
Yes I would have thought it was some form of code error, except that it occurs on every script I open (totally unmodified code from the preloaded scripts). error occurs on all symbols and and all scripts.

J
profile picture

jayram

#4
I just created the following simple script as an example. same error occurs with this script.

CODE:
Please log in to see this code.


J
profile picture

Cone

#5
Try:
1. using a different DataSet.
2. turn of on-demand
3. restart
profile picture

jayram

#6
Thanks Cone

I've played around with a few options and here's what I found.

1) if I un-check the benchmark for buy and hold in preferences everything works fine
2) if I leave the benchmark checked and stay in raw profit mode everything works fine
3) in portfolio mode and with buy and hold benchmark checked I get the error

thanks for the tip on turning off on-demand, WL5 is now 10 times faster! :)

J
profile picture

jayram

#7
One other thing I noticed:

When running a script on a single symbol the error appears in the editor.
when running on a portfolio the error flashes up in a debug window and refers only to the last stock in the portfolio.

J
profile picture

Cone

#8
It it possible that your B&H symbol comes from a Data Provider other than the one for the DataSet that you were testing? (Errors for that will be fixed in the next release.)
profile picture

jayram

#9
Hi Cone,

The B&H symbol comes from the same data source - all Yahoo.

J
profile picture

Cone

#10
I can't duplicate the problem, so your configuration must be different than mine. It's likely that the error is occurring during post-processing, so let's see if you can isolate it to one of the Performance Visualizers that you're using. Try this:

1. Create the error.
2. Close the Strategy Window.
3. In Preferences (F12), uncheck one of the Performance Visualizers that you're using.
4. Open the Strategy
5. Repeat 1 - 4 until the error goes away (hopefully), or until you don't have any Performance Visualizers selected.

If the error goes away, you'll know if is occurring in a Visualizer and then you can tell us which one it is.

Edit: Another possibility is that I'm testing with the next version and the problem was corrected already when changing how the B&H symbol works between providers.
profile picture

jayram

#11
Have gone through this process, and its not the visualisers.

Perhaps its been fixed in your version.

Alternatively it might be something to do with the account i set up? How do i delete all accounts?

J
profile picture

Cone

#12
Paper accounts? I don't know what the connection would be since it seems like you isolated it in your 7/13/2010 2:38 PM post to a combination of Benchmark B&H and Portfolio Simulation. Since we're certain that work was done in this area (and there's practically no time left to isolate, fix, and add changes for the next release) please check it in the next release. If it still happens there, then we'll have to dig in.
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).