Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

ChartObject Text

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

    ChartObject Text

    Hello,

    I want to ask why a simple indicator calculating the current price from priorday close and currentday open causes such a high value in the utm. Please see the attached screenshot. I have it on 8 instruments and in the code I have for the text

    Draw.TextFixed(this,"str8",str8, TextPosition.BottomLeft,Brushes.Black, new SimpleFont ("Arial",12), Brushes.White,Brushes.White,100);

    Should there be made changes to reduce the value shown in utm? (but I need the background color because with only black numbers its sometimes not good to see in the chart)

    Thank you!
    Tony
    Attached Files

    #2
    Hello tonynt,

    Thanks for your post.

    TextFixed drawing objects will display under "Fixed Text" in the NinjaScript Utilization Monitor.

    All Text drawing objects (Draw.Text) will be grouped into the "Text" ChartObject. If you have a script that draws a lot of text on the chart, you will see the "Text" ChartObject take additional CPU because the text that is added is taking CPU time.

    You can reduce the number of indicators that are drawing text with Draw.Text to decrease the CPU load, or you can modify those indicators so less Text is drawn with Draw.Text.

    The Utilization time is relative to how long the window has been open, so a high number may not necessarily mean you have lagging symptoms. I would recommend studying the Utilization Monitor if you have lagging symptoms, and then you can use the Utilization Monitor as a guide to see which components you can change/reduce/remove to get more performance out of the platform.

    ​​​​​​​We look forward to assisting.

    Comment


      #3
      Originally posted by tonynt View Post
      Draw.TextFixed(this,"str8",str8, TextPosition.BottomLeft,Brushes.Black, new SimpleFont ("Arial",12), Brushes.White,Brushes.White,100);
      Cache the font.

      Comment


        #4
        Originally posted by bltdavid View Post

        Cache the font.
        Hello,

        thank you for your reply. What means "cache the font" please or how to do.

        Thank you!
        Tony

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        667 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        377 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        575 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        580 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X