Thank you.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Unhandled exception: Object reference not set to an instance of an object
Collapse
X
-
Unhandled exception: Object reference not set to an instance of an object
I put another plot onto one of my indicators, it compiled, and then I started to get this error when I tried to load the indicator and others which have not been altered. A couple of the indicators, which I did not alter, are already on a chart, but they are also showing this behaviour when I try to load onto another chart. I removed the indicator that I had updated, but when I try to load others, which have previously loaded ok, I still get the error message. I note from another thread that this was identified in Beta testing, but it was dealt with by emails. Is there a fix?
Thank you. -
-
Hello Nepenthean,
NT advised that the issue was: "The errors would indicate that there's something missing in the code that has no value when plotted."
I was able to isolate it as follows: I have found what the issue is. It is in the code to reduce the DisplayName on the chart. If I use the 2nd "get" part of the code, commented out below, it works. If I use the 1st one it doesn't. The problem seems to be in the "BarsPeriod.Value" and BarsPeriodType.Tick, which are not one of the parameters available for use in the DisplayName drop down list at the top of the editor. How do I include these in the code?
Code:public override string DisplayName { get {return Name + " " + instrumentName + " " + BarsPeriod.Value + " " + BarsPeriodType.Tick + " " + "(" + Period + ", " + minLookBackPeriod + " )";} // get {return Name + " " + "(" + Period + ", " + minLookBackPeriod + " )";} }
I modified your code,
Code:get {return Name + " " + instrumentName + " " + BarsPeriod.Value + " " + BarsPeriodType.Tick + " " + "(" + Period + ", " + minLookBackPeriod + " )";} To, get {return Name + " " + Instrument.MasterInstrument.Name + " " + BarsPeriod + "(" + Period + ", " + MaximumBarsLookBack + " )";}
http://ninjatrader.com/support/forum...ead.php?t=4749
Hope the above helps.
Comment
-
GeorgeW
Do you have multiple data Streams in your indicator. I have been able to force a similar error when using an indicator that accesses multiple data streams and then adding and removing a similar data stream from my chart. Hopefully this info might put someone onto what is going on.
J~
Comment
-
Originally posted by JerryWar View PostGeorgeW
Do you have multiple data Streams in your indicator. I have been able to force a similar error when using an indicator that accesses multiple data streams and then adding and removing a similar data stream from my chart. Hopefully this info might put someone onto what is going on.
J~
Are you already working with us on this matter? If not, can you send us a note at platformsupport[at]ninjatrader[dot]com with details on how you re-create this error?
Comment
-
Originally posted by NinjaTrader_PatrickH View PostHello JerryWar,
Are you already working with us on this matter? If not, can you send us a note at platformsupport[at]ninjatrader[dot]com with details on how you re-create this error?
Were you able to resolve JerryWar's problem with using multi-data series and getting the same error on an indicator? I am getting the same error when I add a 15M data series to an indicator.in NT8.
Comment
-
Hello GeorgeW,
Thank you for your response.
Each case may be different here. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.
I look forward to assisting you further.
Comment
-
Originally posted by NinjaTrader_PatrickH View PostHello GeorgeW,
Thank you for your response.
Each case may be different here. Can you send us your log and trace files by going to Help > Email Support? Please list 'ATTN: Patrick H' in the subject line and reference this thread in the body of the email.
I look forward to assisting you further.
First I will try rebuilding the NT8 version from the NT7 version, which works fine, and if I still have the problem I will get back to you.
Comment
-
I have solved the issue I raised in post #9 and now have a working indicator.
The issue seems to have been that the tags for my ArrowUp and ArrowDown signals (which are based on several different periods) were the same "My Arrow", so when a bar which had both an ArrowUp and ArrowDown signal occurred, the indicator failed. The tags have now been changed to "My ArrowUp" and "My ArrowDown" respectively.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,288 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
22 views
0 likes
|
Last Post Today, 09:41 AM | ||
Started by mishhh, 05-25-2010, 08:54 AM
|
19 responses
6,189 views
0 likes
|
Last Post
by rene69851
Today, 09:29 AM
|
Comment