Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Current Select drawing object

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

    Current Select drawing object

    Hello,
    I've created an indicator using the fantastic toolbar addin from the WFP thread
    https://ninjatrader.com/support/foru...10#post1124507
    The indicator has a drop down menu of colors that I want to click on to change the color of the last selected drawing.
    I have searched everywhere to try and find out how to know what the "current selected" object? Once I have that, then I can change the properties of that object via the button.

    Is there any code that checks what drawing object is selected?

    Hope this makes sense?
    Last edited by rcrook23; 08-04-2021, 06:12 AM.

    #2
    Just realized this should be under NinjaTrader 8 not 7, possible to move it there?

    Comment


      #3
      Hi rcrook, thanks for posting.

      The click method for the WPF sample script lets you update the selection:
      protected void NTBarMenu_Click(object sender, RoutedEventArgs eventArgs)

      In that method you can check if SubItem1 or SubItem2 was selected.

      Kind regards,
      -ChrisL

      Comment


        #4
        Thanks Chris,
        But how does the NTBarMenu_Click know what drawing object to change? The NTBarMenu_Click works on changing the color of the Print massage bottom left but how can I find the current selected drawing object and then click the menu item to change the drawing properties? I know each drawing object has a unique tag, can this be found on the selected item or is there another property of selected item?

        Hope this makes sense? I'm happy to upload the indicator?

        Comment


          #5
          Hi rcrook23, thanks for your reply.

          NinjaTrader 7 does not use WPF technology, it uses WinForms. Could you upload a reduced sample that demonstrates the issue you are seeing?

          I look forward to hearing from you.

          Comment


            #6
            This is for NinjaTrader8

            Comment


              #7
              hi, I found an indicator that does a FindSelectedDrawObject, so I can now get the selected object. For anyone's ref I have attached.


              Attached Files

              Comment


                #8
                Hi rcrook, sorry, I misread post #2. I'm glad you were able to find a script that resolves.

                Best regards,
                -ChrisL

                Comment


                  #9
                  Originally posted by rcrook23 View Post
                  Hello,
                  I've created an indicator using the fantastic toolbar addin from the WFP thread
                  https://ninjatrader.com/support/foru...10#post1124507
                  The indicator has a drop down menu of colors that I want to click on to change the color of the last selected drawing.
                  I have searched everywhere to try and find out how to know what the "current selected" object? Once I have that, then I can change the properties of that object via the button.

                  Is there any code that checks what drawing object is selected?

                  Hope this makes sense?
                  Hi rcrook23 , a dropdown or straight away a coloredbutton that can change the color of a selector drawing object in de chart is exactly what I'm looking for. Did you find any example or could you share how you did this.? Thank you!
                  Attached Files

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  602 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  347 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  559 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  558 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X