• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


Windows dont refresh when display turns on

  • Filter
  • Time
  • Show
Clear All
new posts

    Windows dont refresh when display turns on

    When displays return from a power down state (power options), NT Chart windows are all black. The windows are functional in that the cross hair shows the scale values, but the chart remains black and requires a refresh.Focusing the window or clicking within the window refreshes the window. This is a real issue, as I have to go around and focus windows across multiple displays.

    NT is the only app that I have seen an issue with, so I think this is an NT specific issue.

    I suspect there is some windows event that NT should be responding to by forcing a refresh of all windows.

    This has been happening on all NT versions (including RC2) on Win7 64-bit.


    Thank you for contacting us to report the issue.

    So that I may investigate I would ask that you contact me by email at PlatformSupport [AT] NinjaTrader [DOT] com. In your message please include a link to this forum thread and a copy of today's trace files. You will find these diagnostic file in the Documents > NinjaTrader 8 > Trace folder. I will need to review a copy of the files which are named 'trace.20161009.XXXXX.txt'.
    Drew O.NinjaTrader Customer Service


      Originally posted by aslane View Post
      When displays return from a power down state (power options), NT Chart windows are all black.
      This has been happening on all NT versions (including RC2) on Win7 64-bit.
      I tested in Win7 pro 64 bit, I ran a market replay over 1 year worth and it finished.

      I shut down the computer in Hibernate mode.

      About 30 minutes later, I turned it back on. All my charts/tab have data up to the last candle. Nothing in blank.

      What else might be different that you are doing?

      *update - Issued a sleep and returned - everything is still there and not blank.
      Last edited by sledge; 10-09-2016, 09:05 PM.


        I sent the trace file requested.

        From the trace, I think the issue may be an unhandled exception coming back from a call into OnExecutionUpdate. It just happens to be happening overnight when the display is off. There is nothing logged in the Ninja Log.

        I will track down the exception here if in my code, but the exception should get caught/handled in the Ninja base code.
        Last edited by aslane; 10-10-2016, 07:23 AM.


          Ahhhh.. simple display turning on/off. I've never had an issue when running Playback-Market Replay when the screen auto turns off after 5 minutes on my laptops.

          So it sounds like even if your screen didn't turn off - the exception would happen eventually?


            Hello aslane, and thank you for your report.

            Please follow these steps to retrieve the reason NinjaTrader has most recently crashed from your Event Viewer. There are larger versions of each thumbnail image below.

            First, please open up your Control Panel. The Search box is in the upper right hand side. Please type "view event logs" into this box.

            Next, please click "View event logs" on the left

            Next, on the left side, drill down to Windows Logs -> Application. In the center, page down in the table (4) until you see "The program NinjaTrader.exe" in the lower box (5) . Once you see this, click the "Details" tab (6)

            Once here, please select the XML View radio button (7) . In the XML View (8), click in this window, press ctrl + a, observe all the text is now highlighted as it is in the picture, and press ctrl + c . Open up your favorite text editor (9) and press ctrl + v inside it. Observe the text is now inside your text editor. Save this file (10) as EventViewerLog.xml (11)

            IMPORTANT: If you see two or more similar errors next to each other, please send XML for all of these together
            Attached Files
            Last edited by NinjaTrader_JessicaP; 10-10-2016, 11:06 AM.
            Jessica P.NinjaTrader Customer Service


              Event log attached.
              Attached Files


                Thank you aslane. The log you attached is telling us that your copy of Nina is experiencing stack exhaustion. This means that the smaller amount of memory Windows set aside for running a NinjaTrader thread was overwhelmed. This can occur if custom NinjaScript code is designed so that a lot of data is stored in objects that do not survive function scope, just as a for instance.

                I would like to ask, are you running any custom NinjaScript files such as indicators or strategies? If you are, would it be possible to leave Ninja running in safe mode tonight, and for you to report if you see the same thing tomorrow morning?

                So we can further diagnose your system, please start NinjaTrader in Safe Mode.
                Safe Mode will prevent NinjaTrader from:
                • Loading workspaces.
                • Connecting on start-up.
                • Loading custom assemblies.
                • Getting instrument updates from the server.

                To enable safe mode, please use the following steps:
                • Exit NinjaTrader.
                • Hold the CONTROL key and double click the NinjaTrader icon.
                • Keep the CONTROL key held down until you see the Control Center.
                • You can verify you are in safe mode by going to Help -> About.

                Thank you for your report and for any information you can provide.
                Jessica P.NinjaTrader Customer Service


                  I will run in safe mode, but I do not think that that error log is the issue, as it is from several days earlier (10/7). I have seen scenarios where running an optimization causes memory to be exhausted and Ninja crashes or becomes unresponsive, and I think that log corresponds to one of those cases. I have never been able to reproduce that though, as running the same optimization after restarting works correctly.

                  When I came back to write this reply, I had one chart that remained black until I focused the window. There were no log msgs in Ninja log, no new entries in the trace file, and no new events in the event log. The chart is fairly trivial with a single symbol and trivial indicator with IsSuspendedWhileInactive = false.


                    Thank you aslane, I look foward to assisting further.
                    Jessica P.NinjaTrader Customer Service


                      I ran in safe mode with a couple of generic charts, and saw no issue. I ran the same scenario in normal mode and also saw no issue.

                      Will try to narrow down the root cause and post back.


                        Thank you aslane.

                        It sounds then like we have narrowed down what occurred to something running in one of your charts. We would be happy to help investigate on our end as well. If it would be possible to receive any indicator or strategy C# (.cs) or library (.dll) files on your system that you are using on your charts, this information would help us see the same thing on our end that you are seeing on yours. These would be in your (My) Documents\NinjaTrader 8\bin\Custom folder, and its subfolders.

                        I would like to ask you to e-mail any information you believe may help us investigate what occurred on your system to platformsupport[at]ninjatrader[dot]com , referencing 1585280 and attn:ninjatrader_jessicap in the subject line of your e-mail.
                        Jessica P.NinjaTrader Customer Service


                          Ok, I think we are back to my original premise that you are not responding to the system wide power events. After a lot of narrowing down, here is the scenario:

                          * run rc2 in safe mode
                          * several chart windows with NO indicators/strats
                          * another window like the ninjascript editor
                          * the Ninja windows should not be focused (some other app is active and chart windows partially behind something else)
                          * displays turn off due to power options
                          * displays turn back on (move mouse / hit shift key)

                          At this point, if there are no data updates for the symbols, then the charts will remain black until NT is focused. The crosshair will continue to work showing the scale values if you move the mouse across the chart without focusing, but the chart will remain black.

                          If the chart symbol is getting data updates, the first update will refresh the window. This is easy to see by running the above scenario with the connection disconnected. If the data connection is connected, then you will also see this behavior before the market opens.

                          I believe the issue is that NT needs to monitor and react to the system level power events. When you detect that a monitor has been turned back on, you need to refresh all windows.

                          I am not a WPF expert, but the following threads may offer some insight:


                          I also am attaching the simple workspace that I was using.
                          Attached Files


                            Thank you aslane. I think there is only one potential point of difference between our systems that we have not yet taken into account. I am using Windows 10 for testing, could you provide me with a set of instructions for setting up my windows power settings like yours? I just want to make sure I understand what is meant by blanking your monitor. Ideally I would like my monitor to blank the same way yours is blanking within 1 minute. I should mention that the way I am currently doing so, my workstation ends up locked, so that I have to enter a password to get back in.

                            I would also like to ask, are you able to get the same thing to happen on your system by pressing the windows key to the left of your space bar, and the letter L, at the same time?
                            Jessica P.NinjaTrader Customer Service


                              I only use Win7, but I assume it is similar for Win10.

                              I have my screen saver set up to blank the screen after some time with no password (do not see issue from this state, but just mentioning how I have set up).

                              In the power options, I set up the display to turn off after a time slightly longer than the screen saver, again no password or locking, just turn off the display.

                              Normally, these times are reasonably long so it only turns off if I am not here. For the testing though I have it turning off fairly quickly. I do not lock the computer, as that could be a bad deal when trading.

                              I suspect the reason this is happening, is that WPF is going to cache the display state of the window, which is black when the monitor turns off. When the display turns back on, the window is still black until NT does something to refresh the window (data or a focus event).


                              Latest Posts


                              Topics Statistics Last Post
                              Started by RickB60, Today, 01:55 PM
                              1 response
                              Last Post NinjaTrader_PaulH  
                              Started by filopearson, Today, 01:18 PM
                              6 responses
                              Last Post NinjaTrader_Jesse  
                              Started by kujista, Today, 12:28 PM
                              3 responses
                              Last Post NinjaTrader_ChelseaB  
                              Started by mroberts_nos, Today, 11:47 AM
                              1 response
                              Last Post NinjaTrader_Jesse  
                              Started by ronaldgreene828, Today, 11:20 AM
                              1 response
                              Last Post NinjaTrader_Jesse