Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

    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.

          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.

              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 yertle, Today, 08:38 AM
                        3 responses
                        10 views
                        0 likes
                        Last Post NinjaTrader_BrandonH  
                        Started by NinjaTrader_ChelseaB, 01-08-2017, 06:59 PM
                        80 responses
                        19,667 views
                        5 likes
                        Last Post NinjaTrader_ChelseaB  
                        Started by adeelshahzad, Today, 03:54 AM
                        2 responses
                        16 views
                        0 likes
                        Last Post adeelshahzad  
                        Started by dappa, Today, 09:18 AM
                        1 response
                        6 views
                        0 likes
                        Last Post NinjaTrader_ChelseaB  
                        Started by bill2023, Yesterday, 08:51 AM
                        5 responses
                        27 views
                        0 likes
                        Last Post bltdavid  
                        Working...
                        X