Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.
    JimNinjaTrader Customer Service

    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 rayyyu12, Today, 05:38 PM
        0 responses
        2 views
        0 likes
        Last Post rayyyu12  
        Started by xepher101, Yesterday, 12:19 PM
        2 responses
        28 views
        0 likes
        Last Post xepher101  
        Started by thumper57, Today, 04:30 PM
        0 responses
        4 views
        0 likes
        Last Post thumper57  
        Started by OllieFeraher, 05-09-2024, 11:14 AM
        5 responses
        16 views
        0 likes
        Last Post MisterTee  
        Started by jackiegils, Yesterday, 11:05 PM
        1 response
        11 views
        0 likes
        Last Post marcus2300  
        Working...
        X