Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get the plot/color of the of the previous bar?

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

    Get the plot/color of the of the previous bar?

    I'm trying to get the plot and color of the previous bar.

    Sadly I can't figure how to program the previous bar. I searched and it has insert code snippet but I can't get it to work.

    Using what I found here with BarColor


    Basically I'm trying to do this with the ECOBars indicator.

    If the previous bar was green, do something. If previous bar was red, do something

    #2
    Unfortunately this is not supported. What you can do instead is just check the condition for determining bar color. If previous close greater than previous open then the bar was green. If previous close less than previous open then the bar was red.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Is there a way to retrieve prior bars' plot colors in NT7?

      Comment


        #4
        drmartell, Josh's advice still stands. However, in NT7 there is a new series called BarColorSeries. If you've previously set a bar's color, you can go back and get that color. If the bar never had its color set, you will be unable to get the color.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        182 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Started by CaptainJack, 04-24-2026, 11:07 PM
        0 responses
        335 views
        0 likes
        Last Post CaptainJack  
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        259 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        358 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        188 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Working...
        X