Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

drawing tool color

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

    drawing tool color

    Hello Gaby,
    I have a related question.
    I have a vendor indicator that created their own drawing tool type.
    I would like to get as much info as I can about the object. Especially the color.
    I can access the tag.
    How can I find the color?

    #2
    Hello saturntd,

    Thank you for your post.

    I have moved your post into it's own thread since it was unrelated to the previous thread.

    If you need a specific property from a specific type of object you would need to cast to that object in your script and then you could access the specific property, such as the TextBrush property of a Text drawing object by using something like myDrawText.TextBrush.

    For example, if the drawing object was a Text object:

    Code:
    foreach (DrawingTool draw in DrawObjects.ToList())
    {
    if (draw is DrawingTools.Text)
    {
    DrawingTools.Text myDrawText = draw as DrawingTools.Text;
    
    Print("Text object: " + myDrawText.Tag + " TextBrush: " + myDrawText.TextBrush);
    }
    }


    If the script is creating their own custom drawing object, you would need to know what kind type of drawing object they have created so you could cast to that object in the script.

    See the 'Looping through the collection to find specific draw objects' section of this help guide page for more sample code: https://ninjatrader.com/support/help...rawobjects.htm

    Please let me know if you have any further questions.

    Comment


      #3
      Thanks for the help Gaby, I'll try that.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      599 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      344 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      103 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      558 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      557 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X