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 sjsj2732, Today, 04:31 AM
        0 responses
        22 views
        0 likes
        Last Post sjsj2732  
        Started by NullPointStrategies, 03-13-2026, 05:17 AM
        0 responses
        280 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        279 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        130 views
        1 like
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        90 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Working...
        X