• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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.
    Patrick H.NinjaTrader Customer Service

    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 Coursocied67, Today, 04:02 AM
        0 responses
        1 view
        0 likes
        Last Post Coursocied67  
        Started by TheGameOfProbabilities, 07-18-2019, 06:56 AM
        7 responses
        35 views
        0 likes
        Last Post DaveS
        by DaveS
         
        Started by scfnkysx, Today, 12:30 AM
        0 responses
        4 views
        0 likes
        Last Post scfnkysx  
        Started by jimloforkocv, Today, 12:16 AM
        0 responses
        4 views
        0 likes
        Last Post jimloforkocv  
        Started by claxxical, Yesterday, 10:00 PM
        0 responses
        8 views
        0 likes
        Last Post claxxical  
        Working...
        X