Runtime Error after Upgrading to 6.2 (object reference not set to an instance of an object)
Author: Shourui
Creation Date: 6/22/2011 3:20 PM
profile picture

Shourui

#1
Hi,
I have been using a very simple chartscript to check relative valuation of fundamental data for 2 indices, such as SPX (named as SPX INDEX) vs. its Consumer staples sector (S5CONS INDEX).Data is in ASCII files with custom fields (PE_RATIO,EBITDA,....).
Below is the code. It basically just subtracts Sector P/E Ratio by SPX P/E Ratio and plot on a ChartPane. It has been working well in last several months, but got a running error after upgrading to 6.2: " Runtime error: Object reference not set to an instance of an object. at WealthLab.Starategeis.MyStrategy.Execute(). I tested the code in another comptuer which has not upgraded to 6.2. It is working FINE! Can you fix this bug asap? or is there any way that it can be reversed back to 6.1 version? Thanks.

CODE:
Please log in to see this code.

profile picture

Eugene

#2
Which ASCII data provider version the Extension Manager reports?
profile picture

Shourui

#3
ASCII Files Static 1.2.9.0
profile picture

Eugene

#4
Well, you need to update the Extension then. In 1.3.2 (actual version) Named DataSeries are working.
profile picture

Shourui

#5
How to upgrade the externsion? the "upgrade" button is grayed out.
profile picture

Eugene

#6
If it doesn't appear after switching to "Other Extensions", then follow the illustrated tutorial on this site (Extensions section).
profile picture

Shourui

#7
Hi, Eugene

Thanks for your reply. tried to download ASCII 1.3.2.0, but failed. I have created a support ticket. Please help. thx.
profile picture

Shourui

#8
I just installed ASCII 1.3.2.0, but it still doesn't work and showed the same message.
A bigger problem I just found is SetContext doesn't work in watchlist created by using "Aronow Software LLC watchlist provider", but works in the original DataSet created by using "ASCII files". All watchilists and datasets were created before WLP 6.2 upgrade.

Here is the code

CODE:
Please log in to see this code.


"Runtime error: could not find symbol "SPY EQUITY"..." if I run script on any symbol in any watchilists. But it is plotting a fine SPY chart when run the script on a symbol in any original dataset from ASCII files.
profile picture

Eugene

#9
Your code is missing one directive:
CODE:
Please log in to see this code.

But you're correct: the WatchList provider is producing a runtime error "could not find symbol".

But in my test case, ASCII is not involved. I'm using a WatchList provider DataSet based on a TradingBlox DataSet. My best bet is that the problem is in the Watchlist provider itself. I'll contact the developer to report the issue, thanks.
profile picture

Shourui

#10
isn't SetContext's 2nd parameter used to synchoronze?
Can we reinstall WLP back to 6.1 version before these bugs are fixed?
profile picture

Eugene

#11
1 - Have you checked a note in the QuickRef re: Synchronize and plotting?
2 - Answered in a different thread.
profile picture

trader rog

#12
I just upgraded to 6.2 and now get the "Object reference not set to an instance of an object" error. Also, if I run the same strategy on a different dataset, then the backtest does not execute the trades as it had with the 6.1 version. I upgraded to ASCII Files Static 1.3.3.0 and this didn't fix the problem. I'm not sure what to try next.
profile picture

Eugene

#13
Don't go no further:

Wiki > Knowledge Base > Errors | Strategy > "Object reference not set to an instance of an object", paragraph 2.
profile picture

trader rog

#14
Just checked - Benchmark Buy & Hold is not enabled.
profile picture

Eugene

#15
Then please provide us with as many details you can find about your setup. Make it easy for us to reproduce what you see, because we have no idea of what you're doing, and this error is truly generic and is not indicative of a 6.x bug.
profile picture

trader rog

#16
I just realized I was in the wrong folder of strategies. Everything is working perfectly. Sorry for the inconvenience.
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).