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 Mindset, Today, 06:46 AM
        0 responses
        9 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, Yesterday, 05:21 PM
        0 responses
        14 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        15 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        82 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        48 views
        0 likes
        Last Post PaulMohn  
        Working...
        X