NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > Application Technical Support > Miscellaneous Support > Historical Version 7 Beta Threads > Version 7 Beta General Questions & Bug Reports

Version 7 Beta General Questions & Bug Reports Ask questions here and post bug reports.

 
 
Thread Tools Display Modes
Old 08-15-2010, 12:25 PM   #1
Camdo
Senior Member
 
Join Date: Aug 2009
Location: Massachusetts, USA
Posts: 197
Thanks: 0
Thanked 0 times in 0 posts
Default Multi-Instrument end of session crash bug - no trades

EnterLong(1,qty,name) will crash NT if the line is executed at 16:00 time (end of session). If the index is 0 (primary bars) everything runs okay.

The crash ceases all trading after the event.

Below is a snippet of code to demonstrate the problem.


// UI parameters:
// orderQuantity = byStrategy, entrys per direction = 1
// primary instrument = BGZ, 10 minute, 1/5/2010 to 1/6/2010
// CloseAtEndOfSession = false
protectedoverridevoid Initialize()
{
Add("BGU",PeriodType.Minute,10); //BarsArray [1]
CalculateOnBarClose = true;
}
protectedoverridevoid OnBarUpdate()
{
if (BarsInProgress != 0)
return;
if(Closes[0][0]<Closes[0][1])
{
ExitLong(1,400,"Reset", "dd1");
}
if(Closes[0][0]>Closes[0][1])
{
EnterLong(1,400,"dd1");
}

if(ToTime(Time[0]) == 160000)
{
EnterLong(1,400,"dd1"); //***** crashes NT but EnterLong(0,400,"dd1") will run okay
}
}



The work around solution is to wrap EnterLong(x,,) with an if statement to filter out the possibility of an end of session execution.


There seems to be some NT end of session code that is invisible to the user in normal (primary bars) operation, but monitoring the OnOrderUpdate method reveals that primary bar orders are cancelled without fill. However this is not the case with other than the primary bars object, which I think is the source of the problem.
Camdo is offline  
Old 08-16-2010, 08:14 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Camdo, thanks for the report - we'll look into this shortly.

Also: Can you please send me the trace / logs from your install via the Help > Mail to Support feature to my Attn?

Thanks
Last edited by NinjaTrader_Bertrand; 08-16-2010 at 12:08 PM.
NinjaTrader_Bertrand is offline  
Old 08-16-2010, 09:09 AM   #3
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

I tried reproducing here but was unfortunately unable to, looking forward to review your trace and logs to hopefully gather more details.

Thanks
NinjaTrader_Bertrand is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
At my wits end with this Multi-Instrument Indicator. Unhommefou Indicator Development 4 05-06-2010 10:37 AM
End of session or end of bar event clam61 Strategy Development 5 05-05-2009 04:58 AM
Multi Instrument and Simulated Data Feed (maybe bug?) tamas Suggestions And Feedback 32 04-13-2009 03:52 PM
Multi instrument order glitch/bug/question? adrian Strategy Development 5 05-01-2008 07:10 AM
NT6: chart properties - session start/end has bug ? FireFly Strategy Development 5 04-09-2007 03:25 AM


All times are GMT -6. The time now is 04:59 PM.