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

AddOn with data grid using instruments like the Market Analyzer

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

    AddOn with data grid using instruments like the Market Analyzer

    I'm attempting to develop an AddOn that combines features of the ControlCenter's Strategy tab and Market Analyzer.

    The attached example is based on an example from an earlier post to the forum.

    What I'm struggling with is how to get the instrument field to allow the user to change the instrument assigned to the row (like the Market Analyzer). It also needs a context menu to allow the user to right-click and add/remove a row and associated instrument like the Market Analyzer.

    A bit guidance on where to put things and what Ninja has available to assist with this would be greatly appreciated.
    Attached Files
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello daqu40,

    This sounds like an interesting project. ╭σ_ಠ

    I attempted to run what you have but I'm seeing I don't have a reference to Infragistics.Windows.Controls.

    Is this wpf from 15.1 or is this from the winforms version?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      I forgot this reference is needed: C:\Program Files (x86)\NinjaTrader 8\bin64\InfragisticsWPF4.v15.1.dll
      Last edited by NinjaTrader_Jim; 03-04-2020, 09:24 AM. Reason: Corrected additional reference to be included
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment


        #4
        Hello daqu40,

        That Microsoft documentation...
        Thanks for the guidance.

        I like the grid. I think this will need to register mouse clicks and then either set the visibility or complete remove/replace a label with a textbox.

        I've got an example on capturing mouse clicks.


        Then the Instrument.Get() with the textbox string should return the instrument (if its valid).
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thanks Chelsea!

          I'll try this out and update the code for everyone when I get it working.
          daqu40
          NinjaTrader Ecosystem Vendor - QTradez

          Comment


            #6
            Ok, tried this out and making some slow progress. I can trap the MouseClick events and I'm building the context menu additions I need.

            With the trap and VS debug I was able to drill into the grid enough to see what I need to access to try and get the instrument working correctly.

            I'll make a new post when I have something working.
            daqu40
            NinjaTrader Ecosystem Vendor - QTradez

            Comment


              #7
              Here's an update to the original post.

              This version now has context menus that will add and remove rows in the grid. I've also cleaned up a few other items to keep this as generic as possible.

              The instrument selection is now the part that needs work. I would like the Add Instrument Row on the context menu to open an Instrument selector just like the Market Analyzer does when adding a row.

              Any ideas/assistance is always appreciated.
              Attached Files
              daqu40
              NinjaTrader Ecosystem Vendor - QTradez

              Comment


                #8
                Hello daqu40,

                The instrument overlay selector would not be something you can call from an Addon script.

                This would have to be completely custom designed.

                Just thinking out loud maybe an opaque wpf object like another grid (that contains a text box and button) in the same cell of an outer grid (or same scope as the outer container) that has the visibility set on / off.
                Things that are in the same scope are by default layered on top of each other.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Now I'm seeing why I'm not seeing any signs of this being done before here on the forum.

                  So what makes this so different from the Market Analyzer where the context menu to add a row opens an instrument selector?

                  I can always resort to having the Add Instrument Row open a form that implements an instrument selector. That's a lot more work than I hoped for.

                  Thanks for your insight.
                  daqu40
                  NinjaTrader Ecosystem Vendor - QTradez

                  Comment


                    #10
                    Hello daqu40,

                    It's integrated with Data Series stuff which sets controls behinds the scenes for calling data and is a backend method.

                    Data Series are also not possible to have NinjaTrader construct and update in an addon.

                    And you can have an InstrumentSelector if you want. (It's just the overlay selector that wouldn't be available)
                    https://ninjatrader.com/support/help...ntselector.htm

                    You would just need to design your own overlay system and put an instrument selector in the middle of it...
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Thanks for the link on the InstrumentSelector. I'll get something to work so I can get the instruments on the grid and update this post then.
                      daqu40
                      NinjaTrader Ecosystem Vendor - QTradez

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Christopher_R, Today, 12:29 AM
                      0 responses
                      9 views
                      0 likes
                      Last Post Christopher_R  
                      Started by sidlercom80, 10-28-2023, 08:49 AM
                      166 responses
                      2,235 views
                      0 likes
                      Last Post sidlercom80  
                      Started by thread, Yesterday, 11:58 PM
                      0 responses
                      3 views
                      0 likes
                      Last Post thread
                      by thread
                       
                      Started by jclose, Yesterday, 09:37 PM
                      0 responses
                      8 views
                      0 likes
                      Last Post jclose
                      by jclose
                       
                      Started by WeyldFalcon, 08-07-2020, 06:13 AM
                      10 responses
                      1,415 views
                      0 likes
                      Last Post Traderontheroad  
                      Working...
                      X