Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Is it possible to control "BarMarginRight" programatically?

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

    Is it possible to control "BarMarginRight" programatically?

    So I've scoured the CHART CONTROL METHODS AND PROPERTIES section, and it appears it is not possible, and that there is nothing you can do to add a margin to the right most bar to the price axis?

    I note here, in the Chart Control, PROPERTIES section, that there is a variable called "BarMarginRight," that can be accessed via the 'properties' selection in the chart menu. Also, there is a message that says:
    Warning: These are UI properties which are designed to be set by a user. Attempting to modify these values through a custom script is NOT guaranteed to take effect.
    So my question is essentially, is there a way to control how much space is present from the right-most bar visible on the chart, to the price axis?

    #2
    Hello forrestang,

    The ChartControl.Properties.BarMarginRight would be the only documented property we could suggest to change.

    As you have properly noted, these are intended to be changed by the user and are not guaranteed to take effect.


    If you are setting this in State.DataLoaded and this is not taking effect, we can submit a feature request on your behalf.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_ChelseaB View Post
      Hello forrestang,

      The ChartControl.Properties.BarMarginRight would be the only documented property we could suggest to change.

      As you have properly noted, these are intended to be changed by the user and are not guaranteed to take effect.


      If you are setting this in State.DataLoaded and this is not taking effect, we can submit a feature request on your behalf.
      Thanks ChelseaB, this is helpful.

      I actually want to attempt to control this from the onRender() method if possible.

      It does work.

      I have a weird script, I am playing around with that requires this.

      One thing that happens when I do this in the onRender() method, is that after removing the indicator, it leaves the chart set to what I modified it to with the BarMarginRight setting via the script.

      2 questions:
      -Is there a way to make sure this only happens once the chart has loaded, from within the onRender() method? So far, adding this script to a chart, it works the way I want, but it may be possible something weird can happen. So I'm asking just to make sure it happens after the data is loaded.

      -Is it possible to have the chart revert back to whatever it was upon removal of the indicator?

      Comment


        #4
        Actually, after playing around with this and seeing it on a chart... the margin is not waht I want.

        What I really want to do... is programmatically scroll the chart to the left... I.e., if you grab the chart, and scroll to the left... you would get that little arrow popup in the upper right hand corner.

        Is there a way to programmatically SCROLL the chart to the left?

        Comment


          #5
          Hello forrestang,

          Unfortunately, no, scrolling the chart is not supported.

          This is requested with tracking ID# SFT-2331.

          We appreciate your feedback, and I've added your vote to this.

          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.
          https://ninjatrader.com/support/help...ease_notes.htm
          Last edited by NinjaTrader_ChelseaB; 12-23-2020, 12:41 PM.
          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
          597 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          343 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
          556 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          555 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X