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

reference past bar colors?

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

    reference past bar colors?

    Hi,

    Is there any predifined command to reference the colors of previous bars? I'm trying to identify within a loop going back a number of bars as to when bars changed from "Green" to "Red" and vice-versa...

    I know of the BarColor command however it doesn't seem suitable for this, for example:

    if((BarColor[index] == Green) && (BarColor[index + 1] == Red)){do something;}

    Thanks

    #2
    This is unfortunately not supported.
    RayNinjaTrader Customer Service

    Comment


      #3
      OK, thanks for the answer.

      Comment


        #4
        And it's not just that you cannot access prior bar colors, accessing the current bar color is also not supported.

        In a nutshell, it boils down to "you can set it" but "you can't get it".

        Comment


          #5
          Thanks for the info.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Brevo, Today, 01:45 AM
          0 responses
          3 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
          240 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