Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

DrawingObject quick template change in context menu

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

    DrawingObject quick template change in context menu

    How do I change the template of the current selected drawing tool in an indicator? I can't assign to the .Template property because it's read only. However when I go to the Properties of the selected drawing tool, then click template, load and select a template I can change it there with manual mouse clicks. Thx!
    Click image for larger version

Name:	image.png
Views:	139
Size:	173.0 KB
ID:	1330503

    #2
    Hello habibalex,

    A new drawing object can be generated using a template.

    Once the object exists a template can no longer be used to generate the object.

    You would need to either remove the object and generate a new object using a different template, or modify specific properties of the object.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea, thx for the quick response. Which option does NT8 do it when a user manually changes a template? Also, I'm currently doing this via an indicator. Is there a way to add this w/o creating an indicator to include in each chart?

      Comment


        #4
        Hello habibalex,

        From my understanding a new drawing object is cloned and the template applied.

        The equivalent in your script would be removing the object and calling the draw method again with a different template name.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Great thanks, and is there a way you recommend I can add this to all charts without having to add the indicator to every window?

          Comment


            #6
            Hello habibalex,

            Unfortunately no, there is not any supported code to propagate changes to global drawing objects on other charts.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              This drawing tool package has the quick template menu-add on

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
              0 responses
              574 views
              0 likes
              Last Post Geovanny Suaza  
              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
              0 responses
              332 views
              1 like
              Last Post Geovanny Suaza  
              Started by Mindset, 02-09-2026, 11:44 AM
              0 responses
              101 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
              0 responses
              553 views
              1 like
              Last Post Geovanny Suaza  
              Started by RFrosty, 01-28-2026, 06:49 PM
              0 responses
              551 views
              1 like
              Last Post RFrosty
              by RFrosty
               
              Working...
              X