Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

draw."chart object" size change in code ?

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

    draw."chart object" size change in code ?

    feature 17863 introduces the ability to change a drawn chart object, once the object is drawn, from medium which seems to be the default to larger or smaller sizes...
    my specific code is:
    Draw.ArrowDown (this, @"PosTSI+DownBar" + CurrentBar, false, 1, High[1] + (TickSize * offset), Brushes.Magenta, true );

    i can't find in the current NinjaScript guide any hint that i can change the default draw size to Large within the code, nor do i see any additional inputs for any of the 6 possible forms of the Draw.ArrowDown command.

    is this possible ?

    #2
    Hello stafe,

    Thank you for your post.

    At this time, there is no documented way to change the default draw size of a drawing object through NinjaScript.

    If you would like, I can submit a feature request for this on your behalf.

    Comment


      #3
      that would be great, thanks

      Comment


        #4
        I will follow up with the tracking number once as soon as it's been created.

        Comment


          #5
          This is what the feature request was forever but was ignored in favor of this halfhearted attempt to appease users who always wanted the ninjascript version! This new feature is absolutely useless.
          eDanny
          NinjaTrader Ecosystem Vendor - Integrity Traders

          Comment


            #6
            Hello,

            While I haven't had any luck finding an undocumented way to directly access drawing size in NinjaScript, I wanted to update any users who may be reading this thread for an answer that a workaround at this time is to save a template for the drawing object with your desired size, then use the overload that allows you to specify a template for that object. Then it will be drawn with the size specified in your saved template.

            Comment


              #7
              Originally posted by NinjaTrader_Gaby View Post
              Hello,

              While I haven't had any luck finding an undocumented way to directly access drawing size in NinjaScript, I wanted to update any users who may be reading this thread for an answer that a workaround at this time is to save a template for the drawing object with your desired size, then use the overload that allows you to specify a template for that object. Then it will be drawn with the size specified in your saved template.
              Then the draw objects may be the wrong size for some other indicator. This should be fixed, should have been from the get go. It should work similar to the way you can specify the text font size in any indicator code, except on the fly with each Draw. call.
              Last edited by eDanny; 03-12-2025, 11:21 AM.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                Hello eDanny,

                I just wanted to follow up on this. Currently the built in drawing objects have not been modified to support more overloads with the chart marker size. As such you would have to reference the property directly using an instance. Here is an example:

                Code:
                ArrowDown arrow = Draw.ArrowDown(this, "test", true, 0, Close[0], Brushes.Red);
                arrow.Size = ChartMarkerSize.Medium;

                Comment


                  #9
                  Thanks Jesse, I didn't know this was possible before more overloads are added. I would be nice if eventually the size could be more granular, similar to font objects.
                  Last edited by eDanny; 03-21-2025, 12:14 PM.
                  eDanny
                  NinjaTrader Ecosystem Vendor - Integrity Traders

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  556 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  324 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
                  545 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  547 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X