Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 geddyisodin, Today, 05:20 AM
              5 responses
              32 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Started by bmartz, Today, 09:30 AM
              2 responses
              12 views
              0 likes
              Last Post bltdavid  
              Started by f.saeidi, Today, 11:02 AM
              1 response
              4 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Started by geotrades1, Today, 10:02 AM
              4 responses
              12 views
              0 likes
              Last Post geotrades1  
              Started by rajendrasubedi2023, Today, 09:50 AM
              3 responses
              16 views
              0 likes
              Last Post NinjaTrader_BrandonH  
              Working...
              X