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:	156
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 CarlTrading, 03-31-2026, 09:41 PM
              1 response
              153 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              89 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              133 views
              2 likes
              Last Post CaptainJack  
              Started by CarlTrading, 03-30-2026, 11:51 AM
              0 responses
              128 views
              1 like
              Last Post CarlTrading  
              Started by CarlTrading, 03-30-2026, 11:48 AM
              0 responses
              107 views
              0 likes
              Last Post CarlTrading  
              Working...
              X