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 CarlTrading, 03-31-2026, 09:41 PM
                  1 response
                  83 views
                  1 like
                  Last Post NinjaTrader_ChelseaB  
                  Started by CarlTrading, 04-01-2026, 02:41 AM
                  0 responses
                  45 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CaptainJack, 03-31-2026, 11:44 PM
                  0 responses
                  65 views
                  2 likes
                  Last Post CaptainJack  
                  Started by CarlTrading, 03-30-2026, 11:51 AM
                  0 responses
                  68 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CarlTrading, 03-30-2026, 11:48 AM
                  0 responses
                  57 views
                  0 likes
                  Last Post CarlTrading  
                  Working...
                  X