Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Size change for Draw object

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

    Size change for Draw object

    I want to know how to configre draw object size.
    I have below Draw.Diamond object when if condition is met. but diamond is too big and need to make this smaller. Any way to make size configurable?

    Code:
    /
    if  (Close[1] > Close[0]) //example
    
    {
    
    Draw.Diamond(this, @"VnTnD Diamond_1"+ CurrentBar, false, 0, (Low[0] + (-3 * TickSize)) , Brushes.Red);
    }
    ​
    I have attempted to change be updating property, but did not work even I change size in indicator setting window.

    Property region

    Code:
    [NinjaScriptProperty]
    [Display(Name = "Diamond Marker Color 6b", Order = 9, GroupName = "Marker Settings")]
    public System.Windows.Media.Brush DiamondMarkerColor6b { get; set; }
    
    [NinjaScriptProperty]
    [Range(1, int.MaxValue)]
    [Display(Name = "Diamond Marker Size", Order = 10, GroupName = "Marker Settings")]
    public int DiamondMarkerSize { get; set; }

    #2
    Hello Marble,

    Unfortunately, Diamond, Dot, ArrowUp/ArrowDown, cannot be resized.

    However, there is a drawing tool script on the forum that renders resizable shapes you may find helpful.
    These are duplicate chart markers to what comes with the platform except you can change the size of them. The existing chart markers will remain as well. This will allow you to create custom sized chart markers that you can create and save as default so that you can draw the markers as needed to […]
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi Chelsea,
      I have checked the tool. I understood this tool can change the diamond when adding manually.
      Is there any way to include this tool feature when plotting diamond?
      Draw.Diamond to function as Draw.DiamondP if indicator is preloaded to chart.
      Marble

      Comment


        #4
        Hello Marble,

        You are asking how to call a diamond from this addon from a NinjaScript indicator?

        There is a note on the downloads page:
        "To access the NS methods, please use for example DrawPlus.Dotp(... DrawPlus.ArrowUpp(. the intelliprompt will reveal the complete method overload signature available which are almost the same as the standard chart markers except for the DrawobjectSize and OutlineBrush."

        For a Diamond it would be
        Draw.Diamondp(NinjaScriptBase owner, string tag, bool isAutoScale, int barsAgo, double y, bool isGlobal, string templateName))
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you. Managed to change thte size by calling the indicaot suggested.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          607 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          353 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X