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

DrawText PC ressources

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

    DrawText PC ressources

    Hello,

    for showing the result of a calculation I have in the code only
    ...
    str8+="R: " + priceratio;
    ...
    Draw.TextFixed(this,"str8",str8,TextPosition.TopLe ft);

    but in NS-utyMonitor it shows the highest number among all indicators for "ChartObject Fixedtext".

    I have no advanced syntax with fonts, brushes, fontsize, backcolor, margin.... but it shows the high number in uty-monitor.

    Why does this need more pc ressources than a "normal" indicator? Is there a way to reduce this?

    Thank you!
    Tony
    Last edited by tonynt; 08-02-2019, 11:47 AM. Reason: typo

    #2
    Hello tonynt,

    Thanks for your post.

    If you are using Draw.TextFixed() in multiple instances, the monitor would put all of those together, so being at the top may not be meaningful, nor would the time. Another factor would be the calculate mode of the script where the draw.TextFixed() methods are used. I would not be concerned with this.

    With reference to the help guide

    When using it as debugging aid, it's recommended to focus on the top resource using NinjaScript's, while absolute total time is negligible.

    Also it's important to understand that a resource heavy NinjaScript could be meaning:

    a) the NinjaScript may not be coded as efficiently as possible and would be worthwhile to review if everything has been done to achieve optimal performance

    b) it could be doing intense / steady calculations by design and a higher than average resource use therefore could likely not be avoided.


    Reference: "NinjaScript Utilization Monitor" https://ninjatrader.com/support/help...us/?output.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello Paul,

      thank you for your reply. I have modified the sample with the buttons and using it in my scripts. Are these buttons also included in the Draw.TextFixed()?

      Thank you!
      Tony
      Attached Files

      Comment


        #4
        Hello tonynt,

        Thanks for your post.

        Are you having specific performance problems?

        Unless the buttons are created with Draw.TextFixed, i would not think so.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hello PaulH,

          thank you for your reply. I have frozen problems, no performance when frozen. So I try to remove what needs a lot of pc ressources.

          Thank you!
          Tony

          Comment


            #6
            Hello tonynt,

            Thank you for your post.

            Could you please send the log and trace from your platform to look further into this inquiry.

            To send me your log and trace files from within NinjaTrader. Go to Control Center-->Help-->Email Support in NinjaTrader. Put '2231618 Att Shawn', in the subject field and enable 'Log and trace files'. Also, give a reference of this thread in the body of the email.

            We look forward to assisting you further.
            Shawn B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by briansaul, Today, 05:31 AM
            0 responses
            1 view
            0 likes
            Last Post briansaul  
            Started by fwendolynlpxz, Today, 05:19 AM
            0 responses
            4 views
            0 likes
            Last Post fwendolynlpxz  
            Started by traderqz, Yesterday, 12:06 AM
            11 responses
            28 views
            0 likes
            Last Post NinjaTrader_Gaby  
            Started by PaulMohn, Today, 03:49 AM
            0 responses
            8 views
            0 likes
            Last Post PaulMohn  
            Started by inanazsocial, Today, 01:15 AM
            1 response
            10 views
            0 likes
            Last Post NinjaTrader_Jason  
            Working...
            X