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

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 algospoke, Today, 06:40 PM
                        0 responses
                        2 views
                        0 likes
                        Last Post algospoke  
                        Started by maybeimnotrader, Today, 05:46 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post maybeimnotrader  
                        Started by quantismo, Today, 05:13 PM
                        0 responses
                        6 views
                        0 likes
                        Last Post quantismo  
                        Started by AttiM, 02-14-2024, 05:20 PM
                        8 responses
                        167 views
                        0 likes
                        Last Post jeronymite  
                        Started by cre8able, Today, 04:22 PM
                        0 responses
                        8 views
                        0 likes
                        Last Post cre8able  
                        Working...
                        X