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

How to access the SuperDOM trade control on the left

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

    How to access the SuperDOM trade control on the left

    Hi,

    I want to add custom buttons and other controls to the SuperDOM similar to this sample add-on:

    https://ninjatrader.com/support/foru...d=9&linkid=945

    but instead of placing the new controls at the bottom of the ladder grid I would like to access the "trade control on the left" or its container. [See attached pic.]
    If anyone knows what the name or automationID of that "control on the left" object or how to find it.

    I wish NT would expose the xaml of the entire SuperDOM. There is nothing secret about that. The secret is in the compiled business logic. If add-on development is encouraged the platform gets enriched.

    Thanks
    Attached Files

    #2
    Hello,

    Thank you for the post.

    In this case, the sample you linked would be what I would suggest reviewing to answer this question. Instead of using RowDefinitions you would need to change the sample to loop through the ColumnDefinitions and append a Column.

    As the sample currently works, it loops to locate a specific control and then appends a row definition there. This would be the same concept with Columns, you would just need to append a Column instead. Outside of that change, there is not much else needed to place the buttons differently, the sample shows how to create and apply the buttons just the placement changes.

    You can also see the following post which has some examples of using Columns instead of Rows: https://ninjatrader.com/support/foru...327#post499327

    If using the Row or Column definitions is not clear, I would suggest reviewing some WPF/Xaml specific examples of utilizing ColumnDefinitions or RowDefinitions outside of NinjaTrader as this is not a NinjaTrader specific concept.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Jesse,

      There are several layout containers in WPF. It could be a StackPanel. Assuming it is a Grid, there are several ways to lay out that grid too. I don't think I need to add a new column. Maybe for each button a new row to a child grid inside the first column of the top grid.

      A little hint would not hurt to save a lot of trial and error recompiling blindly and restarting the platform. I think the definitions of these trading controls when on the left are:

      --grid 0, column 0
      -------child grid 0, single column 0, look to add new last row to child grid 0?

      Please help
      Thanks
      Last edited by xcondor; 03-28-2018, 05:06 PM.

      Comment


        #4
        I printed out the the visual tree in the NinjaScript Output and have a lot better idea of the SuperDOM UI. I am new to WPF.

        Also, NinjaScript does not natively support freehand helper utilities unless the code is pigeonholed into the few canned script classes, so I had to compile the code for the visual tree in Visual Studio and import the dll and reference to it in the bin/Custom folder.

        I will post the full code shortly so other newbies get a little easier learning curve with addons.

        Comment


          #5
          Hello,

          Thank you for the reply.

          In this situation, I wouldn't have any more information than you do with respect to locating where to place new elements as the source code is not available for review. This would be a subject where exploration is necessary.

          In general with any GUI modifications in NinjaTrader, using the visual tree to search for where you want to place elements will be part of the development process. You can try using other tools such as Microsofts "Inspect" to get an idea of how the window is laid out. This type of development really is not in the scope that we can support but I had posted about using Inspect previously: https://ww.ninjatrader.com/support/f...44&postcount=7

          This is a topic where having prior WPF/Xaml development experience will likely be required as you are working with the Platforms existing windows. Using a combination of tools like Inspect, prior knowledge or even an external WPF application in Visual Studio can help determine how to modify the NinjaTrader GUI. Using an external project can help in learning how WPF/Xaml windows are composed, the inspect tool is also good for displaying the hierarchy.

          I am not certain I understand your most recent post's comment, but if you have some sample that can help the community in some way you are free to post that.


          Please let me know if I may be of additional assistance.
          JesseNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by TraderBCL, Today, 04:38 AM
          2 responses
          16 views
          0 likes
          Last Post TraderBCL  
          Started by martin70, 03-24-2023, 04:58 AM
          14 responses
          106 views
          0 likes
          Last Post martin70  
          Started by Radano, 06-10-2021, 01:40 AM
          19 responses
          609 views
          0 likes
          Last Post Radano
          by Radano
           
          Started by KenneGaray, Today, 03:48 AM
          0 responses
          5 views
          0 likes
          Last Post KenneGaray  
          Started by thanajo, 05-04-2021, 02:11 AM
          4 responses
          471 views
          0 likes
          Last Post tradingnasdaqprueba  
          Working...
          X