Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart control bar colors

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

    Chart control bar colors

    In NT7 many indicators make use of the properties of ChartControl for various purposes.
    One purpose is to manipulate the colors of the bars on the chart

    For example to set the bars to be invisible:
    ChartControl.ChartStyle.DownColor = Color.Transparent;
    ChartControl.ChartStyle.UpColor = Color.Transparent;

    How does one set the bar colors to transparent in NT8?

    Later the script will want to set them back to the original color. In NT7 this was done in the Dispose() method. I assume State == State.Terminate would be the equiv in NT8?

    #2
    There is a new ChartBars class which has a properties object that you can obtain the chart style info from



    Code:
    ChartBars.Properties.ChartStyle.DownBrush = Brushes.Transparent;
    Originally posted by Brillo View Post
    Later the script will want to set them back to the original color. In NT7 this was done in the Dispose() method. I assume State == State.Terminate would be the equiv in NT8?
    Yes, State.Terminate would be where you want to clean up/restore settings.
    MatthewNinjaTrader Product Management

    Comment


      #3
      Great! This is working.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kevinenergy, 02-17-2023, 12:42 PM
      117 responses
      2,765 views
      1 like
      Last Post jculp
      by jculp
       
      Started by Mongo, Today, 11:05 AM
      5 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by SightCareAubetter, Today, 12:55 PM
      0 responses
      3 views
      0 likes
      Last Post SightCareAubetter  
      Started by traderqz, Today, 12:06 AM
      8 responses
      16 views
      0 likes
      Last Post traderqz  
      Started by SightCareAubetter, Today, 12:50 PM
      0 responses
      2 views
      0 likes
      Last Post SightCareAubetter  
      Working...
      X