Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to get the color of the chart background

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

    How to get the color of the chart background

    I need to find the brush color of the chart background; how can I get it inside an indicator?

    #2
    Hello afshinmoshrefi, and thank you for your question. This is available through the ChartControl.Background object. To turn this into a Color you may use

    Code:
    Color c = (ChartControl.Background as SolidColorBrush).Color;
    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Thanks Jessica,
      I need to assign the background color to a brush for an indicator Plot.
      How can I get a valid brush that is the background brush?

      Comment


        #4
        ChartControl.Properties.ChartBackground

        Comment


          #5
          tradesmart is correct. You can learn more about this and other ChartControl properties here,

          Jessica P.NinjaTrader Customer Service

          Comment


            #6
            When I try this brush, the indicator compiles but then disappears from the list of indicators. Seems there is possibly a compile error that doesn't get reported to the UI. I emailed the indicator to Jessica to look at.

            Comment


              #7
              ChartControl.Properties must be accessed at the State.DataLoaded state or later. I am attaching a working code sample that sets a plot to the background color. Please let us know if there are any other ways we can help.
              Attached Files
              Jessica P.NinjaTrader Customer Service

              Comment


                #8
                Colour #74987B would like to make as 'GradientBrush'

                Hello.
                I trade WoodiesCCI. For a background chart his native colour #74987B would like to make as 'GradientBrush' in a skin Slate Light.
                In this theme the way was shown:

                Would like as in this theme have made with colour of coffee, only now for colours #74987B.
                Programming I do not own.
                The file BluePrint has applied on the message.

                Thanks.
                Last edited by Muratello; 03-13-2017, 06:44 PM.

                Comment


                  #9
                  Thank you for your question, Muratello. The best place to start when creating a new skin for NinjaTrader is this page,



                  We are happy to help with any questions that come up.
                  Jessica P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  636 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  366 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  107 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  568 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  571 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X