Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Explaination for Rectangle Drawing Object in Ninjascript UtilMon......?

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

    Explaination for Rectangle Drawing Object in Ninjascript UtilMon......?

    Hello,
    I've run NSO UtilMon a few times to look at what uses resources in my setup.
    In the list, I see ChartObject Rectangle taking up some, and AFAIK I don't have a Rectangle Drawing Object on any chart.

    I've done everything I can think of, including looking for schoolboy errors e.g. Remove All Drawing Objects on every chart (in case the pesky blighter was back in time somewhere), opened Drawing Objects on every chart etc., looked for hidden charts, charts in extra tabs, I only have one workspace open etc

    Rectangle Drawing Tool is not something I use. I did do so on an occasion or two a little while ago. However, part of my EOD routine is to Remove All on each chart, so if I didn't get one and it was lurking hidden in history it would have subsequently met its maker.

    Then, I got to wondering if an Indicator I use draws them in the way that TrendLines Indicator draws Rays. I see the TrendLine Indicator resources reported and Rays - but I use Rays separately so without further process of deduction that doesn't help me. Is that the likely reason? I use AlanP's Repeater which plots Ranges - Repeater is listed as an Indicator. Would the Rectangle be 'part' of it? But then reporting its Rectangles separately seems incongruous.

    I'm showing Rectangles gorging themselves on my resources (not actually problematically so, just don't want them to if they're not entitled to be/serving a purpose), but AFAIK I don't have/want any Rectangles, not ones that I have drawn as far as I am aware and have attempted to ensure removed.

    Some insight would be appreciated
    TIA

    #2
    First, I'd like to explain the purpose and usefulness of the NinjaScript Utilization Monitor. This tool is useful when trying to identify the potential biggest contributor to performance issues. It makes it easier to do targeted efficiency changes instead of just guessing or starting from the bottom up.

    An item being in the NinjaScript Utilization Monitor list is not inherently a bad thing - basically everything is NinjaScript at some level, so seeing a rectangle or a minute series appear is OK. It is only if you're experiencing performance issues and are trying to identify potential culprits that looking at items that appear 'head and shoulders' above other items in the NinjaScript Utilization Monitor becomes useful. For example, if you run the tool for a couple minutes and notice that one item is at 50,000 while all others are in the hundreds or low thousands, that item would be the first one we would want to remove to see if there are improvements.

    If you're seeing the rectangle tool appear in the NinjaScript Utilization Monitor, this necessarily indicates something is using this drawing tool. Typically, it is an indicator that is using the drawing tool. It sounds like you've been fairly thorough in your search for the root cause, so I would suggest closing down all of your current workspaces and then building a new chart making not of what does/does not appear in the NinjaScript Utilization Monitor.

    Comment


      #3
      Hello Patrick & thanks.

      Re: The approach you suggest to finding out what is responsible for Rectangle being there at all in UtilMon (given that I haven't added one & if I had I've taken steps to remove any), you advise re-create my charts step by step and see if Rectangle appears in UtilMon at any point. I understand, thanks.

      Re: UtilMon explanation of its utility for troubleshooting. Thanks, helps, I'm not familiar with it. I understand the point you make that just because something appears doesn't necessarily means it's gone rogue, to be demonised etc. (E.g. Candlestick style is top of mine by a country mile, but that's because, err, I've got lots of candlestick charts). Am I to understand the UtilMon is 'selective', or 'intelligent' in putting forward in the list 'possibly worthy of a look'?
      I don't ask out of idle curiosity to take your time - what's behind my thinking is I have a lot of charts in my workspace - so if I build my single chart from scratch, may I find I have to duplicate 30 times for Rectangle to make it into utilmon list?
      I'll go ahead creating a new chart anyhow & see if Rectangle appears.
      What caught my attention in the first place was it's presence at all. But it may be entirely legit to be there, and also not a problem either & I know I'm running a bit blind with UtilMon.
      If there is a resource/help on UtilMon feel free to point me in that direction, but I failed to find any.

      Kind regards,

      Comment


        #4
        I would call the NinjaScript Utilization Monitor 'unintelligent' based on your description of 'intelligent'. It simply lists the total cumulative processing time taken by all NinjaScripts. There is no 'intelligent' sorting of this information.

        It would probably be best to close your currently open workspaces and then start from a fresh workspace to see if rectangle appears unexpectedly. Trying to perform this diagnostic step while having many charts open will probably result in what we're searching for getting lost in the 'noise'.

        Here is a help guide resource about the NinjaScript Utilization Monitor:

        Comment


          #5
          Hello Patrick and thanks.
          Yes, it was my intention to close workspace etc & start 'clean'.

          Confirmed it is the Repeater indicator that draws a Rectangle resulting in its presence in the list despite not having drawn any manually, and thus said presence requires no cause for concern or further investigation.

          Job done, thanks for your assistance.

          Kind regards,

          Comment


            #6
            I have narrowed down some of the soft page faults to drawing rectangles and found this.



            Volume Bars, Histo Bars or Candles are rectangles. I don't know how your AddBar works internally, i.e. whether it is using double buffering to setup the candle before the write to video memory, but I would like to know if you can check that out.

            I did find that I could certainly speed up my computer by eliminating Candles and Bars as they tend to cause soft page faults and seems to correlate with that forum post above. In some cases, the indicators are using SharpDX and I don't know where you would turn off double buffering in that case.

            Also, when I minimize a window, the issue with soft page faults goes away and they go to zero. My solution so far has been to minimize the windows in the background and put buttons on some charts that turn the indicator on or off.

            I would certainly like some help on turning off double buffering using Ninjascript so at least I can test this out. From what I understand it could possible cause flickering of the object being created.

            Soft page faults over 20,000 per second have drastically reduced the performance to where the charts start falling behind, so it is something I keep an eye on.

            Comment


              #7
              Rendering on NinjaTrader 8 charts takes place via SharpDX which double buffers by nature of how DirectX/Direct2D1 works. Double buffering as an optional concept is commonly regarded as a feature of WinForms. If you have a specific case where you can reproduce a high page fault count resulting in performance issues, please feel free to write in to PlatformSupport[AT]NinjaTrader[DOT]com with the steps you used to reproduce and confirm and our Quality Assurance Team will investigate further.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by xiinteractive, 04-09-2024, 08:08 AM
              7 responses
              27 views
              0 likes
              Last Post NinjaTrader_Erick  
              Started by Skifree, Today, 03:41 AM
              2 responses
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by trimpy, Today, 04:38 AM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by dpolyakov, 03-29-2024, 11:30 AM
              4 responses
              150 views
              2 likes
              Last Post NinjaTrader_RyanS  
              Started by traderqz, Today, 12:06 AM
              1 response
              2 views
              0 likes
              Last Post NinjaTrader_Gaby  
              Working...
              X