• 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.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

A custom window created by an indicator.

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

    A custom window created by an indicator.

    I am prototyping the above subject.
    Please find the word "PROBLEM" in the attached file.
    Thanks.
    Attached Files

    #2
    Thank you for your report YuriyGulyayev. I believe this is a special case with the way modal dialogs are being handled by NinjaTrader, which are currently being reviewed. In order to track this report correctly, I have submitted a feature request to the product management team for the following feature :
    This user wouldd like the Indicator Selector window to be made non-modal, to allow users to access other windows while this is open.
    I will follow up with more information as soon as it's available. If the feature requests already exists, a vote will be added to it.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      .

      Thank you for your response, Jessica.
      I did not actually mean to make such a request.
      What I am observing is that the new non-modal NTWindow essentially becomes the most modal one and the user must close it to make it possible to close the modal dialog.
      However this behavior is not happening when instead of NTWindow I use the base WPF Window class.

      Comment


        #4
        Thank you for this additional information. I tested your tool on my end. I was able to determine that as long as this is a Chart window, it will obey a set of rules common to other Chart windows (if you attempt to make other NTWindows than a chart window you will see that these are unaffected) that completely user defined WPF windows will not have to follow. As such, there is no way around the behavior you are reporting without making the NS Instrument Selector non-modal.

        This said, if simply documenting this fact, or any other solution, would work, please let us know. Our notes here in this thread will be made automatically available to the teams responsible for implementing features such as this.
        Last edited by NinjaTrader_JessicaP; 05-01-2017, 09:48 AM.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Let me add more clarity...
          If you open a few chart, press Ctrl+I to open the "Indicators" dialog, double-click my indicator, and click "Apply", a new NTWindow will show up. If you then try to close the "Indicators" dialog my clicking the [X] in its upper-right corner it will not work. You will have to close the NTWindow first.
          Now, if in my code you comment out "new NTWindow" and uncomment "new Window" and repeat the same steps you will be able to close the modal dialog without first closing the newly created WPF window. So something in NTWindow implementation causes this behavior.
          The window I am to develop is not going to be a chart window and simply documenting this behavior will not be very helpful. Perhaps I can work-around this by creating the new window only when the chart window gets activated, but I am trying to avoid that.

          Comment


            #6
            Thank you for clarifying the steps we should take to see the same thing on our end that you saw on yours. The steps you described are the steps I took earlier. The only way to resolve this query, because the NTWindow is being created inside of an indicator (and will thus be treated as a chart window) will be to change the modal behavior of the indicator selector screen. If changing the behavior of this screen so that your window can be closed without first closing the indicator selection screen is the desired behavior no further action will need to be taken on your account. With respect to the distinction between bugs and features, all modifications to NinjaTrader are prioritized based on user demand and customer impact whether they are classified as a bug or a feature. Please let us know if there are any other ways we can help.
            Jessica P.NinjaTrader Customer Service

            Comment


              #7
              "your window can be closed without first closing the indicator selection screen"

              That is already the case, even though my window is modeless. However the opposite is not currently possible in case my indicator creates an NTWindow, but possible when it does an instance of the Window class.

              Actually... I have found the problem...
              You guys have hidden the non-virtual Window.Show method. I've been calling the hidden one because the CustomWindow_ field is of type Window. I changed its call to ( (NTWindow) CustomWindow_ ).Show() and it now appears to work, meaning I can close the modal dialog first. But you guys probably still need to avoid hiding the non-virtual method.

              Comment


                #8
                I appreciate your patience. This behavior (non-virtual Window.Show being hidden and preventing the NinjaTrader modal dialogue window for Indicator selection from closing) was confirmed on our end. We will be investigating this further. Please keep an eye on the NinjaTrader 8 Release Notes page for updates and bugfixes.

                http://ninjatrader.com/support/helpG...ease_notes.htm

                Tracking ID: NTEIGHT-11622
                Attached Files
                Jessica P.NinjaTrader Customer Service

                Comment


                  #9
                  Thanks.
                  The following comment in your sample could be related to this:

                  //TODO: not sure why the .Show() isn't showing the closed window, so i'm recreating it

                  Comment


                    #10
                    You are correct. This sample my colleague put together was included in this ticket for our notes, so that other technicians would have some easy to read contextual information when reviewing this ticket and be brought up to speed quickly.
                    Jessica P.NinjaTrader Customer Service

                    Comment


                      #11
                      I have some feedback regarding this behavior. To track user demand for this change, the following feature request has been made :
                      This customer would like the default result of an NTWindow’s .Show() method to be placing the window below modal windows and on top of all other NinjaTrader windows
                      It has been given the tracking ID SFT-2290 .

                      In addition, the help guide has been modified as follows :
                      When displaying windows with the .Show() method, the default behavior is to place the window on top of all open windows, including modal windows. To disable this please call .Show() via

                      ( (NTWindow) MyCustomWindow_ ).Show()

                      Please let us know if there are any other ways we can help.
                      Jessica P.NinjaTrader Customer Service

                      Comment


                        #12
                        Hi, could you update the example from this post https://ninjatrader.com/support/foru...423#post787423 ?

                        Maybe something changed in NT8 and this code will not work in 8.0.21.0?

                        I import this example but see the only green button and when I click it - it happens nothing I want to create the window with settings for my indicator. But unfortunately, I couldn't run this example yet.
                        Handlar
                        NinjaTrader Ecosystem Vendor - Handlar

                        Comment


                          #13
                          Hello handlar,

                          I have a different example.
                          https://ninjatrader.com/support/foru...686#post492686

                          Tested and confirmed to work with 8.0.21.1.
                          https://drive.google.com/file/d/1QdP...w?usp=drivesdk
                          Last edited by NinjaTrader_ChelseaB; 03-26-2020, 07:05 AM.
                          Chelsea B.NinjaTrader Customer Service

                          Comment


                            #14
                            Thank you so much, ChelseaB! I'll try to move it to my indicator
                            Handlar
                            NinjaTrader Ecosystem Vendor - Handlar

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by WHICKED, Yesterday, 09:03 PM
                            1 response
                            14 views
                            0 likes
                            Last Post Emma1
                            by Emma1
                             
                            Started by oleotrim, Yesterday, 11:29 PM
                            1 response
                            9 views
                            0 likes
                            Last Post Emma1
                            by Emma1
                             
                            Started by Heavyweight_Prop, Yesterday, 09:06 PM
                            1 response
                            8 views
                            0 likes
                            Last Post NinjaTrader_EricB  
                            Started by saltminer, Yesterday, 05:49 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post saltminer  
                            Started by brunoviveiros, Yesterday, 05:32 PM
                            0 responses
                            6 views
                            0 likes
                            Last Post brunoviveiros  
                            Working...
                            X