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 Brevo, Today, 01:45 AM
              0 responses
              6 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              3 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Started by oviejo, Today, 12:28 AM
              0 responses
              6 views
              0 likes
              Last Post oviejo
              by oviejo
               
              Working...
              X