Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I get the color of an indicator programatically

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

    How do I get the color of an indicator programatically

    basically what I want to do is to get the color of an indicator (single plot) and set its text to that same color.

    so that if I have WMA(20) and EMA(30) i can easily tell which is which by their colors of the text

    #2
    Hello Mike82,

    Thank you for your post.

    You may be able to achieve what you want with custom programming, and the following reference sample helps with some of the label formatting available. The DrawTextFixed() method provides an overload that allows font colors.

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      is there a way to remove the text that lists the indicators used from the chart?

      Comment


        #4
        Mike82,

        You have to remove this manually by Right Clicking > Indicators > and then clearing out the label field for selected indicator.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by mike82 View Post
          basically what I want to do is to get the color of an indicator (single plot) and set its text to that same color.

          so that if I have WMA(20) and EMA(30) i can easily tell which is which by their colors of the text
          To retrieve a Plot's color, try:
          Plots[#].Pen.Color

          Where # = the number of the Plot (starting at 0) that you Add in Initialize.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          598 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          103 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          555 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X