Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Code not catching Error
Collapse
X
-
Code not catching Error
Hey guys, I'm getting a popup "Object reference not set to instance of an Object" I tried using a Try Catch block but that did not catch the error and also checked the log file but am not able to pinpoint the line of code causing it. Any ideas on how to figure out which line? I know it has to do with the number of open positions.Tags: None
-
Originally posted by elitetradernyc View PostHey guys, I'm getting a popup "Object reference not set to instance of an Object" I tried using a Try Catch block but that did not catch the error and also checked the log file but am not able to pinpoint the line of code causing it. Any ideas on how to figure out which line? I know it has to do with the number of open positions.
Print ( "1" );
something;
Print ( "2" );
something else;
Print ( "3" );
And depending on how big your program is, you could start by splitting off in 4 sections, then work your way down to sections within those sections. (divide and conquer).
Well, that would be my plan of attack.
-
-
Originally posted by elitetradernyc View PostCool, its weird because I also use CLR Debugger and that didnt catch it either.
Comment
-
Originally posted by sledge View PostYou might want to poke around in these threads also:
http://www.ninjatrader.com/support/f...archid=1471380
Comment
-
-
Originally posted by elitetradernyc View PostHey guys, I'm getting a popup "Object reference not set to instance of an Object" I tried using a Try Catch block but that did not catch the error and also checked the log file but am not able to pinpoint the line of code causing it. Any ideas on how to figure out which line? I know it has to do with the number of open positions.
Comment
-
Hey Koganam, this error is totally different. I think it has to do with the number of positions that my strategy has open at one timewhen I had it at 2 i didnt get the error now ive got 6 at once so somehow that is causing it. I also have CLR debugger installed but for some odd reason thats not catching it this time.
Comment
-
Originally posted by elitetradernyc View PostHey Koganam, this error is totally different. I think it has to do with the number of positions that my strategy has open at one timewhen I had it at 2 i didnt get the error now ive got 6 at once so somehow that is causing it. I also have CLR debugger installed but for some odd reason thats not catching it this time.Last edited by koganam; 05-28-2013, 09:14 AM.
Comment
-
-
Hello elitetradernyc,
Thank you for your posts and thank you to those that have tried to help out here.
Is the strategy getting stopped by the error?
In addition, please send me your log and trace files for today so that I may look into what occurred.
You can do this by going to the Control Center-> Help-> Mail to Support.
Please place 'ATTN: Patrick - 852383' in the subject line and a reference to this thread in the body of the email: http://www.ninjatrader.com/support/f...ad.php?t=58061
I look forward to assisting you further.
Comment
-
I figured it out, it was being caused by ExitLong when there is no related long position in the field for entry name.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,607 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
9 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
19 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
6 views
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
15 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
Comment