Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

8.0.5.2 bug report

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

    8.0.5.2 bug report

    Actual right margin on chart is about 180px.
    Chart does not update bars positions and right margin assigned from code after indicator settings applied. But UI shows value designated from code.
    Not connected to data feed.

    PHP Code:
    protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
    {
    
                        // Set rigth margin
                        int margin = (int)Visuals.GetMargin();
                        if (chartControl.Properties.BarMarginRight != margin)
                            chartControl.Properties.BarMarginRight = Math.Min(margin, chartControl.CanvasRight); 
    
    Attached Files

    #2
    Hello ren37, and thank you for your report. The Chart Control Properties page documentation has this to say,

    Originally posted by http://ninjatrader.com/support/helpGuides/nt8/en-us/onrender.htm
    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.
    ChartControl.Properties appearing on the left hand side of an assignment operator, as in your code, is therefore unsupported, and its behavior in this circumstance is not any we can guarantee.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      So, why this property is public and is not read-only? For what reason?

      Comment


        #4
        Generally speaking, properties like this end up public and writable in many products for reasons such as testing, scalability, and flexibility. Whichever decision the programmer made, this is a documented behavior. Should you desire a read-only method for reasons such as reflection, I would recommend creating a front-end.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          My clients and me don't need "flexibility" that does not work as expected.
          Why not just to say: we can't provide this now and make it read-only?
          Btw in NT7 margin worked perfect.

          Comment

          Latest Posts

          Collapse

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