Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Update Color of Dot draw object

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

    Update Color of Dot draw object

    Hi
    In my script I can refer to a draw object with tag value Tag using the command
    DrawObjects[Tag] .

    This DrawObject is of type Dot.

    I want to update the AreaBrush of this object from the script how can I do it ?

    #2
    Hello doron, and thank you for your question.

    There is an example covering how to use DrawObjects to modify chart drawing tools in the help guide. I will provide a modified sample.



    Code:
    [FONT=Courier New] [COLOR=#008000]// Loops through the DrawObjects collection[/COLOR]
    [COLOR=#0000ff]foreach[/COLOR](IDrawingTooldraw[COLOR=#0000ff] in[/COLOR] DrawObjects)
    {
    [COLOR=#0000ff]    if[/COLOR](draw.IsGlobalDrawingTool && draw[COLOR=#0000ff] is [/COLOR]Dot)
        {
            DrawingTools.Dot myDot = draw [COLOR=#0000ff]as [/COLOR]DrawingTools.Dot;
            myDot.AreaBrush = Brushes.Black;
        }
    }[/FONT]
    Please let us know if there is any other way we can help.
    Last edited by NinjaTrader_JessicaP; 05-27-2016, 08:45 AM.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      hi

      if the definition

      DrawingTools.Dot myDot = draw as DrawingTools.Dot;

      will be added to the script - it works

      thx

      Comment


        #4
        Thank you, the provided code sample has been updated.
        Jessica P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        656 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        371 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        109 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X