Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Reading background color?

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

    Reading background color?

    Hi,

    I'd like to know if it is possible to programaticly determine the "background" color of an indicator display (at the bottom of the screen under the price chart)? For example if something like this is possible:

    if(Indicator.BackColor == Green){do something;}

    Thanks in advance for any help.

    #2
    - an indicator has no "background" color
    - you can access the color of a plot e.g. by "Plots[0].Pen.Color"

    Comment


      #3
      Hi Burga1,

      You can paint the indicator panel a certain color though. Please take a look at these two links:
      BackColor
      BackColorAll
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Hi,

        Thanks for the replies...yes that's what I mean--if an indicator has had the command for "backcolor" executed to change the color...can this be subsequently "read" as per my example in my first post? I simply want to be able to program a strategy to "read" what the indicator backcolor is...

        Comment


          #5
          Yes, it can be accessed as per Josh's post below

          Comment


            #6
            Thank you, so you're saying that this:

            if(Indicator.BackColor == Green){do something;}

            is acceptable code?

            Comment


              #7
              No. Just do this:
              Code:
              if (BackColor == Color.Green)
                   // Do something
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Thanks for the reply. If I'm writing a strategy to access the backcolor within a seperate indicator, is that not possible? Would I have to write the code that sets the backcolor within the strategy then?

                Comment


                  #9
                  Not sure I follow, but maybe you could just expose a property from your indicator that contains values pertaining to the conditions you are searching for and then access those from the strategy.

                  Here is a reference sample for doing just that: http://www.ninjatrader-support.com/v...ead.php?t=4991
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    Thank you.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    633 views
                    0 likes
                    Last Post Geovanny Suaza  
                    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                    0 responses
                    364 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
                    567 views
                    1 like
                    Last Post Geovanny Suaza  
                    Started by RFrosty, 01-28-2026, 06:49 PM
                    0 responses
                    568 views
                    1 like
                    Last Post RFrosty
                    by RFrosty
                     
                    Working...
                    X