Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaTrader crashing

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

    NinjaTrader crashing

    I have had this problem for a while with .11, and it still persists after I upgraded to .13. NT sometimes gives me a message that says "NinjaTrader has encountered a problem and must shut down". Most of the time when this happens it occurs after I have tried to hit the "reverse position" button. It does NOT reverse the position, gives me the message, and then still allows me to do everything else in the program. However, every time I press the reverse position button I get the same message until I shut down NT.

    Now with .13 I have noticed some crashes that are very similar, only not necessarily related to the reverse position issue. It just happened again, seemingly randomly. I looked in the log file, and this is what I found:

    2009-09-17 13:54:23:155 in OnUnhandledThreadException
    2009-09-17 13:54:23:436 ********* exception trapped *********
    2009-09-17 13:54:23:436 Item has already been added. Key in dictionary: 'SourceGrid2.RowInfo' Key being added: 'SourceGrid2.RowInfo'
    2009-09-17 13:54:23:436 at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
    at System.Collections.Hashtable.Add(Object key, Object value)
    at NinjaTrader.Gui.PerformanceViewerControl.Display()
    at NinjaTrader.Gui.PerformanceViewer.btnGenerate_Clic k(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventAr gs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

    This is a trace of the error.

    One serious issue is that after every one of these crashes, the stop from whatever ATM strategy I had running is automatically placed into the market again by NT... even if I already exited the position before I quit. Therefore as soon as I connect, the system places me in the market. I am currently running just the demo version of this, but with placing live trades it would be a serious problem. You guys need to code this up so that under no circumstances does NT try to place a stop order back into the market upon startup without me authorizing it.

    #2
    Hello JS999,

    As per the crash you included, what steps did you perform just before this crash occurred?

    Does the crash occur each time when you hit the REV button. If not, please try to isolate the crash; under what circumstances does the crash occur each time?

    What order status did the stop loss have when the crashed occurred?

    Once NinjaTrader crashes, I suggest to check all active orders and ensure they are cancelled.

    If an order has been cancelled, it will not be re-submitted upon re-connection.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Jason View Post
      Hello JS999,

      As per the crash you included, what steps did you perform just before this crash occurred?
      Nothing really, I was kind of just clicking around. Seemed to be a bit random.

      Does the crash occur each time when you hit the REV button. If not, please try to isolate the crash; under what circumstances does the crash occur each time?
      Unfortunately I can't do that, as the crash occurs roughly one time out of every 30-50 times I press the reverse button. It never happened in version .10, only .11 and later. I can't isolate it because it's not repeatable. Incidentally, you guys should probably write some more detailed debug tracing into your logs, so you can detect this type of thing better - that log entry I pasted isn't going to tell you anything.

      What order status did the stop loss have when the crashed occurred?
      Unfortunately I did not explictly check the order page. However, the order itself was CLOSED. I press the Close button, it closes the order, the order disappears from the DOM and the chart trader. Next time I will explicitly check the orders page to make sure, but I'm 99% sure the order is closed. This is in fact the problem, because the system doesn't know that the order is closed, and then places a stop and fills it as soon as I reconnect. The behaviour here should be that NT itself never PLACES any kind of order on startup, no matter what. I will double-check the orders page the next time this happens.

      Once NinjaTrader crashes, I suggest to check all active orders and ensure they are cancelled.
      As far as I can tell they were all cancelled, because NT acted like they were...

      If an order has been cancelled, it will not be re-submitted upon re-connection.
      I'll check next time... but in any case, NOTHING should EVER be re-submitted on connection. It's not your job to determine whether I should have an order in the market as soon as I connect - it's my job to evaluate the status of my orders and decide what to do once I see where the market is. NT automatically re-submitting orders is NOT helpful. You should never be submitting orders of any kind automatically on reconnection unless I explicitly authorize it.

      Comment


        #4
        I see, please send me an email at support[at]ninjatrader[dot]com when the stop loss order is submitted upon re-connection.

        Include your log file for the date the issue occurred, put 'Attn Jason' in the subject header and please reference this forum thread.

        Log files can be found at My Documents-->NinjaTrader 6.5-->log.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Sent you an email...

          Comment


            #6
            strategy error

            hi,

            I have ,erged data from March to Septenmer 09 and when i run a strategy on the entire March to Sep period at once i get different results every time. This seems to only happen to large periods of back testing time frames.

            What i noticed is that when i look back through chart that the strategy regularly skips days or weeks at random which seems to be the cause of the inconsistent results and i have friends who experience the same error when testing long periods.


            Is this a known issue of how can i fix this?

            Comment


              #7
              Hello bologc,

              Please start a new thread in the future.

              When the strategy skips data, the data is present in the chart, correct?

              Could it be different data is used when the results differ?

              Is there any consistency between the occurrences when data is skipped?
              JasonNinjaTrader Customer Service

              Comment


                #8
                the same exact data is used in all tests,

                the inconsistency is consistent in the fact that this only occour when i run large periods of back testing.

                I went in the chart view after running the strategy and i can visually see where the chart data is missing for a few days or weeks, while on the other screen the same strategy on the same data doesn't have this issue.

                Also if i rerun the strategy the missing data reapears but then some other dates go missing

                Comment


                  #9
                  Hello bologc,

                  What happens if you create a chart for the same data request? Do you display all requested data at once?

                  Upon performing the backtest, are you connected to a data feed?
                  JasonNinjaTrader Customer Service

                  Comment


                    #10
                    when i load a chart the data is there.
                    and connected ot live or not make no difference i tried both

                    i merged the june and sep contract in the dec.

                    so it is one hurge 1209 contract. just seems like ninja gets confusedor runs out of memory when i tries ot load the hole contract in the strategy la analyser

                    Comment


                      #11
                      What happens if you backtest the SampleMACrossOver strategy on the same set of data; does the issue persist?
                      JasonNinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by aligator, 01-06-2022, 12:14 PM
                      4 responses
                      238 views
                      0 likes
                      Last Post john_44573  
                      Started by reynoldsn, Today, 05:56 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post reynoldsn  
                      Started by bortz, 11-06-2023, 08:04 AM
                      51 responses
                      1,990 views
                      0 likes
                      Last Post aligator  
                      Started by dmking, 11-12-2019, 12:31 PM
                      4 responses
                      4,155 views
                      0 likes
                      Last Post jasonw
                      by jasonw
                       
                      Started by roblogic, Today, 04:31 PM
                      0 responses
                      11 views
                      0 likes
                      Last Post roblogic  
                      Working...
                      X