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

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.

    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.

        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!

            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.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by kevinenergy, 02-17-2023, 12:42 PM
                117 responses
                2,765 views
                1 like
                Last Post jculp
                by jculp
                 
                Started by Mongo, Today, 11:05 AM
                5 responses
                15 views
                0 likes
                Last Post NinjaTrader_ChelseaB  
                Started by SightCareAubetter, Today, 12:55 PM
                0 responses
                3 views
                0 likes
                Last Post SightCareAubetter  
                Started by traderqz, Today, 12:06 AM
                8 responses
                16 views
                0 likes
                Last Post traderqz  
                Started by SightCareAubetter, Today, 12:50 PM
                0 responses
                2 views
                0 likes
                Last Post SightCareAubetter  
                Working...
                X