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 helpwanted, Today, 03:06 AM
        1 response
        7 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        385 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X