Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Chart Properties Font Changes Automatically

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

    Chart Properties Font Changes Automatically

    I have the chart properties font size set to 11 pixels on my charts. Occasionally, this automatically changes to 14 pixels. It happens randomly, but seems to usually occur when I am either switching tabs, or changing the instrument on a chart.

    I have saved the chart properties preset with the 11 pixels, but this does not stop the issue from occurring.

    Thanks,
    Greg
    The Trading Mantis
    NinjaTrader Ecosystem Vendor - The Trading Mantis

    #2
    Hello gregschr,

    Thank you for your post.

    First and foremost, just remember that tabs are essentially a chart all on their own. They each have their own font size settings, so any adjustments to font size that you make to one tab will not be applied to any additional tabs, and you will have to manually apply that same change to each additional tab and chart.

    To resolve the issue that you are experiencing, I'd like you to restore the chart properties preset settings to the original default. After we do this, you can go back in a recreate your custom preset settings. To do this, please see the video demonstration that is publicly available at the link below;

    Free online storage and sharing with Screencast.com. 2 GB of storage and 2 GB of bandwidth per month for free. We won't compress, alter or take ownership of your content.


    Please let us know if we may assist you any further.
    Zachary S.NinjaTrader Customer Service

    Comment


      #3
      Hi Zachary,

      I should have been more specific about switching tabs. I have seen the font change when I switch to a different tab and then switch back to the original tab. The font size on the original tab is then 14.

      Also, I did try restoring the chart property defaults a couple of times (last time was a few days ago). I even went as far as rebuilding my charts from scratch (i.e. not using the chart templates). The issue still occurs.

      What seems odd is when the font size changes by itself, it always changes to 14.

      Thanks,
      Greg
      The Trading Mantis
      NinjaTrader Ecosystem Vendor - The Trading Mantis

      Comment


        #4
        Hello Greg,

        Thank you for your reply.

        I do understand that you may have restored this to the default before, but I would like you to do it again with the steps that I provided. The default size is 11 and, aside from a template changing that, there's no other scenario where this value would just change by itself ordinarily. Often times, the simplest explanation is the correct explanation, so I just need to be able to rule this out now that you are actually working with us on this issue.

        If the behavior continue after restoring the default, please let me know the following information;
        • What is the full version number of your installation of NinjaTrader 8? (This can be found at Control Center > Help > About)
        • Do you have any custom indicators or add-ons installed in the platform?
        • Are there any steps that you can take that reliably reproduce this issue?
        • Do you experience any error messages, either as a pop up or on the 'Log' tab?
        • Since chart properties save as part of the chart template as well, do you use any chart templates?
        I look forward to your reply and to further assisting you.
        Zachary S.NinjaTrader Customer Service

        Comment


          #5
          Hi Zachary,

          Ok, I have just restored the chart property defaults as shown in the video. I then opened up the chart properties, made a few changes that I prefer, and saved that preset.

          Since the issue is very intermittent and not reproducible, I will let you know if the issue shows up again and include the requested info at that time.

          Appreciate the help!
          Greg
          The Trading Mantis
          NinjaTrader Ecosystem Vendor - The Trading Mantis

          Comment


            #6
            Hi Zachary,

            Your question about add-ons got me thinking because I have created and use a lot of add-ons. So I did a search in Visual Studio of where I might be setting the font to 14. Turns out I am doing this in a couple of custom drawing tools, I was also able to make a simple change to the standard RiskReward drawing tool, and it causes the same issue. So I am now able to reproduce the issue using the following steps in version 8.0.24.3 64-bit.

            1) Modify the standard RiskReward drawing tool by adding a line (after line 119) setting the wpfFont.Size.
            Code:
            SimpleFont wpfFont = chartControl.Properties.LabelFont ?? new SimpleFont();
            [B]wpfFont.Size = 30;[/B]
            2) Use the modified tool on the chart.

            3) With the tool still on the chart, Reload NinjaScript.

            4) The chart properties font size will be changed to 30.

            Let me know if you have any question about reproducing this.

            Thanks,
            Greg
            The Trading Mantis
            NinjaTrader Ecosystem Vendor - The Trading Mantis

            Comment


              #7
              Hello Greg,

              Thank you for that information.

              Sure enough, as soon as I added this line of code into the Risk Reward tool and used it on my chart, it ballooned the size of the text of not just my axis, but also any other labeled drawing objects that I had applied to the chart. Since NinjaScript items are not within my realm of expertise, I will be passing this portion of your request over to one of our Scripting Support team members so that they can assist you further with this. Unfortunately, it would seem that changing the font size in this way is not going to be the ideal solution because it impacts the font size across the board and will override any values that are set within the UI.

              A Scripting Support team member will be following up with you as soon as they are available.

              Thanks in advance for your patience.
              Zachary S.NinjaTrader Customer Service

              Comment


                #8
                Hello Greg,

                It is expected that changing the chart property would affect all text on the chart that uses that property.

                However, I am not quite sure I'm understanding the actual issue.

                Is the issue that after assigning the wpfFont.Size to 30 it reverts back to 14?
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9
                  Hi Chelsea,

                  The issue is setting a font size in a drawing tool (say to 30) changes the chart properties font size also, and therefore changes the font size on all chart objects. I am guessing, but have not tested, if I change other font properties in the drawing tool (say to Bold), the chart properties would also change.

                  The original issue I was having was the chart properties font size was changing to 14 even after I changed the chart properties font back to 11. In the steps I gave to Zachary to reproduce the issue, I just used 30 (instead of 14) because it is much more obvious.

                  Thanks,
                  Greg
                  The Trading Mantis
                  NinjaTrader Ecosystem Vendor - The Trading Mantis

                  Comment


                    #10
                    Hello gregschr,

                    The problem is that you are assigning the chart controls font property to the variable and then setting the charts font settings. If you want to base your font off the chart and then change it you need to just make a totally new simple font and use the existing items you wanted like the font or other style settings.

                    Rather than:
                    Code:
                     = chartControl.Properties.LabelFont ?? new SimpleFont();
                    Just always do:

                    Code:
                     = new SimpleFont();
                    You can then add conditions below that point to gather values from chartControl.Properties.LabelFont if they are needed and then set the new SimpleFont you created to have those values.

                    The only reason that is necessary is that you are changing the font size, if you are only using the charts label font but not changing anything you don't need to recreate the font.

                    JesseNinjaTrader Customer Service

                    Comment


                      #11
                      Thanks Jesse, The mistake I made is so obvious now that you point out the problem. Appreciate the help!
                      The Trading Mantis
                      NinjaTrader Ecosystem Vendor - The Trading Mantis

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Radano, 06-10-2021, 01:40 AM
                      19 responses
                      604 views
                      0 likes
                      Last Post Radano
                      by Radano
                       
                      Started by KenneGaray, Today, 03:48 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post KenneGaray  
                      Started by thanajo, 05-04-2021, 02:11 AM
                      4 responses
                      470 views
                      0 likes
                      Last Post tradingnasdaqprueba  
                      Started by aa731, Today, 02:54 AM
                      0 responses
                      5 views
                      0 likes
                      Last Post aa731
                      by aa731
                       
                      Started by Christopher_R, Today, 12:29 AM
                      0 responses
                      10 views
                      0 likes
                      Last Post Christopher_R  
                      Working...
                      X