Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multi-Instrument end of session crash bug - no trades

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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, 12:08 PM.

    Comment


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

      Thanks

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      80 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X