Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can you increase maximum number of open windows?

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

    Can you increase maximum number of open windows?

    I have noticed this problem with NT for a long time. I run a setup that pushes NT to its limits in terms of CPU, performance, and so on. One of the limitations that I have run into is the fact that when I get up to around 90 open chart windows plus about 15 DOMs, NT will tend to crash if I open another window or two after that. Sometimes it lets me open up a few extra windows, and then I can save the workspace, but on system startup, when I try to open that workspace, it tries to load everything off the disk and eventually just crashes with an error message (the whole program just terminates). Through trial and error I have figured out the limit seems to be about 105 open windows or so (the 90 charts plus the 15 DOMs).

    Just for reference, I am running an Intel 3930K processor with 32 Gigs of RAM and an SSD hard drive, so system specs don't get much better than that. I am running in Windows 7, and I run the 64 bit version of NT. Can you guys try replicating this error on your end, and see how many open windows NT allows? Perhaps there is some limitation on the number of window handles that can be open at once, or something. If there is some way to fix this so I could open up another 20 windows or so, that would be useful. Thanks!

    #2
    Hello Trader_55

    Thanks for writing in.

    I would not be able to replicate this on my end however I would like to look into if there is a message indicating what specifically is causing your NinjaTrader to crash.

    Please send an email to support[at]ninjatrader[dot]com with today's trace and log files

    You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
    The trace file will be named "trace.20130503.txt"

    You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
    The log file will be named "log.20130503.txt"

    Once located please send both files as attachments to your email and in the message put ATTN Brandon and include a link to this forum topic.

    I look forward to assisting you further.
    BrandonNinjaTrader Customer Service

    Comment


      #3
      I haven't tried this recently, however I will try it again and report back with the file to let you know. However, I do recall looking at this file before and I don't think that there was anything in there that was helpful.... it crashes before logging anything.

      This issue is really something that should probably be forwarded to the dev team and just ask them if they have run into it before, and if they know what is going on. Also, someone on your end should really try to replicate this by opening up 20 DOMs with 100 windows and see if you can do that (you can just make them all the same, say 100 charts of 1 minute data, 1000 bars each with the same template (add a few moving averages or something on there)). If you don't get the error then at least I know it could just be on my machine...

      Comment


        #4
        We do not set any sort of hardcoded limits on how many windows or charts you can open.

        Any limits would be specific to what your CPU can handle.

        In order to investigate this, we would need to look into your diagnostic files.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Matthew View Post
          We do not set any sort of hardcoded limits on how many windows or charts you can open.

          Any limits would be specific to what your CPU can handle.

          In order to investigate this, we would need to look into your diagnostic files.
          OK, I will try to get you those files later, but like I said it probably won't tell you much since I think I already looked at them. I'll post in this thread once I email the files. If it's a CPU issue then it's going to show up on any computer, since my CPU is the most powerful you can buy (or close to it). I'm not sure that's the issue though... unless you try to replicate it on your end you probably won't be able to figure it out. But I'll let you know when I get the files for you...

          Comment


            #6
            Hello,

            Please keep in mind that your NinjaScript objects (indicators) are limited to using a single processing core. This means that depending on the number of indicators you have loaded, you may see that charts go unresponsive when your single core in your extremely powerful computer is over worked.
            MatthewNinjaTrader Product Management

            Comment


              #7
              Originally posted by NinjaTrader_Matthew View Post
              Hello,

              Please keep in mind that your NinjaScript objects (indicators) are limited to using a single processing core. This means that depending on the number of indicators you have loaded, you may see that charts go unresponsive when your single core in your extremely powerful computer is over worked.
              Understood... however there is a difference between going unresponsive and crashing the program. I don't care if it takes longer to load, but it shouldn't crash the program, it should just take longer to load more windows. This is a repeatable error, I am pretty sure that you could replicate it on your end. Incidentally, this has happened with multiple different workspace configurations over time, so it's not always the same charts with the same indicators. It seems to be related to the number of open windows, regardless of what is in them...

              Comment


                #8
                Hello Trader_55,

                Thanks for your reply.

                We have tested on our end opening 400 charts with out issue.

                There are no coded limitations into the NinjaTrader software that would prevent your from opening more windows.

                There are reasonable limitation from Microsoft to the .NET Framework however that could prevent additional windows from opening. Items such as how many indicators, data series, and so on will play into this.

                Once you have reproduced the error and send in your log and trace files for that day we will be able to look into what is happening on your system

                You will find the trace file on your PC in the (My) Documents > NinjaTrader 7 > Trace folder.
                The trace file will be named "trace.YYYYMMDD.txt"

                You will find the log file on your PC in the (My) Documents > NinjaTrader 7 > Log folder.
                The log file will be named "log.YYYYMMDD.txt"

                Once located please send both files as attachments to your email and in the message put ATTN Brandon and include a link to this forum topic.

                I look forward to assisting you further.
                BrandonNinjaTrader Customer Service

                Comment


                  #9
                  Hey Brandon... thanks for doing the test. Right now I have things working with an acceptable number of charts, so I will have to do a special test in the next few days to try messing it up and see what happens. I'll let you know as soon as I do that. If it is a .NET issue, can I ask if you guys are compiling on the latest version of .NET by any chance (4.5)? If it is an earlier version, maybe it would also make sense from a general perspective to go to the latest one for the next NT version. (Of course if you already are on the latest one then I suppose it will make no difference... )

                  Comment


                    #10
                    OK, I just tried adding about another 6 charts on top of what I had, and I got the expected result. I have attached a screenshot of the error. I am going to send you the log files as well as the files mentioned in the screenshot, from Microsoft. EDIT: Just emailed it to you.
                    Attached Files
                    Last edited by Trader_55; 05-06-2013, 10:51 AM.

                    Comment


                      #11
                      Hello Trader_55,

                      Thanks for your reply.

                      From your trace we found the following message.
                      "Error creating window handle."

                      This indicates that too many handles are being used for .NET Framework. This limitation of 10,000 handles is for all versions. With your current NinjaTrader set up .NET Framework will not be able to open more windows.
                      How many handles are being used will be affected by items other than just how many charts you have open such as how many indicators you have applied to the chart.

                      The Performance Tips section of our help guide could assist in reducing the number of handles being used so that if you still want to open more charts you could decreasing the performance being used elsewhere.
                      BrandonNinjaTrader Customer Service

                      Comment


                        #12
                        Brandon,

                        I suppose this could be the case, however, what is it that creates window handles? On each chart I may have something like 10 indicators on average, at most (some have less). So 100 charts x 10 indicators = 1000 handles, assuming it works like that. How many handles are being created for an average chart, and are there indicators that create more than one handle? I should still be well below 10,000 handles, no?

                        Comment


                          #13
                          Hello Trader_55,

                          Thanks for your reply.

                          Yes, it is possible for indicators to create multiple handles. I would not be able to say how many handles are being created by an individual item.
                          This is going to come down to a performance limitation of the .NET Framework and the only thing that can be done is to free up more resources.
                          BrandonNinjaTrader Customer Service

                          Comment


                            #14
                            Thanks Brandon... I have a suspicion that there is one indicator called ZigZagUTCSwing, in your list of indicators on this site, which could be causing this (maybe?). It plots a piece of text on the chart at every swing point, which I suppose could add up to possibly dozens or hundreds per chart. For example, it is doing something like this:

                            DrawText("Text" + SwingCount, false, ((Math.Round(((lastHi-lastLo) * 1), 4, MidpointRounding.AwayFromZero))/dividingAmount).ToString(),CurrentBar-lastHiBar, lastHi, textOffset, JStextColorHigher, textFont, StringAlignment.Center, Color.Transparent, Color.Transparent, 0);

                            Could this call be creating a window handle for each point, by any chance?

                            Comment


                              #15
                              Hello Trader_55,

                              Thanks for your reply.

                              It definitely could create multiple objects however I could not if it would create a handle for each object or how many handles it may use. Unfortunately the only thing I could suggest is try removing it from your charts and test how many more you can open. To be able to open more charts you would need to free up resources for the Microsoft .NET
                              BrandonNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by gbourque, Today, 08:20 AM
                              1 response
                              8 views
                              0 likes
                              Last Post gbourque  
                              Started by carnitron, 04-27-2024, 08:42 PM
                              1 response
                              16 views
                              0 likes
                              Last Post NinjaTrader_Gaby  
                              Started by WHICKED, 04-26-2024, 12:56 PM
                              3 responses
                              26 views
                              0 likes
                              Last Post WHICKED
                              by WHICKED
                               
                              Started by zstheorist, 04-26-2024, 07:52 PM
                              1 response
                              13 views
                              0 likes
                              Last Post NinjaTrader_LuisH  
                              Started by Touch-Ups, 04-27-2024, 10:36 AM
                              2 responses
                              22 views
                              0 likes
                              Last Post Touch-Ups  
                              Working...
                              X