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 Hwop38, 05-04-2026, 07:02 PM
        0 responses
        136 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        293 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        238 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        334 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        171 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X