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 hazylizard, Today, 08:38 AM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        2 responses
        16 views
        0 likes
        Last Post geddyisodin  
        Started by Max238, Today, 01:28 AM
        5 responses
        44 views
        0 likes
        Last Post Max238
        by Max238
         
        Started by giulyko00, Yesterday, 12:03 PM
        3 responses
        13 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by habeebft, Today, 07:27 AM
        1 response
        16 views
        0 likes
        Last Post NinjaTrader_ChristopherS  
        Working...
        X