Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Programmatically set the chart's visible area (horizontally)

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

    Programmatically set the chart's visible area (horizontally)

    Hi,

    I would like to set the visible area of a chart along the time axis without having to manually scroll or change the horizontal scale. That is, there would be a button on the chart that when clicked, the visible area would automatically set to predefined start/end dates (assuming these dates are inside the period initially loaded into the chart). Is this possible programmatically? I believe ChartBars' FromIndex and ToIndex are read-only, but is there another way to achieve this?

    Thank you.

    #2
    Hello digibob,

    No, scrolling the chart is not supported.

    I've added your vote to feature request SFT-2331 'Method to scroll chart via NinjaScript'.

    Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

    When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank you, Chelsea.

      'Method to scroll chart via NinjaScript' is a start, but what I wish to have is 'Method to set chart's visible area via NinjaScript', which entails scrolling + changing the scale.

      In other words to make ChartBars' FromIndex and ToIndex read-write, as opposed to read-only. Or to set start/end dates by other means.

      I'd like to make it a feature request if SFT-2331 doesn't specifically include the above. Thank you.

      Comment


        #4
        Hello digibob,

        The feature request for scrolling the chart includes this.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Great. Thanks, Chelsea.

          Comment


            #6
            This is the 3rd thread today I have found referencing this same issue. Certainly would be very nice to have.

            Comment


              #7
              Hello Bidder,

              We have added your vote from the thread here: https://ninjatrader.com/support/foru...96#post1162196

              Let us know if there is anything else we can do to help.

              Comment


                #8
                I too would like to add my vote to the feature request SFT-2331 'Method to scroll chart via NinjaScript'. I see there's a lot of interest in this..surely we can make it happen

                I stumbled across:

                Code:
                this.ChartControl.LastTimePainted
                Which will return the datetime of the last visible bar on the chart...surely if you can get the datetime of the last bar then it's not too much of a leap to set the last datetime (provided it is within the beginning & end dates of the chart of course).

                Comment


                  #9
                  While I'm on the subject of a chart goto...

                  I'm not sure if it would be a quick & easy fix but if the 'right click in the scoll bar' goto function could be updated to be accessible by (a) a toolbar button and/or (b) a hotkey that would be an improvement. Having to specifically right click in the scroll bar is a bit of a nuisance when you are trying to jump through a chart backtest and find specific trades.

                  If I had to pick one of those two options as a priority I'd say hotkey.

                  Comment


                    #10
                    Hello newuser,

                    I've added your vote to SFT-2331.

                    I've sent a second feature request to move the scroll goto from the right click menu to a button on the toolbar.
                    Once I have a tracking ID for this request I will post in this thread for future reference.

                    Thanks for your feedback.

                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hello newuser,

                      I've received tracking ID# SFT-5380 for this request to move the chart scroll to feature to a button on the chart toolbar.

                      Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.

                      When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.

                      Release Notes - https://ninjatrader.com/support/help...ease_notes.htm
                      Chelsea B.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      601 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      347 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      103 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      559 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      558 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X