Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Coloring a bar 3 bars back

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

    Coloring a bar 3 bars back

    I would like to develop an indicator that looks for lower highs and lower lows around a bar before it changes that bar to a certain color.

    The problem is that I need at least two bars to plot after the bar I am trying to color before I know if the pattern came true and I need to color the bar which occured 3 bars ago.

    Barcolor will not allow me to paint a bar that has already plotted on the chart, is that correct?

    Is there any way to change the color of a bar that occured in the past?

    Thanks

    #2
    wmaria, I will have someone get back to you with an answer tomorrow. As far as I know, it isn't possible to color a bar 3 bars back.
    AustinNinjaTrader Customer Service

    Comment


      #3
      wmaria,

      Please open up the CandleStickPattern indicator and take a look at how it paints historical bars. Through the use of BarColorSeries.
      Josh P.NinjaTrader Customer Service

      Comment


        #4
        Great

        Thanks for eveyone's help, I will look into these commends.

        I tried looking up in Ninja help the ChartControl or BarColorSeries but nothing comes up. Are these commands described in the help file at all?

        Comment


          #5
          wmaria,

          No, these are unsupported methods, but to achieve what you want is only achievable through this technique.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            ChartControl.BarColorSeries[CurrentBar - 3] = Color.Red;

            Comment


              #7
              Thanks. That work exactly like I hoped.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by cmoran13, 04-16-2026, 01:02 PM
              0 responses
              43 views
              0 likes
              Last Post cmoran13  
              Started by PaulMohn, 04-10-2026, 11:11 AM
              0 responses
              25 views
              0 likes
              Last Post PaulMohn  
              Started by CarlTrading, 03-31-2026, 09:41 PM
              1 response
              162 views
              1 like
              Last Post NinjaTrader_ChelseaB  
              Started by CarlTrading, 04-01-2026, 02:41 AM
              0 responses
              98 views
              1 like
              Last Post CarlTrading  
              Started by CaptainJack, 03-31-2026, 11:44 PM
              0 responses
              158 views
              2 likes
              Last Post CaptainJack  
              Working...
              X