Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to have a drawing, such as a line, cycle through different colors?

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

    Is it possible to have a drawing, such as a line, cycle through different colors?

    Hi,

    Sometimes I don't realize where I am with my drawings, it doesn't happen too often but it happens enough. So I thought to myself, what if I could get a line to change colors every once and a touch so that I know which one is the most important for my style of trading.

    Is there a way to create a line drawing tool that slowly changes colors?

    Thank you

    Ben

    #2
    Hello gentlebenthebear,

    I wanted to clarify, are you asking this question for NT7 or NT8? In NT7 custom drawing objects were not supported. This type of task would be possible while using Nt8.

    Comment


      #3
      Yes, I am using NT8.

      Comment


        #4
        Hello gentlebenthebear,

        Thanks I will move the post to the nt8 sub forum.

        As a side note this could also be done from an indicators plot, a drawing tool would mainly only be needed if you wanted to manually draw the tool at certain mouse locations.

        To do this in NT8 as a drawing tool you would first need to make a drawing object and once your object is complete you can edit its OnRender code to change the color of what it is rendering.



        While using OnRender you create DXBrush objects which are the colors of the renderings. To have it shift colors every so often you would first need to decide on the rate you want to shift colors. Would that be once per bar or from some amount of seconds? Once you decide that logic could be made to set a variable to a specific color each time that amount of time elapses. The variable is then used as the dxbrush for the line or whatever drawing needs colored.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        566 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        329 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        547 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        548 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X