Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exception thrown when reversing position

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

    Exception thrown when reversing position

    This has occurred a few times, and the same type of exception has occurred on NT 6.5 since about version 6.5.1000.13 or so. Basically, when I trade in sim mode and press the reverse button key, it throws an exception and tells me that I need to shut down the system. The problem is intermittent, because most of the time the reverse key works fine.

    The exception is logged as follows:

    2010-03-24 08:30:45:159 in OnUnhandledThreadException
    2010-03-24 08:30:45:179 ********* exception trapped *********
    2010-03-24 08:30:45:179 An XML error has occurred.
    2010-03-24 08:30:45:179 at NinjaTrader.Cbi.Deserializer.Deserialize()
    at NinjaTrader.Gui.SuperDom.PriceLadder.Reverse()
    at NinjaTrader.Gui.SuperDom.PriceLadder.lblReverse_Mo useDown(Object sender, MouseEventArgs e)
    at System.Windows.Forms.Control.OnMouseDown(MouseEven tArgs e)
    at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.Label.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 problem has occurred on multiple installations of NT across multiple operating systems, so it has nothing to do with .NET or my particular computer, it is just a pure Ninja bug. At the time this occurred I had about 500 sim trades logged, so it could be related to the fact that the sim builds up trades in the DB past a certain point. I don't know if that's it, but that's the only thing I can think of, since I can't recall this thing occurring any time right after I have reset the simulator, only after I have been taking a number of trades with it. (I could be wrong about that, but it seems like that could be the case.)

    Anyways, since this is an intermittent bug, I strongly suggest that you try putting some more descriptive error handling routines in that particular section of code for your next beta build. That way, when this occurs again you can get more information than the general error message shown above. As I said, there has been a problem reversing positions like this since earlier versions of 6.5, so this is probably in an older section of code somewhere.

    #2
    And while we're at it, I can't understand why it takes so darn long to reset the simulator. I mean, with only 500 trades logged I click the reset sim button with the option to erase all trade data, and it takes around 40 seconds to complete! I can't imagine how long it would take if there were thousands of trades. Why is this taking so long to do? If you're just erasing stuff it should be done a lot quicker than that, especially on a fast machine with a decent hard disk. You can't be erasing more than a few thousand rows in a small database, it shouldn't be taking this long.

    Comment


      #3
      Hello JS999,

      I will forward the suggestion to insert more descriptive error handling routines in this scenario to our Development team. Thank you for your feedback.

      Unfortunately I am not sure why it takes that long to reset the database. It took about 10 seconds on my end, while I had 55 trades in my database.

      Comment


        #4
        Originally posted by NinjaTrader_Jason View Post
        Hello JS999,

        I will forward the suggestion to insert more descriptive error handling routines in this scenario to our Development team. Thank you for your feedback.

        Unfortunately I am not sure why it takes that long to reset the database. It took about 10 seconds on my end, while I had 55 trades in my database.
        Try it with 500 trades and see how long it takes, then 5000 trades... 55 trades is a very low number. And by the way, 10 seconds for 55 trades is extremely slow. Think about that... it's taking a modern computer 10 seconds to change a couple of hundred rows in a DB? That makes no sense. I don't know what that routine is doing, but somebody should probably look at it.

        As for the other stuff, yes, please do insert that error handling - it will be the only way to track down this bug. I will let you know in the next version if it occurs again.

        Comment


          #5
          We have the performance improvement on sim account reset on our list yet. However, other items take priority for now. Thanks for your understanding.

          Comment


            #6
            Originally posted by NinjaTrader_Dierk View Post
            We have the performance improvement on sim account on our list yet. However, other items take priority for now. Thanks for your understanding.
            No problems, just wanted to note it for you...

            Comment


              #7
              Hi JS999 !

              We tried to produce your performance problems on our side in several scenarios, even with a database with ~ 1000 orders it takes ~3 sec for me.

              When you are sure you have as much data in your database as the last time (where it took the 40 sec), can you please compress and send me your database to christian DOT huebner AT ninjatrader DOT com ? Even a database where the reset would take 10 sec would be good. When the database is attached to mail, pls. da a Reset on your side, and add the information, how long it takes for you.

              Thanks,
              Christian
              ChristianSenior Software Developer

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              634 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              364 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              105 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              567 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              568 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X