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

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
      Chris L.NinjaTrader Customer Service

      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.
          Chris L.NinjaTrader Customer Service

          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
                Chris L.NinjaTrader Customer Service

                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 algospoke, Yesterday, 06:40 PM
                  2 responses
                  20 views
                  0 likes
                  Last Post algospoke  
                  Started by ghoul, Today, 06:02 PM
                  3 responses
                  14 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by jeronymite, 04-12-2024, 04:26 PM
                  3 responses
                  45 views
                  0 likes
                  Last Post jeronymite  
                  Started by Barry Milan, Yesterday, 10:35 PM
                  7 responses
                  21 views
                  0 likes
                  Last Post NinjaTrader_Manfred  
                  Started by AttiM, 02-14-2024, 05:20 PM
                  10 responses
                  181 views
                  0 likes
                  Last Post jeronymite  
                  Working...
                  X