• 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

ChartScale Height and Width Properties Incorrect in B5

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

    ChartScale Height and Width Properties Incorrect in B5

    Please see image attaches. In the OnRender method the chartScale parameter has the wrong width and height values - only about 2/3 of the actual chart real estate.

    What's strange is that on another Windows 10 machine the chartScale parameter contains correct values.

    The code pictured produces the output shown on the chart. The rectangle should cover the entire chart area.
    Attached Files

    #2
    Hello,

    Thank you for the post.

    I wanted to further clarify, are you saying that this only happens on your windows 10 PC where others it does not?

    Could you provide an export of the script for testing purposes?

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Correct. Happens on some Win10 machines, not on others. All the script needed to reproduce is in the screenshot in the original post.

      Comment


        #4
        Hello,

        Thank you for the reply.

        Rather than guessing on the remainder of the code that is not in the image, I would rather like to test the same script you are to see if I can duplicate the issue to report it to development. Without the actual code I may not duplicate the code exactly as you had which would not assist in finding the issue.

        If you can provide an export or text version of the script I could further look into this.

        I look forward to being of further assistance.
        JesseNinjaTrader Customer Service

        Comment


          #5
          No problem. Please see the script attached, it produces the issue shown in the first post.
          Attached Files

          Comment


            #6
            More info on this bug - any value greater than 100% will cause this issue, proportional to the setting.
            Attached Files

            Comment


              #7
              Hello RanchoDinero,

              I've made a quick video testing these scripts and so far I have not been able to reproduce.
              http://screencast.com/t/cpd2m2wGl

              I do now see that a special setting of changing the DPI is required to reproduce the issue.

              Having the DPI (text size) setting larger than 100% will also cause some undesired behavior with NinjaTrader 7. In general, we have advised to set this back to 100% to resolve the issues with NT7, however, for NT8 I will forward this to our development department as a bug report.
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Thanks for sending this in.

                The ChartScale Height/Width is not converted to device pixels. This is not done for internal reasons. If you want to use these properites, you must use the .ConvertToVerticalPixels or .ConvertToHorizontalPixels extension methods provided.

                We'll have the docs updated to reflect that.

                Instead you can use any of the following which are converted:
                ChartPanel.X ChartPanel.Y, ChartPanel.W and ChartPanel.H

                You can also simply use the RenderTarget.PixelSize.Height and RenderTarget.PixelSize.Width
                MatthewNinjaTrader Product Management

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by sciman, Today, 08:42 AM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Kate  
                Started by brunoviveiros, Today, 08:18 AM
                1 response
                9 views
                0 likes
                Last Post NinjaTrader_Kate  
                Started by connorgrant5, Today, 02:02 PM
                1 response
                3 views
                0 likes
                Last Post NinjaTrader_ChrisL  
                Started by jeremy83846, Today, 01:44 PM
                1 response
                4 views
                0 likes
                Last Post NinjaTrader_Jim  
                Started by PageNotFound404, Today, 01:53 PM
                0 responses
                8 views
                0 likes
                Last Post PageNotFound404  
                Working...
                X