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 wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        26 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, Yesterday, 09:53 PM
        2 responses
        49 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        191 views
        0 likes
        Last Post Hasadafa  
        Started by GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,230 views
        0 likes
        Last Post xiinteractive  
        Working...
        X