Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Set Right Side Margin Property for the Chart

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

    Set Right Side Margin Property for the Chart

    Can one set the Right side margin Property for the Chart from within a Strategy or Indicator? If so, how? For that matter, can any or all Chart properties by set programatically?

    #2
    Unfortunately this is not supported from NinjaScript.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hi Josh,

      Can you tell me how to fix the chart so that the active price bars do not move through the right margin. I have a chart that moves really fast and often have to pull it back many pages to bring it into the active screen. I would like to fix it so that it can't go past the right margin.

      Thanks

      Comment


        #4
        Is this what you want

        ChartControl.BarMarginRight = 125;

        This places an empty space of 125 after the last bar which will always be maintained.

        Comment


          #5
          Thanks mate, that sounds about right. I just don't know where to do that exactly, still new to the the platform and unsure where are the controls are located.

          Many Thanks!

          Originally posted by Mindset View Post
          ChartControl.BarMarginRight = 125;

          This places an empty space of 125 after the last bar which will always be maintained.

          Comment


            #6
            OnBarUpdate

            Or you might be able to stick it on Initialize but try it and see!

            Comment


              #7
              Thanks man, I don't know any languages yet, other than the ones I speak Was looking for an option field on a menu somewhere?

              Originally posted by Mindset View Post
              Or you might be able to stick it on Initialize but try it and see!

              Comment


                #8
                code

                Right click chart, Properties, Right side margin

                Comment


                  #9
                  Thanks dude, man, i've gone blind, too much charting!!

                  Originally posted by Mindset View Post
                  Right click chart, Properties, Right side margin

                  Comment


                    #10
                    Actually, I just saw that it is already set to 127.. should that not do the job? It hasn't been...

                    Originally posted by syxforex View Post
                    Thanks dude, man, i've gone blind, too much charting!!

                    Comment


                      #11
                      Right side margin will only persist if you are already looking at the most recent bar. Please be sure to not have a black arrow on the top right of your chart. If you have this icon that means you are looking at historical data and you would need to press the icon to get back to real-time data. If 127 is not enough for you please increase it even further till you get the desired look on your chart.
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        can be done from within the indicator by putting in
                        OnStartUp()

                        for example:

                        protectedoverridevoid OnStartUp()
                        {
                        ChartControl.BarMarginRight =
                        400;
                        }



                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        571 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        330 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
                        548 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        549 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X