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 maybeimnotrader, Today, 05:46 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 05:46 PM | ||
Started by quantismo, Today, 05:13 PM
|
0 responses
6 views
0 likes
|
Last Post
by quantismo
Today, 05:13 PM
|
||
Started by AttiM, 02-14-2024, 05:20 PM
|
8 responses
166 views
0 likes
|
Last Post
by jeronymite
Today, 05:00 PM
|
||
Started by cre8able, Today, 04:22 PM
|
0 responses
8 views
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
||
Started by RichStudent, Today, 04:21 PM
|
0 responses
5 views
0 likes
|
Last Post
by RichStudent
Today, 04:21 PM
|
Comment