Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Client Window Bar Numbering

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

    Chart Client Window Bar Numbering

    I would like to create an indicator whose period is the difference between the Client Window left most bar and the right most bar. If the client window is resized so that the number of bars displayed changes I would like the indicator to reflect the change in period. If the bar count of the right most bar is CurrentBar then what is the variable containing the bar count value of the left most bar within the client window? The OnBarUpdate() calculation would be something like this:

    ClientWindow_Right_Most_Bar_Number = CurrentBar
    Period = ClientWindow_Right_Most_Bar_Number - ClientWindow_Left_Most_Bar_Number

    Thanks

    #2
    Hello,

    Thanks for your forum post.

    This would require working directly with the ChartControl which is not supported unfortunately.

    Let me know if I can be of further assistance.
    BrettNinjaTrader Product Management

    Comment


      #3
      Is there a way to request a variable be added to the code so that the number of on screen chart bars can be determined? It seems to be a big limitation in the creation of dynamic indicators that adapt to the display if the number of displayed chart bars can't be determined.

      Thanks

      Comment


        #4
        Hello,

        I have sent this into development. Thanks for the recommendation!

        Let me know if I can be of further assistance.
        BrettNinjaTrader Product Management

        Comment


          #5
          Brett if the chart window is scrolled to the left to a prior time period for example 02/01/2010 - 02/28/2010 then the CurrentBar representing a bar for the current date would not reflect the Client Window right most bar. If you have sent in a request for the left most bar index count how about also putting in a request for the right most count bar. That way if the chart represents a previous date or time slice the number of bars in the chart can be determined and be used to update an indicator like a regression channel defined by the chart window rather then a fixed period that has to be tweeked.

          Thanks

          Comment


            #6
            I will forward it as well. This would go hand and hand if this is added. Thanks!
            BrettNinjaTrader Product Management

            Comment


              #7
              I am also looking for ways to locate the index of the right most bar on screen.

              Is this support now?

              Comment


                #8
                Hello,

                Unfortunately there is no support for this at this time currently however it is on suggestion list!

                Have a great day.
                BrettNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                576 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                334 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                101 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                553 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                551 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X