• 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

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.
        https://ninjatrader.com/support/foru...624#post792624

        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 corman, Today, 06:04 AM
                      0 responses
                      8 views
                      0 likes
                      Last Post corman
                      by corman
                       
                      Started by brunoviveiros, Today, 06:00 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post brunoviveiros  
                      Started by JAtrades, Today, 05:20 AM
                      4 responses
                      11 views
                      0 likes
                      Last Post JAtrades  
                      Started by pol133, Today, 02:35 AM
                      1 response
                      10 views
                      0 likes
                      Last Post NinjaTrader_Marco  
                      Started by timko, Today, 05:12 AM
                      1 response
                      7 views
                      0 likes
                      Last Post NinjaTrader_Marco  
                      Working...
                      X