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 funk10101, Today, 09:43 PM
        0 responses
        6 views
        0 likes
        Last Post funk10101  
        Started by pkefal, 04-11-2024, 07:39 AM
        11 responses
        37 views
        0 likes
        Last Post jeronymite  
        Started by bill2023, Yesterday, 08:51 AM
        8 responses
        44 views
        0 likes
        Last Post bill2023  
        Started by yertle, Today, 08:38 AM
        6 responses
        26 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by algospoke, Yesterday, 06:40 PM
        2 responses
        24 views
        0 likes
        Last Post algospoke  
        Working...
        X