Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to make indicator display simple colored status

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

    How to make indicator display simple colored status

    Hi, I just made my first indicator, which I want to display a red or green bar, according to a simple condition.

    I managed to make it display a red or green block, but I would like it to look like the example with the black background.

    How do I do it? Does anybody have an example?

    Thanks

    Christian
    Attached Files

    #2
    Hi Christian,

    Thanks for the post and welcome to the NinjaTrader forums. For a black background, this can be set through the chart's Right Click > Properties screen.

    If you want to set programatically, you can use:

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan,

      sorry if I wasn't clear enough - the black background was not the problem. I would like to get the indicator to post these narrow horizontal color bands seen in the example with the black background.

      Comment


        #4
        It looks like it is conditionally changing background color. You can do that with the properties linked earlier.

        if (Close[0] > Open[0])
        BackColor = Color.Green;

        else
        BackColor = Color.Purple
        Attached Files
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          That makes sense, I didn't think of that.

          Thank you

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          606 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          353 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          560 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          561 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X