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 helpwanted, Today, 03:06 AM
        1 response
        16 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        6 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        387 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X