Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bar coloring from under the second data series

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

    Bar coloring from under the second data series

    Bar coloring from under the second data series

    How can I color bar from under the additional data series?

    This is what I use for the Plot - it works fine

    Code:
     protected override void OnBarUpdate()
    {
    
    if (BarsInProgress == 1)
    {
    if (LOGIC)
    {
    Price1 = High[0];
    Price2 = Low[0];
    
    
    }
    }
    
    if (BarsInProgress == 0)
    {
    Values[0][1] = Price1;
    Values[1][1] = Price2;
    
    // COLOR BAR FROM BarsInProgress == 1 ???
    }
    }

    If something like that for filling the bar?

    #2
    Hello memonolog,

    Thanks for your post.

    You can use BarBrush to set the current bar of the primary series of the chart to a particular color.

    You can use BarBrushes[] to set a bars ago of the primary series of the chart to a particular color.

    You would not be able to change a second data series on the chart.

    References:
    https://ninjatrader.com/support/help.../?barbrush.htm
    https://ninjatrader.com/support/help...barbrushes.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_PaulH View Post
      Hello memonolog,

      Thanks for your post.

      You can use BarBrush to set the current bar of the primary series of the chart to a particular color.

      You can use BarBrushes[] to set a bars ago of the primary series of the chart to a particular color.

      You would not be able to change a second data series on the chart.

      References:
      https://ninjatrader.com/support/help.../?barbrush.htm
      https://ninjatrader.com/support/help...barbrushes.htm
      What is the correct syntax? exactly for the second date of the series

      BarBrushes[1][1]= Brushes.Blue; ???

      Comment


        #4
        Hello memonolog,

        Thanks for your reply.

        The correct syntax is shown in the help guide links. You cannot use [ ] [ ].

        Can you clarify what you are trying to do as it is not clear to me.

        Are you trying to color a second data series on chart? If so that cannot be done.

        If you are trying to color the primary series of the chart from the conditions based on an added data series? That can be done but would be best done in BarsInProgress 0
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by fernlicht, Today, 02:38 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by b16_aln, Today, 01:48 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by james272, Yesterday, 10:50 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Marco  
        Started by vaz21102, Yesterday, 09:22 PM
        2 responses
        10 views
        0 likes
        Last Post vaz21102  
        Started by keepsimple, 08-17-2017, 09:18 AM
        6 responses
        1,350 views
        1 like
        Last Post gubbar924  
        Working...
        X