• 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

Improvements in superdom

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

    Improvements in superdom

    Hi Ninjas.

    I want to implement improvements in superdom.
    These are my doubts:
    1 - Is it possible to add buttons inside the superdom window? (These buttons are not to send order, are to change the time frame and colors, etc.)
    2 - Is it possible to add drawings (objects) on top of the superdom or in the superdom window? These drawings would change position and colors according to logic to visually alert the user.
    3 - Can I turn the rows of a column into buttons?

    Thanks a lot for any help

    #2
    Hello Frasson,

    Thank you for your post.

    The functionality you wish to implement would likely be better suited as it's own Add On window.
    1. This would require finding the parent ID and then the grid of to add the buttons. You can use Inspect.exe from within Microsoft Windows. And the window class is NinjaTrader.Gui.SuperDom.SuperDom, I would recommend seeing what you can do from here.
    2. For rendering in the SuperDOM columns you can look at the following link: http://ninjatrader.com/support/helpG...n_onrender.htm
      However, this would not be detailed towards drawing on the window.
    3. I would just create a new Add On here. While it is possible it would likely involve far more code and time than just creating your own Add On for these functions.


    Please let me know if you have any questions.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick and efficient response.

      Comment


        #4
        SuperDom Buttons

        Hi Patrick - I need help

        About what you told me in item 1:
        1 - This would require finding the parent ID and then the grid of to add the buttons. You can use Inspect.exe from within Microsoft Windows. And the window class is NinjaTrader.Gui.SuperDom.SuperDom, I would recommend seeing what you can do from here.
        Well ... I used Inspect.exe I identified this on SuperDom NT8:

        AutomationId: "SuperDOMControl"
        ClassName: "SuperDomControl"

        And wrote the code as follows:

        System.Windows.Controls.Grid superdomGrid = (Window.GetWindow(NinjaTrader.Gui.SuperDom.SuperDo m).FindFirst("SuperDOMControl") as SuperDomControl).Content as System.Windows.Controls.Grid;

        I wrote as I saw this .cs posted => http://ninjatrader.com/support/forum...ad.php?t=79601

        But it did not work, I can not access PARENT as in the ChartTrader example

        chartTraderGrid = (Window.GetWindow(ChartControl.Parent).FindFirst(" ChartWindowChartTraderControl") as ChartTrader).Content as System.Windows.Controls.Grid;

        I would like to know if you know what's wrong?

        My need is to put some buttons on the superdom, but not necessarily inside the window. In fact I would be happy if I could put the buttons in the title bar as shown in the attached image.

        So I'm looking forward to your guidance.

        In additional ....
        Researching more about the subject I found this post that would also be perfect for me (insert in superdom). http://ninjatrader.com/support/forum...754#post474754

        In the example of the link the code uses this line to access the menu (title bar):
        Code:
        			chartWindow = Window.GetWindow(ChartControl.Parent) as Chart;
        
        			chartWindow.MainTabControl.SelectionChanged += MySelectionChangedHandler;
        
        			foreach (DependencyObject item in chartWindow.MainMenu)
        				if (AutomationProperties.GetAutomationId(item) == "topMenuItem1")
        I tried this line but it did not work
        SuperDom superdomWindow = Window.GetWindow(SuperDomControl.Parent) as SuperDom;

        Whats is wrong?

        Thanks
        Attached Files
        Last edited by Frasson; 08-20-2017, 03:40 PM.

        Comment


          #5
          Hello Frasson,

          Thank you for your response.

          As mentioned, this is better suited as it's own Add On window rather than to try to alter the SuperDOM window itself.

          Please let me know if you have any questions.
          Patrick H.NinjaTrader Customer Service

          Comment


            #6
            Hi Patrick

            I understand that you recommended build a addon, but I need to use the superdom window as changes to the chart window, very simple.
            I just need to know what object to access, because for the chart if you use this:

            "chartWindow = Window.GetWindow (ChartControl.Parent) as Chart;"

            And I just want to know how do this:

            "superdomWindow = Window.GetWindow (?????) as SuperDom;"

            Let me know If you do not know or the superdom window is blocked.

            Thanks

            Comment


              #7
              Hello Frasson,

              Thank you for your response.

              SuperDom is the parent, there is nothing outside of it. For the charts it is different due to working inside a specific area or child of the Chart.

              Please let me know if you have any questions.
              Patrick H.NinjaTrader Customer Service

              Comment


                #8
                Hi Patrick, thanks for response.

                Weel... I was able to implement the button on the superdom through an ADDON. The name of my ADDON is "SuperDomBotoes".

                Now I want to know how I call ADDON ("SuperDomBotoes") inside the SuperDomColumns code. Can you help me?

                Thanks.

                Comment


                  #9
                  Hello Frasson,

                  I am going to look into this and get back to you.

                  Thank you for your patience.
                  Alan P.NinjaTrader Customer Service

                  Comment


                    #10
                    Hello Alan, thanks for the reply.
                    Another way I can do it is to call the superdom inside ADDON, I already did it. But I'm not able to add the custom column (any also) via code.
                    If you know how, this way I could also solve my problem.
                    The code I use to call susperdom inside ADDON is:
                    Code:
                    Core.Globals.RandomDispatcher.BeginInvoke(new Action(() => new SuperDom().Show()));
                    thanks

                    Comment


                      #11
                      Hello Frasson,

                      Attached is an Addon which adds 2 buttons to the bottom of the superdom.

                      Please let us know if you have any questions.
                      Attached Files
                      Alan P.NinjaTrader Customer Service

                      Comment


                        #12
                        Great work Alan, thanks for the example.
                        Best suport
                        Thanks

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Parmenides48, 04-09-2019, 03:32 AM
                        8 responses
                        43 views
                        0 likes
                        Last Post brucerobinson  
                        Started by NinjaCustomer, Today, 01:48 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post NinjaCustomer  
                        Started by aligator, Yesterday, 10:11 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post aligator  
                        Started by psquare, Yesterday, 03:11 PM
                        4 responses
                        20 views
                        0 likes
                        Last Post psquare
                        by psquare
                         
                        Started by ballboy11, Yesterday, 03:20 PM
                        1 response
                        12 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Working...
                        X