Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I programmatically select an object?

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

    How do I programmatically select an object?

    How do I programmatically select an object?

    Code:
    foreach (DrawingTool draw in DrawObjects.ToList())
    {
       if (draw is NinjaTrader.NinjaScript.DrawingTools.RegionHighlightX))
       {
          NinjaTrader.NinjaScript.DrawingTools.RegionHighlightX reg = draw as NinjaTrader.NinjaScript.DrawingTools.RegionHighlightX;
          reg.IsSelected=true;
       }
    }
    The IsSelected property changes, but nothing happens on the chart

    #2
    Hello newbe17,

    Unfortunately, this would not be supported.

    "Warning: This property value is ONLY guaranteed to be settable by the object to which it belongs (e.g., from within a DrawingTool). Modifying its value from an external object (such as attempting to set a DrawingTool.IsSelected from an indicator) can result in the property automatically returning the value handled by its source. In other words, unless you are working with a chart object type directly (e.g., building a custom drawing tool), the IsSelected property should be considered read-only."



    I will submit a feature request on your behalf for the development team to consider allowing IsSelected to be set externally from a drawing object.
    Once I have a tracking ID for this request I will post in this thread for future reference.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello newbe17,

      This request is being tracked with ID# SFT-2001.

      As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

      Release Notes — https://ninjatrader.com/support/help...ease_notes.htm
      Chelsea B.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

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