Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8.002 How to Change ChartStyle Default Brush Colors?

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

    NT8.002 How to Change ChartStyle Default Brush Colors?

    In the (State == State.SetDefaults) area of a custom chart style file, I would like to define bar colors other than the ones that come as default.

    I have not been able to figure this out. The "Help" web site does not have this information yet.

    I need to be able to set default colors for the "UpBrush" and "DownBrush" colors.

    A simple example of code showing how this is done is all I need. Thanks.
    RJay
    NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

    #2
    Hello RJay,

    Thank you for your post.

    We are in the process of developing these examples and we will update when we have an example of a Chart Style that uses of colors that can be set other than Up and Down.

    Comment


      #3
      Hello,

      You can set the bar colors to any RGB value of your choice, within (State == State.SetDefaults), with the following code, replacing the specific RGB values with those of your choosing:

      Code:
      UpBrush	= new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(25, 235, 44));
      
      DownBrush = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(25, 175, 185));
      Dave I.NinjaTrader Product Management

      Comment


        #4
        Originally posted by NinjaTrader_Dave View Post
        Hello,

        You can set the bar colors to any RGB value of your choice, within (State == State.SetDefaults), with the following code, replacing the specific RGB values with those of your choosing:

        Code:
        UpBrush    = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(25, 235, 44));
        
        DownBrush = new System.Windows.Media.SolidColorBrush(System.Windows.Media.Color.FromRgb(25, 175, 185));

        Works like a charm. Thanks.
        RJay
        NinjaTrader Ecosystem Vendor - Innovative Trading Solutions

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Rapine Heihei, Today, 08:25 PM
        0 responses
        3 views
        0 likes
        Last Post Rapine Heihei  
        Started by Rapine Heihei, Today, 08:19 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by f.saeidi, Today, 08:01 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 07:51 PM
        0 responses
        6 views
        0 likes
        Last Post Rapine Heihei  
        Started by frslvr, 04-11-2024, 07:26 AM
        5 responses
        96 views
        1 like
        Last Post caryc123  
        Working...
        X