Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart background color

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

    Chart background color

    Hi, i'm looking to set the chart background color that is typically set in the chart "Properties" screen in my program. But I want it set it to a custom color, not limited to the standard brush colors NT8 offers. I would also like to select the custom color in the indicator's parameter section. Any guidance or example on how this can be done is appreciated. thanks

    #2
    Hello pman777,

    Thank you for your note.

    You'd actually want to customize the skin you're using for the platform rather than use an indicator.

    That is actually easier than you may expect. In the xaml file for the Skin that you are using, you should find a list of defined brushes to be included in color-picker lists, near the bottom of the file, within the block <collections:ArrayList x:Key="customColorPickerList">.

    You should be able to add a Brush via xaml within that block, and then select the brush via any color picker list throughout NinjaTrader 8. You should be able to use this process for any supported brush type.

    Here's further information from our help guide regarding creating your own skins:

    https://ninjatrader.com/support/help...r_own_skin.htm

    Here's some example code one user utilized to add a custom color to the color picker list:

    Code:
    <collections:ArrayList x:Key="customColorPickerList">
            <LinearGradientBrush StartPoint="0.5, -0.05"
                                 EndPoint="0.5, 0.66"
                                 po:Freeze="true">
                <LinearGradientBrush.GradientStops>
                    <GradientStop Color="{StaticResource ButtonBackgroundStop1}"
                                  Offset="0" />
                    <GradientStop Color="{StaticResource ButtonBackgroundStop2}"
                                  Offset="1" />
                </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>
    <LinearGradientBrush StartPoint="0.5, -0.05"
                                 EndPoint="0.5, 0.66"
                                 po:Freeze="true">
                <LinearGradientBrush.GradientStops>
                    <GradientStop Color="#8f6849"
                                  Offset="0" />
                    <GradientStop Color="#8f6849"
                                  Offset="1" />
                </LinearGradientBrush.GradientStops>
            </LinearGradientBrush>
    
        </collections:ArrayList>
    Please let us know if we may be of further assistance to you.
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      thanks Kate, but I'm not looking to customize the platform skin, just the background color for a specific chart.

      Comment


        #4
        Hello pman777,

        ChartControl.Properties.ChartBackground would be the property for the chart background. Note that our Help Guide advises that ChartControl Properties are intended to be set by the user and are not guaranteed to be set from a script, so mileage may vary.

        ChartControl.Properties - https://ninjatrader.com/support/help...properties.htm

        As for creating a custom color, you could create a brush for your own color.

        Working with Brushes - https://ninjatrader.com/support/help...th_brushes.htm

        As for creating a property for your indicator, you could create a string property, or you could just add a regular Brush property and type the hex code for the brush directly into the brush picker. A New indicator Wizard can be used to generate the syntax for user defined strings and brushes.

        NinjaScript Wizards - https://ninjatrader.com/support/help.../ns_wizard.htm

        We look forward to assisting.
        JimNinjaTrader Customer Service

        Comment


          #5
          RE: your post about Custom Skin changes... have been into the Blueprint file of my SlateLight subdirectory,
          but only want to change two things, and can't readily determine which to change, as that file a bit complex:
          First, the common backgrounds of all the Control Window tabs. i.e., Log, Accounts, Positions, ...etc.
          Second, the upper chart border that holds the Navigation Bar.
          SlateLight skin too white, SlateDark too black. And would suggest a happier medium as future enhancement.
          Can you please tell which items I need to change for just these?
          thxs much, Will

          Comment


            #6
            Hello valhallafutures,

            Thank you for your reply.

            The background for the Control Center is WindowBottomGradientStopColor; however, this is tied to other places within the platform as well.

            The chart menu bar is controlled by BackgroundCaptionBar and BackgroundCaptionBarInactive.

            A trick that helps us to find skin items is having a program that can sample hex codes to pull hex codes out of the app and then we can search the skin files and filter down the hits based on the comments.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Kate W, thxs for these custom skin specs. Have chosen the Light Skin as the basis for Custom changes because of the need for a black font. But seems in this change, a critical little button icon arrow in the top right corner of each chart, with a hover label called "Scroll to Last Bar" has turned black with it, and because of chart backgrounds, is now lost visually. Is there a line item for just this icon arrow within the BluePrint file that does NOT change the NavBar items and dialogue box font back to white? thxs

              Comment


                #8
                Hello valhallafutures,

                Thank you for your reply.

                You can change the color of the Scroll to Last Bar arrow with ChartControl.AxisPen. However, this will also affect the color of the x and y axis as well, but would not affect the nav bar items or dialogue boxes.

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Kirk Thorns, Today, 05:34 PM
                0 responses
                4 views
                0 likes
                Last Post Kirk Thorns  
                Started by JobDjassem, Today, 05:24 PM
                0 responses
                9 views
                0 likes
                Last Post JobDjassem  
                Started by Kirk Thorns, Today, 05:06 PM
                0 responses
                10 views
                0 likes
                Last Post Kirk Thorns  
                Started by CyberNate, Today, 03:11 PM
                5 responses
                29 views
                0 likes
                Last Post CyberNate  
                Started by NinjaTrader_ChrisL, Today, 03:44 PM
                0 responses
                17 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Working...
                X