• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 bosajin, Yesterday, 06:27 PM
                        1 response
                        7 views
                        0 likes
                        Last Post NinjaTrader_Jim  
                        Started by stefanrvc, Today, 04:59 AM
                        1 response
                        14 views
                        0 likes
                        Last Post NinjaTrader_Marco  
                        Started by 7robert, Yesterday, 08:30 PM
                        2 responses
                        16 views
                        0 likes
                        Last Post NinjaTrader_Marco  
                        Started by pjsmith, Today, 01:13 AM
                        1 response
                        16 views
                        0 likes
                        Last Post NinjaTrader_ChrisSch  
                        Started by yukashg, Yesterday, 09:56 PM
                        1 response
                        16 views
                        0 likes
                        Last Post NinjaTrader_ChrisSch  
                        Working...
                        X